Template:Extension/zh

  {{Documentation|content= {{intricate template}} {{lua|Module:Extension|Module:ExtensionJson|Module:String}} {{Uses TemplateStyles|Template:Infobox/styles.css|Template:Extension/styles.css|Template:Extension/status.css}} 此模板應當加入到此wiki上的所有擴充功能的頁面上（僅主頁面）. 此模板會加入一個很有用的資訊框（見下方）且會自動將擴充功能加入到{{ll|Category:All extensions}}，以及相應的{{ll|Category:Extensions by status|狀態}}與{{ll|Category:Extensions by implementation type|實現類型}}的分類裡面.

用法


内容参数
此段描述控制資訊框內容的參數. 關於templatemode和其他的控制參數，見控制參數. 其他的'type'值均为无效，会导致扩展页面处于Category:Extensions with invalid or missing type分类中.
 *  - 自定义有参数的类模板标记，如
 *  - 自定义类XML标签标记，如
 *  - 自定义无参数的类模板标记，如
 *  - 适用于添加非标准wiki语法的扩展（即添加的语法 不属于 标签、解析器函数、变量）.
 * - 适用于所有，也就是创建、验证、授予/撤销权限或监视用户活动的扩展. 如果您编写的是用户访问类型的扩展，请使用以下更具体的类型：
 * - 监视用户活动（登录、退出、新用户创建等）的扩展
 * - 创建、删除用户，和（或）验证用户身份的扩展
 * - 权限管理系统扩展，如更改权限分配方式、API、维护工具（不包括仅仅为扩展功能添加权限的扩展；相关用途要使用权限参数）
 * - 适用于所有未分类的用户界面扩展.
 *  - 通过注册文件扩展名，使得能在wiki页面上嵌入特定多媒体内容的扩展.
 *  - 提供基础设施以便用户个性化MediaWiki使用体验和（或）帮助管理该基础设施的扩展.
 * - 给用户发送电子邮件、广播消息、提供其他形式社区通知的扩展.
 *  - 加强或修改s的扩展. 包括所有实现了读取、写入、搜索、创建、重命名、删除、重定向、讨论页面的操作的扩展. 不包括相关权限（使用user rights）或日志（使用user activity）.
 * - 为用户搜索和选择页面的扩展.
 * - 添加CSS或JavaScript或通过皮肤框架，实现钩子函数来更改MediaWiki外观的扩展.
 * - 使用Ajax技术的扩展.
 * - 实现类的子类、使用其钩子、修改中一个或多个函数的扩展. 更多参见.
 * other
 * - 添加了新API模块或扩展核心API模块的扩展.
 * - 钩子函数 - 定义一个 新的 钩子 - 若想定义为扩展 使用 的钩子，见下方hook1等
 * - 将表格和（或）字段添加到支持MediaWiki安装的数据库
 * - 取出-{zh-hans:数据; zh-hant:資料;}-
 * - 添加新的文件存储库作为文件后端的扩展
 * - 不是真的扩展，而是作为如何编写扩展的示例
 * - 有新的扩展.
 * - 对底层编程语言的扩展.
 * - 与本地化有关的扩展
 * - 与本地化有关的扩展

注：许多扩展都有多于一个的类型，如果这也适用于您编写的扩展，将 替换为. 每个扩展最多可以被分到6个类型. hook1 hook2 hook3 hook4 ...  此扩展使用的所有钩子的名字 Entering values in this field is a good way to get exposure for your extension and help other developers. Each documented hook will automatically add the extension to a category listing extensions that use that hook. This category is autolinked to each hook page so that programmers can easily find examples of extensions that use a particular hook.

For built-in hooks:
 * use the hook name alone. Please see for values (but omit introductory '/').

For custom hooks defined by extensions:
 * use extensionName/hookName. For a partial list of custom hooks, see Extension hook registry.

For multiple hooks, assign the first hook to hook1, the second to hook2 and so on. newhook1 newhook2 newhook3 newhook4 ... newhook90 name of each hook provided by the extension

You might also want to add the hooks to Extension hook registry. username  The author's username on MediaWiki.org (if they have one). May be omitted, but if present it will be used to link to the author's user & user_talk page. It should be provided without namespace and without s.     The extension author's name, if different from their MediaWiki.org username. 任意文字. If omitted then the 'username' field will be used (if present). description  简短描述 screenshot or logo of extension. It should be provided without namespace and without s.     facultative, size of the image (default size is 220px) 最后版本 date of the last update compatibility policy   (accepted values are master, rel, and ltsrel). Required version of MediaWiki. Most extensions should not need to use this — it defaults to the value of the property of. See also Category:Extensions without MediaWiki version and Category:Extensions with manual MediaWiki version. required version of PHP indicates that the extension requires a database table schema change or a similar action, before the MediaWiki can run. It is a common pitfall: your MediaWiki will stall, if you forgot to run update.php - if the extension requires it. should be set as a value since this assures that the extension does not need update.php to be run and thus avoids uncertainty

Extensions which conform to MediaWiki extension standards come with a schema change script which you need to start manually (once) before starting and accessing the MediaWiki through your browser, and after you copied all the extension files to  and inserted   into "LocalSettings.php", run from the command line:

composer  The extension's Composer package name, in the standard format. It will be automatically included if set in an extension's "composer.json" file (i.e. this parameter is not required in that case). It will be linked to the extension's page on Packagist. table1 table2 table3 table4 ... table30 name of each non-core table used by the extension

Links to a subpage of your extension page. For instance, "table1 = cu_changes" at will link to. Don't list core tables such as or ; only list tables that are added by extensions. license governing use of this extension, as one of the codes found in https://spdx.org/licenses/, e.g.,   or  , etc. download  下載連結： Git 、 WikimediaDownload. repo  Name of the Gerrit repository the extension's code is stored in, if different from the page name. Setting this automatically sets download, and allows the template to automatically load data from the appropriate  file. external link to the readme file, e.g. https://phabricator.wikimedia.org/r/browse/mediawiki/extensions/Flow;master;README external link to the changelog file, e.g. Extension:LDAP Authentication/Changelog available parameters for LocalSettings.php any tags your extension uses (e.g. &lt;tag1&gt;, &lt;tag2&gt;). rights added by the extension. Not to be confused with the license! Rights are such as ' or ', not such as GFDL or LGPL or GPL - those are licenses! namespace in which this extension is used Link to user-help for the extension. If not provided, will look for. If provided, full wikitext link should be given (because you may want to link to e.g. an external page). example, website or screenshot of working extension Additional compatibility information, for instance compatibility charts. It's encouraged to add any client-side compatibility information here too, especially when diverging from expectations of full support for a browser. Optional parameter to link the exact page where (message group id with which) the extension will be translatable on translatewiki.net if enabled. If the default link is incorrect, manually set it to: Bugzilla MediaWiki extension component name Phabricator project name override the page name used for the check usage link.
 * ext-LOWERCASE(NOSPACES(Label as defined in )), aka
 * the parameter you get in the URL after
 * typing the name of the extension in the search/filter box at translatewiki:Special:Translate or
 * searching for its name in languagestats after clicking "expand all".



控制参数
because this isn't an actual extension page and we don't want to add this page to any categories on account of it.
 * nousage - suppresses the 'check usage' link. Link is also suppressed if the page is a subpage; it is not in the Extension: namespace; or if suppressed by 'templatemode=nocats'

If this is left blank, this template will add the host page to Category:All extensions and to one or more additional categories, depending on the values assigned to the Content parameters.



使用資訊框


現有的擴充功能頁面
If you want to add the infobox to an existing page, copy and paste the code at the top of this page.



建立新的擴充功能頁面
If you want to create a new extension page, enter the name below and click the button. A new page will be created with the infobox template already in place.



增强这个模版
If you would like to improve on this template, thanks! This is a complicated template so here is some help along the way:



创建扩展按钮
To improve the create extension button behavior:


 * : The boilerplate extension that is preloaded into newly-created pages.
 * : An input box that can be inserted wherever you want users to easily create extensions. For documentation on the tag, please see.



資訊框引數
一般情況下：


 * 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.

To change/correct/add to the implementation type parameters:
 * Check the talk page - there have been some extensive discussions about this field.
 * The valid types and what they link to are defined at Module:Extension

To change the behavior of the hook parameters:


 * Template:Extension/HookInUse: Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with Template:Foreach.
 * Template:Extension/HookInUseNoCats: Used instead of Template:Extension/HookInUse when this template is used in . Templates used with Template:Foreach can only take one parameter so we need to wrap the call to Template:Extension/HookInUse with another template that sets the mode.

Test case
See if the following pages are still ok, after edited this template.
 * Extension:Description2
 * Template:Extension

}} Maintenance: vulnerabilities, archived