Thread:Project:Support desk/How to hide "View History" button for unlogged users?/reply (24)

you need to remove the "public" and "static" words. This will give you the following snippet to put at the end of your LocalSettings.php:

function efAddSkinStylesAnon( OutputPage &$out, Skin &$skin ) { if( !$wgUser->isLoggedIn ) { // Hide history tab if ( $skin->getSkinName == 'vector' ) { $out->addInlineStyle( '#ca-history { display:none; }' ); }       }        return true; } $wgHooks['BeforePageDisplay'][] = 'efAddSkinStylesAnon';