]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - docs/skin.txt
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / docs / skin.txt
1 skin.txt
2
3 MediaWiki includes four core skins:
4
5 * Vector: The default skin. Introduced in the 1.16 release (2010), it has been
6   set as the default in MediaWiki since the 1.17 release (2011), replacing
7   Monobook.
8
9 * Monobook: Named after the black-and-white photo of a book in the page
10   background. Introduced in the 2004 release of 1.3, it had been the
11   default skin since then, before being replaced by Vector.
12
13 * Modern: An attractive blue/grey theme with sidebar and top bar. Derived from
14   Monobook.
15
16 * Cologne Blue: A lightweight skin with minimal formatting. The oldest of the
17   currently bundled skins, largely rewritten in 2012 while keeping its
18   appearance.
19
20
21 Several legacy skins were removed in the 1.22 release, as the burden of
22 supporting them became too heavy to bear. Those were:
23
24 * Standard (a.k.a. Classic): The old default skin written by Lee Crocker during
25   the phase 3 rewrite, in 2002.
26
27 * Nostalgia: A skin which looks like Wikipedia did in its first year (2001).
28   This skin is now used for the old Wikipedia snapshot at
29   http://nostalgia.wikipedia.org/
30
31 * Chick: A lightweight Monobook skin with no sidebar. The sidebar links were
32   given at the bottom of the page instead.
33
34 * Simple: A lightweight skin with a simple white-background sidebar and no top
35   bar.
36
37 * MySkin: Essentially Monobook without the CSS. The idea was that it could be
38   customised using user-specific or site-wide CSS (see below).
39
40
41 == Custom CSS/JS ==
42
43 It is possible to customise the site CSS and JavaScript without editing any
44 server-side source files. This is done by editing some pages on the wiki:
45
46 * [[MediaWiki:Common.css]] -- for skin-independent CSS
47 * [[MediaWiki:Common.js]] -- for skin-independent JavaScript
48 * [[MediaWiki:Vector.css]], [[MediaWiki:Monobook.css]], etc. -- for
49   skin-dependent CSS
50 * [[MediaWiki:Vector.js]], [[MediaWiki:Monobook.js]], etc. -- for
51   skin-dependent JavaScript
52
53 These can also be customised on a per-user basis, by editing
54 [[User:<name>/vector.css]], [[User:<name>/vector.js]], etc.
55
56
57 == Custom skins ==
58
59 Several custom skins are available as of 2014.
60
61 https://www.mediawiki.org/wiki/Category:All_skins
62
63 Installing a skin requires adding its files in a subdirectory under skins/ and
64 adding an appropriate require_once line to LocalSettings.php, similarly to how
65 extensions are installed.
66
67 You can then make that skin the default by adding:
68   $wgDefaultSkin = '<name>';
69
70 Or disable it entirely by removing the require_once line. (User settings will
71 not be lost if it's reenabled later.)
72
73 See https://www.mediawiki.org/wiki/Manual:Skinning for more information on
74 writing new skins.
75
76
77 Until MediaWiki 1.25 it used to be possible to just put a <name>.php file in
78 MediaWiki's skins/ directory, which would be loaded and expected to contain the
79 Skin<name> class. This way has always been discouraged because of its limitations
80 (inability to add localisation messages, ResourceLoader modules, etc.) and
81 awkwardness in managing such skins. For information on migrating skins using
82 this old method, see <https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery>.