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