This page is a translated version of the page Template:Skin and the translation is 75% complete.
Outdated translations are marked like this.
模板文档

此模板应添加到本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         =
}}

关于参数值的说明,请见下方

MediaWiki皮肤手冊 - 分类
{{{localised name}}}
发行状态: 未知
描述 {{{description}}}
作者 SomeAuthor
最新版本 {{{version}}} ({{{update}}})
最新预览版本 {{{version preview}}} ({{{update preview}}})
兼容性政策 无效
MediaWiki {{{mediawiki}}}
PHP {{{php}}}
Composer {{{composer}}}
许可协议 {{{license}}}
下载 {{{download}}}
{{{readme}}}
{{{changelog}}}
示例 {{{example}}}
参数
{{{parameters}}}
{{{compatibility}}}
翻译Skin皮肤(如在translatewiki.net可用)
Vagrant角色 {{{vagrant-role}}}
问题 : [[phab:tag/{{{phabricator}}}|开启的任务]] · 报告错误

內容参数

此段描述控制信息框內容的參數。 關於templatemode和其他的控制參數,请見控制參數

內容参数
参数 描述
name皮肤名
localised name 用于本地化皮肤名的源文本

指定与name相同的值。

之后将被用于本地化名称。
status当前发行状态

有效值:

  • unstable - 损坏 - 不要使用此皮肤
  • experimental - 开发的早期阶段,可能会发生巨大变化
  • beta - 功能稳定但没有完全测试过
  • stable - stable - the skin works in the latest MediaWiki version without any fatal errors.
  • unmaintained - unmaintained - only use if the linked repository is archived or the maintainer has not responded to an enquiry about the maintained status. If using this status, please link to a patch or issue/bug report as a reference using an HTML comment. If the skin is broken use unstable instead.
  • unknown - 默认

如果狀態填寫為以上值以外的值,其將會被忽略,在模板中會展示成預設值「未知」。

hook1
hook2
hook3
hook4
...
hook90
此扩展使用的所有钩子的名字

在此字段添加值有助于扩展开放,帮助其他开发者。 每个有文档的钩子会自动将扩展添加到使用相应钩子的扩展的分类。 此分类会自动链接到每个钩子页面,程序员可以借此轻松找到某扩展使用的某钩子的示例。

对于内置钩子:

  • 单独使用钩子名。 Please see Manual:Hooks for values (but omit introductory '/').

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上的用户名(若有)。 可以省略,但若存在,则会自动链接到作者的用户页和用户讨论页。 应在没有命名空间和[[]]的情况下提供。
author 皮肤的作者名,如果和MediaWiki.org上的不同。 任意文字。 若省略,则使用“username”字段(若有值)。
description 简述
image 皮肤的截图或Logo。 应在没有命名空间和[[]]的情况下提供。
imagesize facultative, size of the image (default size is 220px)
version 最后版本
update最後更新日期
compatibility policy 兼容性政策 (可选值有masterrelltsrel). (backlog )
mediawiki要求的MediaWiki版本
php要求的PHP版本
licenselicense(s) governing use of this skin, e.g. GPL
download下载链接: Use {{Template:WikimediaDownloadSkin }} or {{Github下载 }}.
readme指向readme文件的外部链接
changelog指向changelog文件的外部链接
parametersLocalSettings.php的可用参数
example示例,使用此皮肤的网站或相关截图
compatibility兼容性表格
bugzillaBugzilla MediaWiki skin component name

控制参数

控制参数
参数 描述
templatemodeControls auto-categorisation of host page.

Normally left blank. Alternate values are:

  • nocats - suppresses categorisation. Use this value if you are adding this template to subpages of a skin or to how-to documentation of skins. For example, the usage image above sets templatemode=nocats because this isn't an actual skin page and we don't want to add this page to any categories on account of it.

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:

使用資訊框

現有的皮肤頁面

如果您想将此信息框添加到一个现有的页面,复制并粘贴此页面顶部的代码。

建立新的外觀頁面

如果您想创建一个新的皮肤页面,输入皮肤名到下方并点击按钮。 这将创建一个新页面,其中包含已经导入的信息框模板。

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/SampleThe 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.