Ævar Arnfjörð Bjarmason wrote:
> 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',
> ),
Just set to -
MediaWiki:Privacy, MediaWiki:Aboutsite and MediaWiki:Disclaimers
> 'icons' => array(
> - 'poweredbyico',
> - 'copyrightico',
> +# 'poweredbyico',
> +# 'copyrightico',
> ),
> );
For copyrightico set to false $wgCopyrightIcon and $wgRightsIcon.
> I could just add hooks to munge those things. E.g.:
>
> wfRunHooks( 'SkinVectorExecuteFooterlinks, array( &$this,
> &$footerlinks ) );
>
> And:
>
> wfRunHooks( 'SkinVectorRenderPortalsPortals, array( &$this, &$portals ) );
No more skin specific hooks, please.
You could create a custom skin just to inherit and unset some items.
Creating it as a different skin even if mostly equal is generally a good
idea.
> $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 did this on a custom skin by creating an empty toolbox() function in
the child class. Then vector was changed to use a switch instead of
calls. :(
> 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.
PS: Do you guys consider that the id change on vector of
footer-icon-poweredby to footer-icons-poweredbyico and
footer-icon-copyright to footer-icons-copyrightico should be backported
to 1.16?
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l