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
20 posts
Instead of the current instructions given here: I would recommend the following:

In your LocalSettings.php file, place the following:
# Load JavaScript 
$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, Skin &$skin ) { 
     $code = <<<'START_END_MARKER' 
<script defer src=""></script> 
<script defer>var zam_tooltips = { "iconizelinks": true }</script> 
     $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
EverQuest Druid
« Previous 0 Next »
Reply To Thread

Colors Smileys Quote OriginalQuote Checked Help


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