Manual:Skin configuration/fr

Cette page explique comment configurer les habillages sur un wiki pour les administrateurs.

For creating new skins, please refer to Help:Skins for general skin information and Manual:Skinning for developer information.

Cette documentation s'applique à MediaWiki 1.31+.

Télécharger les habillages
Le téléchargement de l'archive MediaWiki est fourni d'office avec trois habillages :
 * (l'habillage par défaut)

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). Vous pouvez télécharger les archives d'habillages à partir du distributeur d'habillages.

Pour télécharger un des habillages de ce groupe via Git, vous devez faire un appel de la manière suivante :

 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  directory:

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

Sélectionnez une version appropriée de l'habillage. Modifiez à l'aide du nouveau répertoire et exécutez :

git checkout REL1_27 (ou autre version diffusée ou balise)

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).

Activer les habillages
For any skin in your /skins directory that you wish to use, you must enable it in your file. Par exemple pour activer Vector, ajouter ce qui suit. Si vous utilisez plusieurs habillages, chacun d'eux doit être activé à l'aide d'une instruction propre :



(This is equivalent to enabling an extension, only in a different directory.)

Des étapes supplémentaires peuvent être nécessaires en fonction de l'habillage choisi. Les instructions d'installation détaillées sont disponible pour chaque page d'habillage sur MediaWiki.org, pour Vector voir Skin:Vector#Installation. Les instructions sont analogues pour les autres habillages.

Définir un habillage par défaut pour le wiki
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.

Si vous ne changez pas cette valeur, Vector sera l'habillage par défaut.

Désinstaller des habillages
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.

Supprimer des habillages sans les désinstaller
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.

Modifier le CSS pour tout le site
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).

Modifications CSS utilisateur
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  to true in. 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.

Désactiver la capacité des utilisateurs du site à choisir des habillages dans leurs préférences
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.