* (bug 13728) Don't trim initial whitespace during section edits
[lhc/web/wiklou.git] / docs / skin.txt
1 skin.txt
2
3 This document describes the overall architecture of MediaWiki's HTML rendering
4 code as well as some history about the skin system. It is placed here rather
5 than in comments in the code itself to help reduce the code size.
6
7 == Version 1.6 and greater ==
8
9 PHPTal skins doesn't exist anymore. They were replaced by SkinTemplate skins,
10 introduced since 1.4 to remove the depedency of PHPTal.
11
12 A new experimental (disabled by default) callback-based template processor
13 has been introduced to try to speed up the generation of html pages. See for
14 example skins/disabled/MonoBookCBT.php.
15
16 You can find more informations at http://www.mediawiki.org/wiki/Manual:Skins.
17
18
19 == Version 1.4 ==
20
21 MediaWiki still use the PHPTal skin system introduced in version 1.3 but some
22 changes have been made to the file organisation.
23
24 PHP class and PHPTal templates have been moved to /skins/ (respectivly from
25 /includes/ and /templates/). This way skin designer and end user just stick to
26 one directory.
27
28 Two samples are provided to start with, one for PHPTal use (SkinPHPTal.sample)
29 and one without (Skin.sample).
30
31
32 == Version 1.3 ==
33
34 The following might help a bit though.
35
36 Firstly, there's Skin.php; this file will check various settings, and it
37 contains a base class from which new skins can be derived.
38
39 Before version 1.3, each skin had its own PHP file (with a sub-class to Skin)
40 to generate the output. The files are:
41 * SkinCologneBlue.php
42 * SkinNostalgia.php
43 * SkinStandard.php
44 * SkinWikimediaWiki.php
45 If you want to change those skins, you have to edit these PHP files.
46
47 Since 1.3 a new special skin file is available: SkinPHPTal.php. It makes use of
48 the PHPTal template engine and allows you to separate code and layout of the
49 pages. The default 1.3 skin is MonoBook and it uses the SkinPHPTAL class.
50
51 To change the layout, just edit the PHPTal template (templates/xhtml_slim.pt)
52 as well as the stylesheets (stylesheets/monobook/*).
53
54
55 == pre 1.3 version ==
56
57 Unfortunately there isn't any documentation, and the code's in a bit of a mess
58 right now during the transition from the old skin code to the new template-based
59 skin code in 1.3.