模板:Skin/zh
使用Lua |
This template uses TemplateStyles: |
此模板應添加到本wiki上的所有皮膚頁面(但僅限於主頁)以顯示信息框並對皮膚進行分類。
用法
複製貼上: {{Skin|templatemode = |name = |localised name = |status = |hook1 = |hook2 = |newhook1 = |newhook2 = |username = |author = |description = |image = |imagesize = |version = |update = |version preview = |update preview = |compatibility policy = |mediawiki = |php = |composer = |license = |download = |readme = |changelog = |example = |parameters = |compatibility = |bugzilla = |phabricator = |vagrant-role = }} 關於參數值的說明,請見下方。 |
|
內容參數
此段描述控制資訊框內容的參數。
關於templatemode
和其他的控制參數,請見控制參數。
參數 | 描述 |
---|---|
name | 皮膚名 |
localised name | 用於本地化皮膚名的源文本
指定與 |
status | 目前發行狀態
有效值:
如果狀態填寫為以上值以外的值,其將會被忽略,在模板中會展示成預設值「未知」。 |
hook1 hook2 hook3 hook4 ... hook90 |
此擴展使用的所有鈎子的名字
在此字段添加值有助於擴展開放,幫助其他開發者。 每個有文檔的鈎子會自動將擴展添加到使用相應鈎子的擴展的分類。 此分類會自動連結到每個鈎子頁面,程式設計師可以藉此輕鬆找到某擴展使用的某鈎子的示例。 對於內置鈎子:
For custom hooks defined by extensions:
For multiple hooks, assign the first hook to hook1, the second to hook2 and so on. |
newhook1 newhook2 newhook3 newhook4 ... newhook90 |
此擴展提供的所有鈎子的名字 您可能也想向Extension hook registry添加鈎子。 |
username | 作者在MediaWiki.org上的用戶名(若有)。 可以省略,但若存在,則會自動連結到作者的用戶頁和用戶討論頁。 應在沒有命名空間和[[]]的情況下提供。 |
皮膚的作者名,如果和MediaWiki.org上的不同。 任意文字。 若省略,則使用「username」字段(若有值)。 | |
description | 簡述 |
image | 皮膚的截圖或Logo。 應在沒有命名空間和[[]]的情況下提供。 |
imagesize | facultative, size of the image (default size is 220px) |
version | 最後版本 |
update | 最後更新日期 |
compatibility policy | 相容性政策 (可選值有master、rel和ltsrel). (backlog ) |
mediawiki | 要求的MediaWiki版本 |
php | 要求的PHP版本 |
license | license(s) governing use of this skin, e.g. GPL |
download | 下載連結: Use {{模板:WikimediaDownloadSkin }} or {{Github下載 }}. |
readme | 指向readme文件的外部連結 |
changelog | 指向changelog文件的外部連結 |
parameters | LocalSettings.php的可用參數 |
example | 示例,使用此皮膚的網站或相關截圖 |
compatibility | 相容性表格 |
bugzilla | Bugzilla MediaWiki skin component name |
控制參數
參數 | 描述 |
---|---|
templatemode | Controls auto-categorisation of host page.
Normally left blank. Alternate values are:
If this is left blank, this template will add the host page to 分類:所有外觀 and to one or more additional categories, depending on the values assigned to the Content parameters. subpage; it is not in the Skin: namespace; or if suppressed by 'templatemode=nocats' |
Categories added
This template will automatically add the pages it is used on to the Category:All skins category.
In addition, it will categorise the page based on the value of the status parameter:
- unstable: Category:Unstable skins
- experimental: Category:Experimental skins
- stable: Category:Stable skins
- beta: Category:Beta status skins
- unmaintained: Category:Unmaintained skins
- otherwise: Category:Skins with unknown status
使用資訊框
現有的皮膚頁面
如果您想將此信息框添加到一個現有的頁面,複製並粘貼此頁面頂部的代碼。
建立新的外觀頁面
如果您想創建一個新的皮膚頁面,輸入皮膚名到下方並點擊按鈕。 這將創建一個新頁面,其中包含已經導入的信息框模板。
Please replace "TheSkin" with your skin's name:
MediaWiki is an open-source project and users are encouraged to make any MediaWiki skins under an Open Source Initiative (OSI) approved GPLv2 compatible license (including MIT, BSD, PD). For skins that have a compatible license, you can request commit access to the MediaWiki source repository for skins.
A developer sharing their code in the code repository should expect:
- Feedback / Criticism / Code reviews
- Review and comments by other developers on things like framework use, security, efficiency and usability.
- Developer tweaking
- Other developers modifying your submission to improve or clean-up your code to meet new framework classes and methods, coding conventions and translations.
- Future versions by other developers
- New branches of your code being created by other developers as new versions of MediaWiki are released.
- Credit
- Credit for your work being preserved in future versions
- Similarly, you should credit the developers of any skins whose code you borrow from.
Any developer who is uncomfortable with any of these actions occurring should not host their code in the code repository. You are still encouraged to create a summary page for your skin on the wiki to let people know about the skin, and where to download it.
Enhancing this template
If you would like to improve on this template, thanks!
This is a complicated template so here is some help along the way:
In addition, Template:Skin/Sample stores the boiler plate that is preloaded into newly created pages and contains some basic documentation on how to fill in the template parameters.
It needs to be kept in sync with the documentation.
The Create skin button
To improve the create skin button behavior:
- Template:Skin/Sample — The boilerplate skin that is preloaded into newly-created pages.
- Template:Skin/CreateSkinInputBox — An input box that can be inserted wherever you want users to easily create skins. For documentation on the
<inputbox>
tag, please see 擴充功能:輸入框 . - Skin:TheSkin: — Defines a placeholder, in case a user accidentally hits the create button without changing the skin name.
Infobox parameters
In general:
- To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays. If you add a parameter, please be sure to also add it to the content parameter documentation and link its label to that documentation.
Test cases
See if the following pages are still ok, after editing this template.