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