Manual:Skin configuration/ja

このページでは、ウィキの外装 (スキン) の設定方法について、管理者向けの総合的な情報を記述しています. 外装全般の情報は Help:外装 を、新しい外装の作成についての開発者向けの情報は Manual:Skinning を参照してください.

この説明文書は、MediaWiki 1.24 以降向けです.

外装のダウンロード
The MediaWiki tarball download comes pre-bundled with four skins: Vector (the default skin), MonoBook, Modern and Cologne Blue.

However, if you have downloaded MediaWiki from Git or from a nightly version, or if you want to install additional skins, you will need to separately download the code for that skin or skins.

Many MediaWiki skins are contained in the Wikimedia Git repository (see the full listing here). You can download tarballs of skins from the skin distributor.

To download one of the skins in this group via Git, you should make a call like the following:

 git clone https://git.wikimedia.org/git/mediawiki/skins/[name of skin].git

e.g.: To get the default skin Vector, you should give the following from the  directory:

 git clone https://git.wikimedia.org/git/mediawiki/skins/Vector.git

Checkout an appropriate release of the skin. Change into the new directory and run:

git checkout REL1_24 (or other release version or tag)

Unfortunately, there is currently no way to download an additional skin other than via Git, but the mechanism to do such a thing is being developed.

After you have obtained the folder of a skin's files, place it as a subdirectory of  in your MediaWiki installation (you can place the Git repository there directly).

外装の有効化
/skins ディレクトリ内の任意の使いたい外装について、 ファイルに  行を追加しなければなりません. 例えば、ベクター外装を有効にするには以下を追加します:

(これは、ディレクトリが異なる点以外は、拡張機能の有効化と同じです. )

外装の選択によっては追加の段階が必要かもしれません. mediawiki.org 内の各外装のページに詳細なインストールガイドがあります. 例えば Vector のものは Skin:Vector#インストールをご覧ください. 他のすべての外装についての説明も同様です.

ウィキにおける既定の外装の設定
A default skin should be set for new users of a wiki by setting the variable  in   to the lowercase skin name specified in the skin file. Users can still change their skin by going to their preferences page, unless you uninstall or suppress all other skins, or disable the preference altogether (see below). For example:

Changing these value on an existing wiki will automatically change the setting of all users who have been using the previous default skin. There is a maintenance script to change users' preferences (userOptions.php), but you will most likely not need to use it.

If you do not change this value, Vector will be the default skin.

外装のアンインストール
To uninstall a skin, remove the  line from your LocalSettings.php file. You may remove the skin files from the  directory afterwards.

If any users have been using the skin you just uninstalled, MediaWiki will automatically switch them to the default skin of the wiki.

外装をアンインストールせずに抑制する
The administrator can limit the skin choices that are offered site-wide in user's preferences by listing skin(s) to suppress in the  array. This might be useful if you want to test a new skin without letting users see it. To do this, put something like this in :

You will be able to preview the skin using the useskin URL parameter.

サイト全体のCSSの変更
MediaWiki allows administrators to specify site-wide CSS rules to be added to every page rendered. These rules can be added by editing the page Common.css on your wiki, if  is set to true. In addition to a global stylesheet, one can also specify CSS rules to be used only in certain skins (see Manual:Interface/Stylesheets).

利用者CSSの変更
利用者はページ "User:利用者名/common.css" を作成することにより、自分用のCSSルールを指定することができます. そのページのCSSは利用者がどのスキンを使用していても適用されます. もしウェブサイトの既定の外装が変更されても、利用者のカスタムCSSは以前と同じように引き続き有効に作用します. この機能は  中の   を true に設定することで有効化されます. また、利用者はページ "User:利用者名/外装名.css" を作成することにより、特定の外装にCSSを適用することもできます. 例えばMonoBookスキンを利用しているなら、ページSpecial:MyPage/monobook.css を編集します.

Disable site users' ability to choose skins in user preferences
The system administrator can completely remove the "Skin" option so that it does not show up at all in User Preferences. This makes sense if your site will use a customized skin and would not look right in any other skin.

To do it, add a new line containing the following code to LocalSettings.php. It will remove the "Skin" option from preferences and the possibility to use the useskin parameter in the URL.