Forum Settings
       
« Previous 0 Next »
Reply To Thread

Suggested Edit for ZAM Tooltips > MediaWiki installationFollow

#1 Dec 21 2020 at 6:55 PM Rating: Decent
Avatar
17 posts
Instead of the current instructions given here: https://everquest.allakhazam.com/wiki/Tooltips#Mediawiki I would recommend the following:

Quote:
In your LocalSettings.php file, place the following:
# Load JavaScript 
$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, Skin &$skin ) { 
     $code = <<<'START_END_MARKER' 
<script defer src="https://zam.zamimg.com/j/tooltips.js?c"></script> 
<script defer>var zam_tooltips = { "iconizelinks": true }</script> 
START_END_MARKER; 
 
     $out->addHeadItem( 'my-wonderful-script', $code ); 
     return true; 
};

The "iconizelinks" script is, of course, optional. You can also add more scripts if you wish to the two shown. Just add more <script defer></script> lines. You can also remove the defer instruction if you wish.

The reason for using this method rather than the current one on that ZAM page is that the current method listed there requires you to edit the MediaWiki skin, which means that every time you upgrade your MediaWiki site you have to do it again. By adding the code I recommend, you just add it once to your LocalSettings.php file and never have to touch it again unless breaking changes are made.

Edited, Dec 21st 2020 8:10pm by Fanra
____________________________
Fanra
EverQuest Druid
https://everquest.fanra.info
« Previous 0 Next »
Reply To Thread

Colors Smileys Quote OriginalQuote Checked Help

 

Recent Visitors: 6 All times are in CST
Anonymous Guests (6)