Extension:SkinPerNamespace
Appearance
Release status: beta |
|
|---|---|
| Implementation | Hook |
| Description | allows a per-namespace skin |
| Author(s) | Alexandre Emsenhuber |
| Latest version | 2018-01-26 |
| MediaWiki | 1.12 |
|
$wgSkinPerNamespace, $wgSkinPerNamespaceOverrideLoggedIn |
|
| Licence | GPLv2 or higher |
| Download | svn (browse) |
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.
Installation
Download SkinPerNamespace.php and 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" );
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
$wgSkinPerNamespacewill only apply to anonymous users.
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
- Special:Invalidateemail (only aviable since 1.13)
See also
- $wgDefaultSkin : default skin to use
