User:Paxed/Vector adlink

From NetHackWiki
Jump to: navigation, 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'=>'http://nethackwiki.com/',
                         'Smash Wiki'=>'http://www.ssbwiki.com/',
                         'Apple Wiki'=>'http://techessentials.org/apple/',
                         'Casualty Wiki'=>'http://casualty.shoutwiki.com',
                         'Club Penguin Wiki'=>'http://clubpenguinwiki.info/',
                         'Pikipedia'=>'http://www.pikminwiki.com/',
                         'PikCanon-NOT'=>'http://fanon.pikminwiki.com/',
                         'Absurdopedia'=>'http://absurdopedia.net/',
                         'DeviousMUD Wiki'=>'http://deviousmud.shoutwiki.com',
                         'Wikisimpsons'=>'http://simpsons.shoutwiki.com/wiki/Main_Page',
                         'Asheron\'s Call Community Wiki'=>'http://ac.wikkii.net',
                         'Grand Theft Wiki'=>'http://www.grandtheftwiki.com/',
                         'Talisman Online Wiki'=>'http://talismanonlinewiki.com',
                         'WOWpedia'=>'http://www.wowpedia.org/Portal:Main',
                         'WOWpedia.ru'=>'http://www.wowpedia.ru/',
                         'Spyro the Dragon Wiki'=>'http://en.spyro.shoutwiki.com/wiki/Main_Page',
                         'Animal Crossing Wiki'=>'http://animalcrossingwiki.me',
                         'Halopedia'=>'http://halopedian.com/',
                         'The Codex of Ultima Wisdom'=>'http://codex.ultimaaiera.com',
                         'Donkey Kong Wiki'=>'http://www.donkeykongwiki.com/Main_Page',
                         'Club Penguin Fanon Wiki'=>'http://fanon.clubpenguinwiki.info',
                         'The Transformers Wiki'=>'http://tfwiki.net/',
                         'WikiFur'=>'http://wikifur.com/',
                         'CrawlWiki'=>'http://crawl.chaosforge.org/');

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

Idea from User:Ilmari Karonen.