Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Surprisingly enough, I have a problem finding a solution to this—I want to disable / remove the Random page link from a Mediawiki wiki on the left bar.

I think it is hard to find the answer on Google because "Random page" appears in many wikis as the actual link for Random page, but maybe I am googling for the wrong thing.

I couldn't find anything in LocalSettings.php either.

share|improve this question

1 Answer 1

The code for the sidebar is in the page MediaWiki:Sidebar. It should be enough to remove the line ** randompage-url|randompage from there. You need administrative privileges to edit that page.

Note that this does not actually disable the “Random page” feature (that's still accessible from Special:Random), it just removes the link from the sidebar. If you want to remove it altogether, you can add the following code to your LocalSettings.php:

function disableSpecialRandom(&$list) {
        unset($list['Random']);
        return true;
}
$wgHooks['SpecialPage_initList'][]='disableSpecialRandom';
share|improve this answer
    
I see. thanks. is it possible to remove it altogether? –  blogger Jan 19 '13 at 16:03
    
You could do that by using the SpecialPage_initList hook. –  svick Jan 19 '13 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.