Manual:Skinning/Vector
From MediaWiki.org
How to create a skin FooBar based on the default skin Vector (any name other than FooBar will do of course) in MediaWiki 1.17/1.18
[edit] copy vector
- copy directory ./skins/vector to ./skins/foobar
- copy ./skins/Vector.php to ./skins/FooBar.php
- copy ./skins/Vector.deps.php to ./skins/FooBar.deps.php
- in ./skins/FooBar.php, change:
- everywhere SkinVector into SkinFooBar
- everywhere VectorTemplate into FooBarTemplate
- $skinname = 'vector', $stylename = 'vector' into $skinname = 'foobar', $stylename = 'foobar'
- 'skins.vector' into 'skins.foobar'
- leave other 'vector' occurrences intact, unless you're going to add all vector-related system messages...
- register your skin's module by putting the following in $IP/resources/Resources.php:
'skins.foobar' => array(
'styles' => array( 'foobar/screen.css' => array( 'media' => 'screen' ) ),
'scripts' => 'foobar/vector.js',
'remoteBasePath' => $GLOBALS['wgStylePath'],
'localBasePath' => $GLOBALS['wgStyleDirectory'],
),
[edit] colors
The color scheme used in vector is primarily maintained in a bunch of images in ./skins/foobar/images driven by ./skins/foobar/screen.css
- border.png
- color of borders of the contents area
- page-base.png
- background of page apart from contents
- page-fade.png
- color fade at top of page
[edit] Example
See /Example for a working example.
| Language: | English • 中文 |
|---|
