Manual:$wgSkipSkins

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎日本語 • ‎Nederlands • ‎polski • ‎русский
Skins: $wgSkipSkins
Specify the name of skins that should not be presented in the list of available skins.
Introduced in version: 1.4.5
Removed in version: still in use
Allowed values:
Default value: array()

Other settings: Alphabetical | By Function

Details[edit | edit source]

Specify the names of skins that should not be presented in the list of available skins.

This configuration option was needed to fix a design flaw: Skin autodiscovery made it so that MediaWiki automatically detected all skins from inside the skins/ folder and made them available. That way it was impossible to activate those skins as they were activated automatically. You could only later hide them again - that is what this option was there for. With MediaWiki 1.23, skin autodiscovery got deprecated. Since MediaWiki 1.24, not only custom skins, but also core skins can be installed properly, finally making $wgSkipSkins superfluous.

Use for preventing users from choosing one or more skins which you do not want to remove from the skins directory.

Example, in LocalSettings.php put:

# Remove old skins from skin choice of user preferences
$wgSkipSkins = array( 'cologneblue', 'modern', 'monobook' );

Above would remove all skin choices but Vector. Omit from above array any choices that you want to remain.

Changing user preferences when removing a skin[edit | edit source]

In versions up to 1.16 (at most), upon registration the name of the default skin as provided by $wgDefaultSkin is copied to the user preferences of the user. When you later make this skin inaccessible, use the maintenance script Manual:UserOptions.php to make sure that this skin is also no longer chosen by any user:

php userOptions.php skin --old "monobook" --new "vector"

This will change the skin for all registered users, who have selected Monobook, to Vector.

See also[edit | edit source]