Extension:SkinPerNamespace
From MediaWiki.org
|
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 | |
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
- For 1.13:
Download SkinPerNamespace.php. - For 1.12:
Download an old version of SkinPerNamespace.php.
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 totrue(default value), it will also override the the skin for logged in users, to avoid this you can set it to false and$wgSkinPerNamespacewill only apply to anonymous users.
| MediaWiki version: | 1.12 | only |
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 :
- Special:RandomPage (only when no pages are aviable)
- Special:RandomRedirect (same as above)
- Special:Confirmemail
- Special:Booksources
- Special:Userrights
[edit] See also
- $wgDefaultSkin : default skin to use

