Extension:SkinPerNamespace

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
SkinPerNamespace

Release status: beta

Implementation Hook
Description allows a per-namespace skin
Author(s) IAlex Talk
MediaWiki 1.12
License GPLv2 or higher
Download svn (browse)
Parameters $wgSkinPerNamespace, $wgSkinPerNamespaceOverrideLoggedIn
Hooks used

MediaWikiPerformAction
BeforePageDisplay

This extension allow to specify a per-namespace skin that can be configured in $wgSkinPerNamespace, but this will also override users preferences, to avoid this you can set $wgSkinPerNamespaceOverrideLoggedIn to false.

[edit] Installation

Put it in extensions/SkinPerNamespace directory of your MediaWiki installation, then edit LocalSettings.php and add the following line :

require_once( "$IP/extensions/SkinPerNamespace/SkinPerNamespace.php" );

[edit] Configuration

You can configure this extension with to variables :

  • $wgSkinPerNamespace : array mapping namespaces index (i.e. namespaces numbers and not names) to a skin name. Use all lower case name for skin, like monobook, modern, ... otherwise it simply won't work. Example:
$wgSkinPerNamespace[NS_TALK] = "modern";
$wgSkinPerNamespace[NS_PROJECT] = "cologneblue";
Note: you can find the constants in includes/Defines.php.
  • $wgSkinPerNamespaceOverrideLoggedIn, if set to true (default value), it will also override the the skin for logged in users, to avoid this you can set it to false and $wgSkinPerNamespace will only apply to anonymous users.


MediaWiki version: 1.12 only

Note Note: This also work for some special pages, but not all, as this extension use SpecialPageExecuteBeforePage to change the skin and this hook is not called when using special pages defined by extensions or the following pages from the core of MediaWiki :

[edit] See also

Personal tools