Extension:SkinPerNamespace

This extension is professionally maintained by the WikiTeq team.
WikiTeq provides official support for MediaWiki LTS releases only. It may work with other MediaWiki releases.
Category:Extensions by WikiTeq Category:Extensions without an imageCategory:GPL licensed extensions
MediaWiki extensions manual
SkinPerNamespace
Release status: stableCategory:Stable extensions
Implementation User interfaceCategory:User interface extensions
Description Allows a per-namespace skin
Author(s) Alexandre Emsenhuber (IAlextalk)
Maintainer(s) WikiTeq team
Latest version 2023-01-10
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.Category:Extensions with long-term support release branches compatibility policy
MediaWiki 1.35+Category:Extensions with manual MediaWiki version
Database changes No
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
  • $wgSkinPerNamespaceOverrideLoggedIn
  • $wgSkinPerSpecialPage
  • $wgSkinPerNamespace
Quarterly downloads 4 (Ranked 109th)
Translate the SkinPerNamespace extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

The SkinPerNamespace extension allows 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 and move the extracted SkinPerNamespace folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SkinPerNamespace
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'SkinPerNamespace' );
    
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

You can configure this extension with the following 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] = 'timeless';
$wgSkinPerNamespace[NS_PROJECT] = 'monobook';
Note Note: You can find the constants in includes/Defines.php.
$wgSkinPerSpecialPage
skins for special pages, mapping canonical name (see SpecialPage::$mList in SpecialPage.php) to skin. This overrides $wgSkinPerNamespace[NS_SPECIAL]. Example:
$wgSkinPerSpecialPage['Search'] = 'vector';
$wgSkinPerSpecialPage['Recentchanges'] = 'modern';
$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.

See also

Category:Skin extensions
Category:All extensions Category:Extensions by WikiTeq Category:Extensions in Wikimedia version control Category:Extensions with long-term support release branches compatibility policy Category:Extensions with manual MediaWiki version Category:Extensions without an image Category:GPL licensed extensions Category:RequestContextCreateSkin extensions Category:Skin extensions Category:Stable extensions Category:User interface extensions