Manual:$wgSkipSkins

This page is a translated version of the page Manual:$wgSkipSkins and the translation is 50% complete.
外装: $wgSkipSkins
利用できる外装の一覧に表示しない外装の名前を指定する。
導入されたバージョン:1.4.5
除去されたバージョン:使用中
許容される値:未指定
既定値:[]

詳細

利用できる外装の一覧に表示しない外装の名前を指定します。

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 initially. With MediaWiki 1.23, skin autodiscovery got deprecated. It's now used to support hiding internal or other custom skins not meant to be made available for general use. For instance the bespoke skin used by API documentation, which removes sidebar and most user elements, is hidden with this variable.

skins ディレクトリから除去したくない外装 (1 つまたは複数) を利用者が選択するのを防止するために使用します。

例えば、LocalSettings.php に以下を記述します:

# 個人設定での外装の選択肢から外装を除去
$wgSkipSkins = [
    'minerva',
    'monobook',
    'timeless'
];

上記は、ベクター以外のすべての外装を除去します。 外装を残す場合は、その外装を上記の配列から除去してください。

Changing user preferences when removing a skin

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.

関連項目