]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - docs/skin.txt
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / docs / skin.txt
index bbe6fec5497c212bf10c4eb91aba8b67cd77c908..a3c8c3347aa0fd4d2a963add5e6ace722e39714b 100644 (file)
@@ -1,89 +1,82 @@
 skin.txt
 
-MediaWiki's default skin is called Vector. This has been the case since
-the 1.17 release (2011). This replaces the popular skin, Monobook which
-had been been the default since MediaWiki 1.3 (2004). It is now the
-default skin on Wikimedia Projects.
+MediaWiki includes four core skins:
 
-There are three legacy skins which were introduced before MediaWiki 1.3:
+* Vector: The default skin. Introduced in the 1.16 release (2010), it has been
+  set as the default in MediaWiki since the 1.17 release (2011), replacing
+  Monobook.
 
-* Standard (a.k.a. Classic): The old default skin written by Lee Crocker 
-during the phase 3 rewrite, in 2002.
+* 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 the
+  default skin since then, before being replaced by Vector.
 
-* 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/
+* Modern: An attractive blue/grey theme with sidebar and top bar. Derived from
+  Monobook.
 
-* Cologne Blue: A nicer-looking alternative to Standard.
+* Cologne Blue: A lightweight skin with minimal formatting. The oldest of the
+  currently bundled skins, largely rewritten in 2012 while keeping its
+  appearance.
 
-The other skin that is widely used (and is the MediaWiki default before 1.17)
-is Monobook.
 
-* Monobook: Named after the black-and-white photo of a book, in the page background.
-This was introduced in the 2004 release of 1.3
+Several legacy skins were removed in the 1.22 release, as the burden of
+supporting them became too heavy to bear. Those were:
 
-And there are four Monobook-derived skins which have been introduced since 1.3:
+* Standard (a.k.a. Classic): The old default skin written by Lee Crocker during
+  the phase 3 rewrite, in 2002.
 
-* MySkin: Monobook without the CSS. The idea is that you customise it using user
-or site CSS (see below)
+* 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/
 
-* Chick: A lightweight Monobook skin with no sidebar, the sidebar links are
-given at the bottom of the page instead, as in the unstyled MySkin.
+* Chick: A lightweight Monobook skin with no sidebar. The sidebar links were
+  given at the bottom of the page instead.
 
-* Simple: A lightweight skin with a simple white-background sidebar and no
-top bar.
+* Simple: A lightweight skin with a simple white-background sidebar and no top
+  bar.
+
+* MySkin: Essentially Monobook without the CSS. The idea was that it could be
+  customised using user-specific or site-wide CSS (see below).
 
-* Modern: An attractive blue/grey theme with sidebar and top bar.
 
 == Custom CSS/JS ==
 
 It is possible to customise the site CSS and JavaScript without editing any
-source files. This is done by editing some pages on the wiki:
+server-side source files. This is done by editing some pages on the wiki:
 
 * [[MediaWiki:Common.css]] -- for skin-independent CSS
-* [[MediaWiki:Monobook.css]], [[MediaWiki:Simple.css]], etc. -- for
-skin-dependent CSS
-* [[MediaWiki:Common.js]], [[MediaWiki:Monobook.js]], etc. -- for custom
-site JavaScript
+* [[MediaWiki:Common.js]] -- for skin-independent JavaScript
+* [[MediaWiki:Vector.css]], [[MediaWiki:Monobook.css]], etc. -- for
+  skin-dependent CSS
+* [[MediaWiki:Vector.js]], [[MediaWiki:Monobook.js]], etc. -- for
+  skin-dependent JavaScript
 
 These can also be customised on a per-user basis, by editing
-[[User:<name>/monobook.css]], [[User:<name>/monobook.js]], etc.
-
-This feature has led to a wide variety of "user styles" becoming available,
-which change the appearance of Monobook or MySkin:
-
-http://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles
-
-If you want a different look for your wiki, that gallery is a good place to start.
-
-== Drop-in custom 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<name> with the skin class. You can then
-make that skin the default by adding to LocalSettings.php:
+[[User:<name>/vector.css]], [[User:<name>/vector.js]], etc.
 
-$wgDefaultSkin = '<name>';
 
-You can also disable dropped-in or core skins using:
+== Custom skins ==
 
-$wgSkipSkins[] = '<name>';
+Several custom skins are available as of 2014.
 
-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. 
+https://www.mediawiki.org/wiki/Category:All_skins
 
-See http://www.mediawiki.org/wiki/Manual:Skinning for more information.
+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.
 
-== Extension skins ==
+You can then make that skin the default by adding:
+  $wgDefaultSkin = '<name>';
 
-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:
+Or disable it entirely by removing the require_once line. (User settings will
+not be lost if it's reenabled later.)
 
-$wgValidSkinNames['mycoolskin'] = 'My cool skin';
+See https://www.mediawiki.org/wiki/Manual:Skinning for more information on
+writing new skins.
 
-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 <name>.php file in
+MediaWiki's skins/ directory, which would be loaded and expected to contain the
+Skin<name> 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 <https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery>.