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