User:Paxed/Vector adlink

From NetHackWiki
Jump to navigation Jump to search

Very quick hack for "ad" links in Vector skin, as used on this wiki:

Put the following in skins/Vector.php footer part:

<?php global $wgNHWikiAdLinks; $key = array_rand($wgNHWikiAdLinks); echo "<ul id=\"nhw-adlink\"><li><a href=\"$wgNHWikiAdLinks[$key]\">$key</a></li></ul>"; ?>

And the following in your LocalSettings.php:

$wgNHWikiAdLinks = array('NetHackWiki'=>'',
                         'Smash Wiki'=>'',
                         'Apple Wiki'=>'',
                         'Casualty Wiki'=>'',
                         'Club Penguin Wiki'=>'',
                         'DeviousMUD Wiki'=>'',
                         'Asheron\'s Call Community Wiki'=>'',
                         'Grand Theft Wiki'=>'',
                         'Talisman Online Wiki'=>'',
                         'Spyro the Dragon Wiki'=>'',
                         'Animal Crossing Wiki'=>'',
                         'The Codex of Ultima Wisdom'=>'',
                         'Donkey Kong Wiki'=>'',
                         'Club Penguin Fanon Wiki'=>'',
                         'The Transformers Wiki'=>'',

Don't forget to comment out your own site from the list.

Idea from User:Ilmari Karonen.