Template: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 {{Template: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 Category:所有皮肤 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 Extension:输入框 . - 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.