Greetings:
I used this code that I found here:
https://www.mediawiki.org/wiki/Manual:Interface/Sidebar#content_of_sidebar_…
<?php
$wgHooks['SkinBuildSidebar'][] = 'lfHideSidebar';
function lfHideSidebar( $skin, &$bar ) {
global $wgUser;
// Hide sidebar for anonymous users
if ( !$wgUser->isLoggedIn() ) {
$bar = array(
'navigation' => array(
array(
'text' => wfMsg( 'login' ),
'href' =>
SpecialPage::getTitleFor( 'Login' )->getLocalURL(),
'id' => 'n-login',
'active' => ''
)
)
);
}
return true;
}
When I tried to access my wiki I got the white page of death.
I am using MW 1.21.1
Looking for help with this code or a better way to hide the sidebar for
anonymous users.
Thanks,
Wade
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l