[go: nahoru, domu]

Jump to content

模板:Skin/zh

問題追蹤器: [[phab:tag/{{{phabricator}}}/|#{{{phabricator}}}]]
From mediawiki.org
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 {{模板: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 分類:所有外觀 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:

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.