I run a custom Vector installation for a corporate-ish setup. Since the wiki is readonly unless people log in I've hidden some of the scarier wiki stuff. Here's my diff of Vector.php:
Index: skins/Vector.php =================================================================== --- skins/Vector.php (revision 68624) +++ skins/Vector.php (working copy) @@ -435,13 +435,13 @@ 'tagline', ), 'places' => array( - 'privacy', - 'about', - 'disclaimer', +# 'privacy', +# 'about', +# 'disclaimer', ), 'icons' => array( - 'poweredbyico', - 'copyrightico', +# 'poweredbyico', +# 'copyrightico', ), ); $footerlinksClasses = array( @@ -582,7 +582,7 @@ private function renderPortals( $portals ) { // Force the rendering of the following portals if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true; - if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true; +# if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true; if ( !isset( $portals['LANGUAGES'] ) ) $portals['LANGUAGES'] = true; // Render portals foreach ( $portals as $name => $content ) {
I could just add hooks to munge those things. E.g.:
wfRunHooks( 'SkinVectorExecuteFooterlinks, array( &$this, &$footerlinks ) );
And:
wfRunHooks( 'SkinVectorRenderPortalsPortals, array( &$this, &$portals ) );
But I thought I'd ask if someone (particularly Trevor) has suggestions on how to do it better. I can't see a quick and sane way to do it for the general case, since Vector uses a diffrent $footerlinks structure than MonoBook.
That's fine for my purposes, but might not be such a good idea for MediaWiki. I think per-skin hooks aren't an inherently bad idea though.
It would be used similar to how you can use SkinBuildSidebar now, here's something from my LocalSettings.php:
# Hide scary stuff in the sidebar from users that aren't logged in. Derived from # http://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Change_sidebar_conten... $wgHooks['SkinBuildSidebar'][] = 'efHideSidebar';
function efHideSidebar($skin, &$bar) { global $wgUser;
if (!$wgUser->isAllowed( 'edit' )) { unset($bar['vf-navigation-users']); unset($bar['TOOLBOX']); }
if (!$wgUser->isAllowed( 'block' )) { unset($bar['vf-navigation-admins']); }
return true; }