Jump to content

Community

Edward Shephard

Global Header Message

Recommended Posts

I've just submitted a support request because it and several other plugins aren't working on my site if a custom wrapper is used, even though the IDs to hook onto are present. I've linked to this thread and mentioned Unlucky's problem too.

Share this post


Link to post
Share on other sites

^^ No help on the bug front, @Edward Shephard. I've been summarily dismissed for using a custom wrapper, which is outside the scope of support.

Marcher has been kind enough to explain to me that the reason it doesn't work in my case is because plugins look for the template called globalTemplate, rather than get called by something within it. (The solution for anybody else experiencing the same is to paste {template="pluginName" group="plugins" location="global" app="core"} within the custom wrapper.)

That doesn't explain what @Unlucky's problem is, since the hook point is there. Good luck to you both in resolving it ^_^

Share this post


Link to post
Share on other sites

New in Version 1.0.3

NEW: Now uses IPS editor for easier formatting.
NEW: Users can now hide message if permitted by admin.

Bug: Fixed bug with group selector.

Note: Moved hook point to improve compatibility with custom skins. (Note: compatibility with custom skins is NOT guaranteed!).
Note: In order to be compatible with IPS editor, custom icons are now selectable by Font Awesome unicode value and not title.
Note: Do not be tempted to upload attachments in the editor - they won't work!

2 hours ago, Meddysong said:

^^ No help on the bug front, @Edward Shephard. I've been summarily dismissed for using a custom wrapper, which is outside the scope of support.

Marcher has been kind enough to explain to me that the reason it doesn't work in my case is because plugins look for the template called globalTemplate, rather than get called by something within it. (The solution for anybody else experiencing the same is to paste {template="pluginName" group="plugins" location="global" app="core"} within the custom wrapper.)

That doesn't explain what @Unlucky's problem is, since the hook point is there. Good luck to you both in resolving it ^_^

Glad you resolved that and useful to know.

I have just uploaded a new version that moves the hook post right up to the start of 'html > body' so hopefully that might help with custom skins a bit - although no guarantees.

Edited by Edward Shephard

Share this post


Link to post
Share on other sites

Hi Edward.

 

Great pluging!

 

I have run the last update, but hi is missing the language strings description (titels).

Is this is an fault on my system or your plging ? 

 

Naamloos.png

Edited by R-023

Share this post


Link to post
Share on other sites

Hi Edward, many thanks for implementing this nice plugin!

As a kind suggestion: if a user hid the global message once, he won't see it anymore, unless he cleans the cookies. Is that possible to make the message visible to all users, once it has been updated with a new text? :) 

Share this post


Link to post
Share on other sites

Hey i installed your plugin but it seems that there was an error with the install. If i try to uninstall now the plugin i get this error:

IPS\Db\Exception: Can't DROP 'ebsGlobalMessage_dismissed'; check that column/key exists (1091)
#0 /var/www/vhosts/***/***/system/Db/Db.php(1895): IPS\_Db->query('ALTER TABLE `co...')
#1 /var/www/vhosts/***/***/plugins/globalheadermessage/uninstall.php(10): IPS\_Db->dropColumn('core_members', 'ebsGlobalMessag...')
#2 /var/www/vhosts/***/***/system/Plugin/Plugin.php(477): require_once('/var/www/vhosts...')
#3 /var/www/vhosts/***/***/system/Node/Controller.php(1205): IPS\_Plugin->delete()
#4 /var/www/vhosts/***/***/system/Dispatcher/Controller.php(86): IPS\Node\_Controller->delete()
#5 /var/www/vhosts/***/***/system/Node/Controller.php(63): IPS\Dispatcher\_Controller->execute()
#6 /var/www/vhosts/***/***/applications/core/modules/admin/applications/plugins.php(39): IPS\Node\_Controller->execute()
#7 /var/www/vhosts/***/***/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\applications\_plugins->execute()
#8 /var/www/vhosts/***/***/atminnn/index.php(14): IPS\_Dispatcher->run()
#9 {main}

do you know how to fix this ?

Edited by Willie88

Share this post


Link to post
Share on other sites

