Manual:Skinning/Archive

This page contains instructions on how to create a skin for MediaWiki. Needs update for 1.14!

The term FooBar will be used as a placeholder for the newly-created skin's name. (Notice the use of the uppercase  and the lowercase   in different contexts.)

There is also a more general walkthrough here.

comment4,

Code Structure and Elements
This section outlines the code structure of a typical MediaWiki skin.

The respective code portions have been extracted from MediaWiki's default MonoBook skin. For the full PHP code in its entirety, see /Example.

Metadata
This section contains meta-information about the skin.

Initialization
Here the required PHP classes are defined. Instances of  and   need to be replaced with the skin's name.

Category List Fix
This is a fix for returning category links as a proper  element (instead of returning a mostly unordered string, which is the default behavior).

XHTML Output
This is the beginning of the Template filter callback, and usually does not need to be altered.

Head
The HTML head, including metadata, style sheets and scripts. This section usually does not require any adjustments, though the style sheets can be altered if desired.

Body (Page Elements)
The HTML body, composing the basic page structure.

The initial  tag's attributes usually do not require any adjustments.

Site Notice
[conditional]

User-Messages Notification
[conditional]

User Toolbar
[iterative]

Jump-To Links
(intra-page navigation) [conditional], [optional]

Sidebar Navigation
[iterative]

Page Subtitle
(e.g. redirect notice)

Undelete Notice
[conditional]

Category Links
[conditional]

Page Toolbar
[iterative]

Footer
[iterative]

Closing Trail
This last section simply closes any sections from above and usually does not need to be altered.

External

 * MediaWiki Skins Design: Designing attractive skins and templates for your MediaWiki site by Richard Carter, ISBN 978-1847195203
 * SiteGround Tutorial about MediaWiki Skins