X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=docs%2Fskin.txt;h=0b4e0bdac54b4cf64e429b345c54805502b810d2;hb=5a942200818a213c7a269aca866f767f398afc7e;hp=58f77cf8e04128d8f5ad8c270531aa40255cba06;hpb=96603cd221051a324c902b6d4debd88ff1418404;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/skin.txt b/docs/skin.txt index 58f77cf8e0..0b4e0bdac5 100644 --- a/docs/skin.txt +++ b/docs/skin.txt @@ -7,7 +7,7 @@ MediaWiki includes four core skins: Monobook. * Monobook: Named after the black-and-white photo of a book in the page - background. Introduced in the 2004 release of 1.3, it had been been the + background. Introduced in the 2004 release of 1.3, it had been the default skin since then, before being replaced by Vector. * Modern: An attractive blue/grey theme with sidebar and top bar. Derived from @@ -26,7 +26,7 @@ supporting them became too heavy to bear. Those were: * Nostalgia: A skin which looks like Wikipedia did in its first year (2001). This skin is now used for the old Wikipedia snapshot at - http://nostalgia.wikipedia.org/ + https://nostalgia.wikipedia.org/ * Chick: A lightweight Monobook skin with no sidebar. The sidebar links were given at the bottom of the page instead. @@ -53,40 +53,30 @@ server-side source files. This is done by editing some pages on the wiki: These can also be customised on a per-user basis, by editing [[User:/vector.css]], [[User:/vector.js]], etc. -This feature has led to a wide variety of "user styles" becoming available: -https://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles +== Custom skins == -If you want a different look for your wiki, that gallery is a good place to start. +Several custom skins are available as of 2014. -== Drop-in custom skins == +https://www.mediawiki.org/wiki/Category:All_skins -If you put a file in MediaWiki's skins directory, ending in .php, the name of -the file will automatically be added as a skin name, and the file will be -expected to contain a class called Skin with the skin class. You can then -make that skin the default by adding to LocalSettings.php: +Installing a skin requires adding its files in a subdirectory under skins/ and +adding an appropriate require_once line to LocalSettings.php, similarly to how +extensions are installed. -$wgDefaultSkin = ''; +You can then make that skin the default by adding: + $wgDefaultSkin = ''; -You can also disable dropped-in or core skins using: +Or disable it entirely by removing the require_once line. (User settings will +not be lost if it's reenabled later.) -$wgSkipSkins[] = ''; +See https://www.mediawiki.org/wiki/Manual:Skinning for more information on +writing new skins. -This technique is used by the more ambitious MediaWiki site operators, to -create complex custom skins for their wikis. It should be preferred over -editing the core Monobook skin directly. - -See https://www.mediawiki.org/wiki/Manual:Skinning for more information. - -== Extension skins == - -It is now possible (since MediaWiki 1.12) to write a skin as a standard -MediaWiki extension, enabled via LocalSettings.php. This is done by adding -it to $wgValidSkinNames, for example: - -$wgValidSkinNames['mycoolskin'] = 'MyCoolSkin'; - -and then registering a class in $wgAutoloadClasses called SkinMycoolSkin, which -derives from Skin. This technique is apparently not yet used (as of 2008) -outside the DumpHTML extension. +Until MediaWiki 1.25 it used to be possible to just put a .php file in +MediaWiki's skins/ directory, which would be loaded and expected to contain the +Skin class. This way has always been discouraged because of its limitations +(inability to add localisation messages, ResourceLoader modules, etc.) and +awkwardness in managing such skins. For information on migrating skins using +this old method, see .