i cant cause its shown under the plugins as installed.

if i try to install it as new version i get the error that i dont have permission to it.

Share this post


Link to post
Share on other sites

 

Hey. Updated the forum to 4,2,2, and the plugin. Now the plug-in stopped working.

Quote

UPDATE `core_members` core_members  SET `ebsGlobalMessage_dismissed`=0  
IPS\Db\Exception: Unknown column 'ebsGlobalMessage_dismissed' in 'field list' (1054)
#0 /var/www/www-root/data/www/cul7.ru/s/system/Db/Db.php(990): IPS\_Db->preparedQuery('/*IPS\\core\\modu...', Array)
#1 /var/www/www-root/data/www/cul7.ru/s/applications/core/modules/admin/applications/plugins.php(960) : eval()'d code(90): IPS\_Db->update('`core_members` ...', '`ebsGlobalMessa...')
#2 /var/www/www-root/data/www/cul7.ru/s/applications/core/modules/admin/applications/plugins.php(960): eval()
#3 /var/www/www-root/data/www/cul7.ru/s/system/Dispatcher/Controller.php(85): IPS\core\modules\admin\applications\_plugins->settings()
#4 /var/www/www-root/data/www/cul7.ru/s/system/Node/Controller.php(62): IPS\Dispatcher\_Controller->execute()
#5 /var/www/www-root/data/www/cul7.ru/s/applications/core/modules/admin/applications/plugins.php(38): IPS\Node\_Controller->execute()
#6 /var/www/www-root/data/www/cul7.ru/s/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\admin\applications\_plugins->execute()
#7 /var/www/www-root/data/www/cul7.ru/s/fak_13/index.php(13): IPS\_Dispatcher->run()
#8 {main}

 

I can not reinstall it through the panel, I get an error. Can there be a description of what and where to add fields or table to the database manually?

Quote

IPS\Db\Exception: Can't DROP 'ebsGlobalMessage_dismissed'; check that column/key exists (1091)
#0 /var/www/www-root/data/www/cul7.ru/s/system/Db/Db.php(1894): IPS\_Db->query('ALTER TABLE `co...')
#1 /var/www/www-root/data/www/cul7.ru/s/plugins/headermessage/uninstall.php(10): IPS\_Db->dropColumn('core_members', 'ebsGlobalMessag...')
#2 /var/www/www-root/data/www/cul7.ru/s/system/Plugin/Plugin.php(532): require_once('/var/www/www-ro...')
#3 /var/www/www-root/data/www/cul7.ru/s/system/Node/Controller.php(1213): IPS\_Plugin->delete()
#4 /var/www/www-root/data/www/cul7.ru/s/system/Dispatcher/Controller.php(85): IPS\Node\_Controller->delete()
#5 /var/www/www-root/data/www/cul7.ru/s/system/Node/Controller.php(62): IPS\Dispatcher\_Controller->execute()
#6 /var/www/www-root/data/www/cul7.ru/s/applications/core/modules/admin/applications/plugins.php(38): IPS\Node\_Controller->execute()
#7 /var/www/www-root/data/www/cul7.ru/s/system/Dispatcher/Dispatcher.php(146): IPS\core\modules\admin\applications\_plugins->execute()
#8 /var/www/www-root/data/www/cul7.ru/s/fak_13/index.php(13): IPS\_Dispatcher->run()
#9 {main}

 

Share this post


Link to post
Share on other sites

It definitely works on 4.2.2 so it must be a glitch with the install. You could either add the missing column manually:

\IPS\Db::i()->addColumn( 'core_members', array(
  'name'	=> 'ebsGlobalMessage_dismissed',
  'type'	=> 'BIT',
  'length'	=> 1,
  'null'	=> FALSE,
  'default'	=> 0,
  'comment'	=> 'If 1, the user has dismissed the global message'
) );

or you could remove the drop statement from the uninstaller.  Go to: yoursite/plugins/globalheadermessage/uninstall.php and remove / comment out the last line:

\IPS\Db::i()->dropColumn( 'core_members', 'ebsGlobalMessage_dismissed' );

then try again to uninstall and reinstall the plugin.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...