Merge "Add title to list item of language link"
[lhc/web/wiklou.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 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 This feature has led to a wide variety of "user styles" becoming available:
57
58 https://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles
59
60 If you want a different look for your wiki, that gallery is a good place to start.
61
62 == Drop-in custom skins ==
63
64 If you put a file in MediaWiki's skins directory, ending in .php, the name of
65 the file will automatically be added as a skin name, and the file will be
66 expected to contain a class called Skin<name> with the skin class. You can then
67 make that skin the default by adding to LocalSettings.php:
68
69 $wgDefaultSkin = '<name>';
70
71 You can also disable dropped-in or core skins using:
72
73 $wgSkipSkins[] = '<name>';
74
75 This technique is used by the more ambitious MediaWiki site operators, to
76 create complex custom skins for their wikis. It should be preferred over
77 editing the core Monobook skin directly.
78
79 See https://www.mediawiki.org/wiki/Manual:Skinning for more information.
80
81 == Extension skins ==
82
83 It is now possible (since MediaWiki 1.12) to write a skin as a standard
84 MediaWiki extension, enabled via LocalSettings.php. This is done by adding
85 it to $wgValidSkinNames, for example:
86
87 $wgValidSkinNames['mycoolskin'] = 'MyCoolSkin';
88
89 and then registering a class in $wgAutoloadClasses called SkinMycoolSkin, which
90 derives from Skin. This technique is apparently not yet used (as of 2008)
91 outside the DumpHTML extension.
92