skin.txt 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. skin.txt
  2. MediaWiki includes four core skins:
  3. * Vector: The default skin. Introduced in the 1.16 release (2010), it has been
  4. set as the default in MediaWiki since the 1.17 release (2011), replacing
  5. Monobook.
  6. * Monobook: Named after the black-and-white photo of a book in the page
  7. background. Introduced in the 2004 release of 1.3, it had been the
  8. default skin since then, before being replaced by Vector.
  9. * Modern: An attractive blue/grey theme with sidebar and top bar. Derived from
  10. Monobook.
  11. * Cologne Blue: A lightweight skin with minimal formatting. The oldest of the
  12. currently bundled skins, largely rewritten in 2012 while keeping its
  13. appearance.
  14. Several legacy skins were removed in the 1.22 release, as the burden of
  15. supporting them became too heavy to bear. Those were:
  16. * Standard (a.k.a. Classic): The old default skin written by Lee Crocker during
  17. the phase 3 rewrite, in 2002.
  18. * Nostalgia: A skin which looks like Wikipedia did in its first year (2001).
  19. This skin is now used for the old Wikipedia snapshot at
  20. https://nostalgia.wikipedia.org/
  21. * Chick: A lightweight Monobook skin with no sidebar. The sidebar links were
  22. given at the bottom of the page instead.
  23. * Simple: A lightweight skin with a simple white-background sidebar and no top
  24. bar.
  25. * MySkin: Essentially Monobook without the CSS. The idea was that it could be
  26. customised using user-specific or site-wide CSS (see below).
  27. == Custom CSS/JS ==
  28. It is possible to customise the site CSS and JavaScript without editing any
  29. server-side source files. This is done by editing some pages on the wiki:
  30. * [[MediaWiki:Common.css]] -- for skin-independent CSS
  31. * [[MediaWiki:Common.js]] -- for skin-independent JavaScript
  32. * [[MediaWiki:Vector.css]], [[MediaWiki:Monobook.css]], etc. -- for
  33. skin-dependent CSS
  34. * [[MediaWiki:Vector.js]], [[MediaWiki:Monobook.js]], etc. -- for
  35. skin-dependent JavaScript
  36. These can also be customised on a per-user basis, by editing
  37. [[User:<name>/vector.css]], [[User:<name>/vector.js]], etc.
  38. == Custom skins ==
  39. Several custom skins are available as of 2014.
  40. https://www.mediawiki.org/wiki/Special:MyLanguage/Category:All_skins
  41. Installing a skin requires adding its files in a subdirectory under skins/ and
  42. adding an appropriate require_once line to LocalSettings.php, similarly to how
  43. extensions are installed.
  44. You can then make that skin the default by adding:
  45. $wgDefaultSkin = '<name>';
  46. Or disable it entirely by removing the require_once line. (User settings will
  47. not be lost if it's reenabled later.)
  48. See https://www.mediawiki.org/wiki/Manual:Skinning for more information on
  49. writing new skins.
  50. Until MediaWiki 1.25 it used to be possible to just put a <name>.php file in
  51. MediaWiki's skins/ directory, which would be loaded and expected to contain the
  52. Skin<name> class. This way has always been discouraged because of its limitations
  53. (inability to add localisation messages, ResourceLoader modules, etc.) and
  54. awkwardness in managing such skins. For information on migrating skins using
  55. this old method, see <https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery>.