Added some lock()/unlock() support for SQLite using lock file emulation
[mediawiki.git] / docs / skin.txt
blob1459d7afd033036f172e86211c9cc2a315c8aeba
1 skin.txt
3 MediaWiki includes four core skins:
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.
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.
13 * Modern: An attractive blue/grey theme with sidebar and top bar. Derived from
14   Monobook.
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.
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:
24 * Standard (a.k.a. Classic): The old default skin written by Lee Crocker during
25   the phase 3 rewrite, in 2002.
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/
31 * Chick: A lightweight Monobook skin with no sidebar. The sidebar links were
32   given at the bottom of the page instead.
34 * Simple: A lightweight skin with a simple white-background sidebar and no top
35   bar.
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).
41 == Custom CSS/JS ==
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:
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
53 These can also be customised on a per-user basis, by editing
54 [[User:<name>/vector.css]], [[User:<name>/vector.js]], etc.
56 This feature has led to a wide variety of "user styles" becoming available:
58 http://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles
60 If you want a different look for your wiki, that gallery is a good place to start.
62 == Drop-in custom skins ==
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:
69 $wgDefaultSkin = '<name>';
71 You can also disable dropped-in or core skins using:
73 $wgSkipSkins[] = '<name>';
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.
79 See http://www.mediawiki.org/wiki/Manual:Skinning for more information.
81 == Extension skins ==
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:
87 $wgValidSkinNames['mycoolskin'] = 'MyCoolSkin';
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.