[Mediawiki-l] Restricted Namespaces

Dan Davis hokie99cpe+wiki at gmail.com
Thu May 25 23:11:50 UTC 2006


On 5/24/06, Dan Davis <hokie99cpe+wiki at gmail.com> wrote:
> When a user logs in, a list of the namespaces to which s/he has access
> is presented. I would like to add that list to the sidebar between the
> navigation box (MediaWiki:Sidebar) and the search box
> (MediaWiki:Search).

Anyone?

This is the code in SpecialUserlogin.php that prints the list... I
want to repeat this in the sidebar...

if ($wgUser->getRMainPages() != NULL) {
   # We are going to put some links to restricted namespaces
   # that the user has access to, so we disable the warning.
   $wgLinkWarn = false;

   $wgOut->addWikiText("<hr><b>Restricted Namespace
Access<br>".str_replace( '_', '
',$wgUser->getRMainPages())."</b><hr>");
   $wgOut->returnToMain(false);
} else {
   $wgOut->returnToMain( $auto );
}

Pointers?

Dan



More information about the MediaWiki-l mailing list