adding that Vector shipped with 1.16 in 2010
[lhc/web/wiklou.git] / docs / skin.txt
1 skin.txt
2
3 MediaWiki's default skin is called Vector. Vector was introduced in
4 the 1.16 release (2010) and has been set as the default in MediaWiki since
5 the 1.17 release (2011). This replaces the popular skin, Monobook which
6 had been been the default since MediaWiki 1.3 (2004). It is now the
7 default skin on Wikimedia Projects.
8
9 There are three legacy skins which were introduced before MediaWiki 1.3:
10
11 * Standard (a.k.a. Classic): The old default skin written by Lee Crocker
12 during the phase 3 rewrite, in 2002.
13
14 * Nostalgia: A skin which looks like Wikipedia did in its first year (2001).
15 This skin is now used for the old Wikipedia snapshot at
16 http://nostalgia.wikipedia.org/
17
18 * Cologne Blue: A nicer-looking alternative to Standard.
19
20 The other skin that is widely used (and is the MediaWiki default before 1.17)
21 is Monobook.
22
23 * Monobook: Named after the black-and-white photo of a book, in the page background.
24 This was introduced in the 2004 release of 1.3
25
26 And there are four Monobook-derived skins which have been introduced since 1.3:
27
28 * MySkin: Monobook without the CSS. The idea is that you customise it using user
29 or site CSS (see below)
30
31 * Chick: A lightweight Monobook skin with no sidebar, the sidebar links are
32 given at the bottom of the page instead, as in the unstyled MySkin.
33
34 * Simple: A lightweight skin with a simple white-background sidebar and no
35 top bar.
36
37 * Modern: An attractive blue/grey theme with sidebar and top bar.
38
39 == Custom CSS/JS ==
40
41 It is possible to customise the site CSS and JavaScript without editing any
42 source files. This is done by editing some pages on the wiki:
43
44 * [[MediaWiki:Common.css]] -- for skin-independent CSS
45 * [[MediaWiki:Monobook.css]], [[MediaWiki:Simple.css]], etc. -- for
46 skin-dependent CSS
47 * [[MediaWiki:Common.js]], [[MediaWiki:Monobook.js]], etc. -- for custom
48 site JavaScript
49
50 These can also be customised on a per-user basis, by editing
51 [[User:<name>/monobook.css]], [[User:<name>/monobook.js]], etc.
52
53 This feature has led to a wide variety of "user styles" becoming available,
54 which change the appearance of Monobook or MySkin:
55
56 http://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles
57
58 If you want a different look for your wiki, that gallery is a good place to start.
59
60 == Drop-in custom skins ==
61
62 If you put a file in MediaWiki's skins directory, ending in .php, the name of
63 the file will automatically be added as a skin name, and the file will be
64 expected to contain a class called Skin<name> with the skin class. You can then
65 make that skin the default by adding to LocalSettings.php:
66
67 $wgDefaultSkin = '<name>';
68
69 You can also disable dropped-in or core skins using:
70
71 $wgSkipSkins[] = '<name>';
72
73 This technique is used by the more ambitious MediaWiki site operators, to
74 create complex custom skins for their wikis. It should be preferred over
75 editing the core Monobook skin directly.
76
77 See http://www.mediawiki.org/wiki/Manual:Skinning for more information.
78
79 == Extension skins ==
80
81 It is now possible (since MediaWiki 1.12) to write a skin as a standard
82 MediaWiki extension, enabled via LocalSettings.php. This is done by adding
83 it to $wgValidSkinNames, for example:
84
85 $wgValidSkinNames['mycoolskin'] = 'MyCoolSkin';
86
87 and then registering a class in $wgAutoloadClasses called SkinMycoolSkin, which
88 derives from Skin. This technique is apparently not yet used (as of 2008)
89 outside the DumpHTML extension.
90