메뉴얼:스킨 설정

From mediawiki.org
This page is a translated version of the page Manual:Skin configuration and the translation is 24% complete.
Outdated translations are marked like this.

This page explains how to configure skins on a wiki for administrators.

이 문서는 미디어위키 1.24 이상에만 적용됩니다.

For using skins, refer to 도움말:스킨 for general skin information.

For developers who want to create new skins or edit existing skins, refer to Manual:How to make a MediaWiki skin for technical information.

스킨 다운로드

The MediaWiki tarball download comes pre-bundled with several skins.

See Bundled extensions and skins#Skins for a list.

However, if you have downloaded MediaWiki from Git, 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://gerrit.wikimedia.org/r/mediawiki/skins/[name of skin]

e.g.: To get the default skin Vector, you should give the following from the skins/ subdirectory of your MediaWiki installation folder:

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

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

git checkout REL1_35

(replace REL1_35 with another release branch or tag)

스킨 활성화하기

For any skin in your /skins directory that you wish to use, you must enable it in your LocalSettings.php file. 예를 들어, 벡터를 활성화하려면, 다음을 따라하세요. If you have multiple skins, each must be enabled with a separate statement:

// mw.v 1.24.x or less
require_once "$IP/skins/Vector/Vector.php";
// mw.v 1.25.x or above
wfLoadSkin( 'Vector' );

(이것은 확장 기능 활성화하기와 동일합니다. 디렉토리만 다를 뿐입니다.)

스킨에 따라 추가적인 절차가 요구될 수 있습니다. 자세한 설치 지침은 mediawiki.org의 각 스킨 페이지에서 볼 수 있습니다; 예를 들어, 벡터 스킨은 스킨:벡터#설치를 보세요. 모든 다른 스킨의 지침은 서로 비슷합니다.

위키 기본 스킨 설정하기

A default skin should be set for new users of a wiki by setting the variable $wgDefaultSkin in LocalSettings.php 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:

$wgDefaultSkin = 'vector';

Changing these values 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 wfLoadSkin (or require_once for MediaWiki 1.24 or older) line from your LocalSettings.php file. You may remove the skin files from the skins/ 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.

Suppressing skins without uninstalling

The administrator can limit the skin choices that are offered site-wide in user's preferences by listing skin(s) to suppress in the $wgSkipSkins 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 LocalSettings.php :

// To remove various skins from the User Preferences choices
$wgSkipSkins = array( "monobook", "timeless" );

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 Gadget-site.css (old Common.css)) on your wiki, if $wgUseSiteCss 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 변경

Users can also specify their own CSS rules by creating the page "User:Username/common.css". The CSS on this page is then applied to whatever skin the user is using. If the website is changed to a different default skin, the user's custom CSS will continue to work just as before. This feature can be enabled by setting $wgAllowUserCss to true in LocalSettings.php . A user can also apply CSS to a specific skin by creating the page "User:Username/skinname.css". If a user uses the MonoBook skin for example, they would edit the page Special:MyPage/monobook.css.

사용자가 스킨을 고를 수 없도록 설정하기

미디어위키 버전:
1.16

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.

$wgHiddenPrefs[] = 'skin';