- MediaWiki Skins Design
- Richard Carter
- 381字
- 2021-05-28 17:39:09
Initializing Your Skin
In order to view changes that have made to your skin's design, you need to make a few changes to MediaWiki. We need to inform MediaWiki that we want to view the wiki's content using a different skin from the default, that is, MonoBook.
CSS and Image Files
You will need to create a new directory in the skins
directory, such as skins/yourskinname/
, within your MediaWiki installation directory, where yourskinname
is the name of your new MediaWiki skin.
To keep things simple, we will call our new skin jazzmeet
, and store it in the skins/jazzmeet/ directory
. The primary Cascading Style Sheets (CSS) file for each skin is usually in this skin
directory and is known as main.css
. But it can be changed in the header of your skin's PHP template. For example, the CSS file for our new skin should be located at skins/jazzmeet/main.css
within our wiki's installation directory.
shared.css
in skins/common/
contains styles that are used by all of the skins. We can easily ignore this, as we can overwrite any unwanted style in main.css
.
PHP Template
We need to carry out the following steps before we can start skinning MediaWiki:
- Create a PHP file named
YourSkinName.php
. in theskins/
directory. - Open this file and edit the line that reads-
class SkinMonoBook extends SkinTemplate
to readclass YourSkinName extends SkinTemplate
, but replaceYourSkinName
with the name of your new skin. - Find the line that reads
class MonoBookTemplate extends QuickTemplate
; to readclass YourSkinNameTemplate extends QuickTemplate
; Again, replace YourSkinName with the name of your new skin. - Finally, you need to inform MediaWiki about your skin by inserting the following into the file:
$this->skinname = 'yourskinname'; $this->stylename = 'yourskinname'; $this->template = 'YourSkinNameTemplate';
Be sure to replace your skin name with the directory's name (for example, $this->skinname = 'jazzmeet'
), and YourSkinName
with the name of your new skin as it is in the PHP filename.
- GIMP 2.6 cookbook
- 商用級(jí)AIGC繪畫(huà)創(chuàng)作與技巧(Midjourney+Stable Diffusion)
- 從零開(kāi)始學(xué)LATEX
- 使用AADL的模型基工程:SAE體系結(jié)構(gòu)分析和設(shè)計(jì)語(yǔ)言入門(mén)
- UG NX 8.0基礎(chǔ)與實(shí)例教程
- Wordpress 3 Complete
- Autodesk Ecotect Analysis 2011綠色建筑分析應(yīng)用
- 老郵差數(shù)碼照片處理技法 圖層篇
- 中文版After Effects CC 2018 動(dòng)漫、影視特效后期合成秘技
- 中文版Photoshop CS6經(jīng)典自學(xué)教程
- Photoshop CC 2017 淘寶美工設(shè)計(jì)實(shí)例教程
- 新印象Premiere短視頻拍攝+剪輯+特效關(guān)鍵技術(shù)
- Adobe創(chuàng)意大學(xué)InDesign產(chǎn)品專(zhuān)家認(rèn)證標(biāo)準(zhǔn)教材(CS6修訂版)
- 中文版3ds Max 2022基礎(chǔ)教程
- Getting Started with Oracle BPM Suite 11gR1 – A Hands/On Tutorial