If you just want to literally "hide" it then
it's easier to do with js.
n
index.php/Common.js
--
jQuery(function($){ if ( mw.user.isAnon() ) {
$('#p-tb').hide(); //id or class varies with skin
} } );
--
2013/11/22 gabjgervais <gabjgervais(a)gmail.com>
http://www.getcashforsurveys.com/?hop=gabou2014
2013/11/22 Wade Courtney <Wade.Courtney(a)sdmts.com>
Greetings:
I used this code that I found here:
https://www.mediawiki.org/wiki/Manual:Interface/Sidebar#content_of_sideba
r_and_toolbox_.28javascript.29
<?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
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org