Template:Extension
<languages/>
Template:Intricate template Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value). Template:Uses TemplateStyles <translate> This template should be added to all extension pages on this wiki (but only the main page).</translate> <translate> It will add a useful infobox (see below) and will automatically add the extension to <tvar name=1>Category:All extensions</tvar>, along with the appropriate {{<tvar name=2>ll|Category:Extensions by status</tvar>|status}} and {{<tvar name=3>ll|Category:Extensions by implementation type</tvar>|implementation type}} categories.</translate> It autofills some fields of the infobox with extension data collected by wikitech:Tool:Extjsonuploader.
<translate>
Usage
</translate>
|
<translate> Copy and paste:</translate> {{Extension |templatemode =
|name =
|status =
|type1 =
|type2 =
|hook1 =
|hook2 =
|newhook1 =
|newhook2 =
|username =
|author =
|maintainer =
|description =
|image =
|imagesize =
|version =
|update =
|version preview =
|update preview =
|compatibility policy =
|mediawiki =
|php =
|needs-updatephp =
|composer =
|virtual domain =
|table1 =
|table2 =
|license =
|download =
|show-popularity =
|repo =
|readme =
|changelog =
|help =
|example =
|namespace =
|parameters =
|tags =
|rights =
|compatibility =
|phabricator =
|translate =
|vagrant-role =
}}
<translate> For help with parameter values, see [[<tvar name=1>#Content parameters</tvar>|below]].</translate> |
Template:Ptag
Lua error: callParserFunction: function "#translation" was not found.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<translate>
Content parameters
</translate> <translate> This section describes parameters that govern infobox content.</translate> <translate> For help with <tvar name=1>templatemode</tvar> and other control parameters, please see [[<tvar name=2>#Control parameters</tvar>|Control parameters]].</translate>
| <translate> Parameter</translate> | <translate> Description</translate> |
|---|---|
| name | <translate> name of the extension</translate> |
| status |
<translate> current release status</translate> <translate> One of:</translate>
<translate> If the status is anything other than the above, it will be ignored and the default value of 'Unknown' will be displayed in the template instead.</translate> <translate> In cases where the value is omitted, it will be categorised as [[<tvar name=1>Special:MyLanguage/Category:extensions with unknown status</tvar>|unknown]].</translate> <translate> In cases where the value is invalid, it will be placed in a [[<tvar name=1>Special:MyLanguage/Category:extensions with invalid status</tvar>|special category]] so that the error can be caught and fixed.</translate> <translate>
|
| type1 type2 type3 type4 type5 type6 | <translate> implementation type</translate>
<translate> The implementation strategy(s) employed in building this extension.</translate> <translate> This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns.</translate> <translate> Although the values of this parameter sometimes coincide with the use case or purpose of an extension, that is not reason for this parameter.</translate> <translate> If the values you have chosen for this parameter do not adequately identify the purpose or possible use cases, we recommend you add additional [[<tvar name=1>Special:MyLanguage/Help:Categories</tvar>|category links]] as needed.</translate> <translate> Allowed values for the type1, type2, ... parameters are:</translate>
<translate> Any other value for 'type' is invalid, and will cause the extension to be placed in <tvar name=typemissingcat>[[:Category:Extensions with invalid or missing type{{#translation:}}]]</tvar>.</translate> <translate> Note: Many extensions have more than one type, if this applies to yours, replace <tvar name=type>|type=</tvar> with <tvar name=value>|type1=, |type2=, |type3=</tvar>… You may define up to six types for an extension.</translate> |
| hook1 hook2 hook3 hook4 ... |
<translate> name of each hook used by the extension</translate>
<translate> Entering values in this field is a good way to get exposure for your extension and help other developers.</translate> <translate> Each documented hook will automatically add the extension to a category listing extensions that use that hook.</translate> <translate> This category is autolinked to each hook page so that programmers can easily find examples of extensions that use a particular hook.</translate> <translate> For multiple hooks, assign the first hook to hook1, the second to hook2 and so on.</translate> |
| newhook1 newhook2 newhook3 newhook4 ... newhook90 |
<translate> name of each hook provided by the extension You might also want to add the hooks to <tvar name=exthooks>Extension hook registry</tvar>. </translate> |
| username | <translate> The author's username on MediaWiki.org (if they have one).</translate> <translate> May be omitted, but if present it will be used to link to the author's user & user_talk page.</translate> <translate> It should be provided without namespace and without <tvar name=1>[[]]</tvar>s.</translate> |
| Template:Visible anchor | <translate> The extension author's name, if different from their MediaWiki.org username.</translate> <translate> Free text.</translate> <translate> If omitted then the 'username' field will be used (if present).</translate> |
| Template:Visible anchor | <translate> The extension's current maintainer.</translate> <translate> May be omitted, but if present it will be used to link to the maintainer's user & user_talk page, if the userpage exists.</translate> <translate> It should be provided without namespace and without <tvar name=1>[[]]</tvar>s.</translate> |
| description | <translate> short description</translate> |
| Template:Visible anchor | <translate> Screenshot or logo of extension.</translate> <translate> It should be provided without namespace and without <tvar name=1>[[]]</tvar>s.</translate> |
| Template:Visible anchor | <translate> Facultative, size of the image without adding px, e.g. 360 (default size is 300px)</translate> |
| Template:Visible anchor | <translate> Last version</translate> |
| Template:Visible anchor | <translate> Date of the last update</translate> |
| Template:Visible anchor | <translate> Preview version</translate> |
| Template:Visible anchor | <translate> Date of the last update to the preview version</translate> |
| compatibility policy | <translate> {{<tvar name=1>ll|Compatibility#mediawiki_extensions</tvar>|Compatibility policy}} (accepted values: <tvar name=4>master, main, rel, ltsrel</tvar>).</translate> (<translate> backlog</translate>) |
| Template:Visible anchor | <translate> Required version of MediaWiki.</translate> <translate> Most extensions should not need to use this — it defaults to the value of the <tvar name=1>Template:Manual</tvar> property of <tvar name=2>Template:Manual</tvar>.</translate> <translate> See also <tvar name=1>Category:Extensions without MediaWiki version</tvar> and <tvar name=2>Category:Extensions with manual MediaWiki version</tvar>.</translate> |
| Template:Visible anchor | <translate> Required version of PHP</translate> |
| Template:Visible anchor |
<translate> <tvar name=yes> <translate> <tvar name=1> <translate>
Extensions that 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 <tvar name=target><syntaxhighlight lang=php inline>$IP/extensions/ExtensionName</syntaxhighlight></tvar> and inserted <tvar name=code><syntaxhighlight lang=php inline>wfLoadExtension( "ExtensionName" );</syntaxhighlight></tvar> into
|
| composer | <translate> The extension's Composer package name, in the [<tvar name=url>https://getcomposer.org/doc/04-schema.md#name</tvar> standard format].</translate> <translate> It will be automatically included if set in an extension's <tvar name=1>composer.json</tvar> file (i.e. this parameter is not required in that case).</translate> <translate> It will be linked to the extension's page on [<tvar name=url>https://packagist.org/</tvar> Packagist].</translate> |
| virtual domain | <translate> The {{<tvar name=1>ll|Manual:$wgVirtualDomainsMapping</tvar>|virtual database domain}} used by the extension.</translate> |
| table1 table2 table3 table4 ... table30 | <translate> name of each non-core table used by the extension</translate> <translate> Links to a subpage of your extension page. For instance, "<tvar name=table1>table1 = cu_changes</tvar>" at <tvar name=url1>Extension:CheckUser</tvar> will link to <tvar name=url2>Extension:CheckUser/cu_changes table</tvar>. Don't list core tables such as <tvar name=page>page</tvar> or <tvar name=revision>revision</tvar>; only list tables that are added by extensions.</translate> |
| Template:Visible anchor | <translate> License governing use of this extension, as one of the codes found in <tvar name=url>https://spdx.org/licenses/</tvar>, e.g. <tvar name=later2>GPL-2.0-or-later</tvar>, <tvar name=only2>GPL-2.0-only</tvar> or <tvar name=later3>GPL-3.0-or-later</tvar>, etc.</translate> |
| download | <translate> link to the download : <tvar name=url>Git</tvar>, <tvar name=wikimediadownload>{{[[Template:WikimediaDownload{{#translation:}}|WikimediaDownload{{#translation:}}]]}}</tvar>. </translate> |
| show-popularity | enable/disable popularity fields (Quarterly downloads and Public wikis using the extension) based on Template:Extension/popularity.json, which may not reflect real usage |
| repo | <translate> Name of the Gerrit repository the extension's code is stored in, if different from the page name. Setting this automatically sets <tvar name=2>|download=</tvar>, and allows the template to automatically load data from the appropriate <tvar name=1>extension.json</tvar> file.</translate> |
| Template:Visible anchor | <translate> External link to the <tvar name=readme>README</tvar> file, e.g. <tvar name=url>https://phabricator.wikimedia.org/r/browse/mediawiki/extensions/Flow;master;README</tvar></translate> |
| Template:Visible anchor | <translate> External link to the changelog file, e.g. <tvar name=url>Extension:GeoGebra/Changelog</tvar>.</translate> |
| Template:Visible anchor | <translate> Link to user-help for the extension.</translate> <translate> If not provided, will look for {{<tvar name=1>tmpl|0=Help:Extension:$1</tvar>|ExtensionName}}.</translate> <translate> If provided, full wikitext link should be given (because you may want to link to e.g. an external page).</translate> |
| Template:Visible anchor | <translate> Example, website or screenshot of working extension.</translate> |
| Template:Visible anchor | <translate> [[<tvar name=1>Special:MyLanguage/Manual:Namespace</tvar>|Namespace]] in which this extension is used.</translate> |
| Template:Visible anchor | <translate> Available parameters for <tvar name=1>LocalSettings.php</tvar>.</translate> |
| Template:Visible anchor | <translate> Any tags your extension uses (e.g. <tvar name=tags><tag1>, <tag2></tvar>).</translate> |
| Template:Visible anchor | <translate> [[<tvar name=1>Special:MyLanguage/Manual:User rights</tvar>|Rights]] added by the extension. Not to be confused with the license! Rights are such as <tvar name=makebot>makebot</tvar> or <tvar name=desysop>desysop</tvar>, not such as GFDL or LGPL or GPL - those are licenses!</translate> |
| Template:Visible anchor | <translate> Additional compatibility information, for instance compatibility charts. It's encouraged to add any client-side compatibility information here too, especially when diverging from [[<tvar name=1>Special:MyLanguage/Compatibility#Browsers</tvar>|expectations of full support for a browser]].</translate> |
| Template:Visible anchor | <translate> <tvar name=1>Bugzilla</tvar> MediaWiki extension component name</translate> |
| Template:Visible anchor | <translate> <tvar name=1>Phabricator</tvar> project name</translate> |
| Template:Visible anchor |
<translate> Optional parameter to link the exact page where ([[<tvar name=1>Special:MyLanguage/Help:Extension:Translate/Glossary</tvar>|message group id]] with which) the extension will be translatable on <tvar name=translatewiki>translatewiki.net</tvar> if enabled. If the default link is incorrect, manually set it to:
</translate> |
| Template:Visible anchor | <translate> <tvar name=1>MediaWiki-Vagrant</tvar> role</translate> |
| Template:Visible anchor | <translate> Override the page name used for the check usage link.</translate> |
<translate>
Control parameters
</translate>
| <translate> Parameter</translate> | <translate> Description</translate> |
|---|---|
| templatemode |
<translate> Controls auto-categorisation of host page. Normally left blank. Alternate values are: </translate>
|
<translate>
Using the infobox
Existing extension pages
If you want to add the infobox to an existing page, copy and paste the code at the [[<tvar name=1>#CutAndPaste</tvar>|top of this page]]. </translate>
Template:Anchor <translate>
Create a new extension page
</translate> <translate> If you want to create a new extension page, enter the name below and click the button.</translate> <translate> A new page will be created with the infobox template already in place.</translate>
Template:Extension/CreateExtensionInputBox
<translate>
Enhancing this template
</translate> <translate> If you would like to improve on this template, thanks!</translate> <translate> This is a complicated template so here is some help along the way:</translate>
<translate>
The Create extension button
To improve the create extension button behavior:
- <tvar name=extsample>Template:Extension/Sample</tvar>: The boilerplate extension that is preloaded into newly-created pages.
- <tvar name=extinpbox>Template:Extension/CreateExtensionInputBox</tvar>: An input box that can be inserted wherever you want users to easily create extensions. For documentation on the <tvar name=tagvalue>
<inputbox></tvar> tag, please see <tvar name=url>Extension:InputBox</tvar>.
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 [[<tvar name=1>Special:MyLanguage/Template:Extension#Content parameters</tvar>|content parameter documentation]] and link its label to that documentation.
To change/correct/add to the implementation type parameters:
- Check the [[<tvar name=url>Template_talk:Extension</tvar>|talk page]] - there have been some extensive discussions about this field.</translate>
<translate>
- The valid types and what they link to are defined at <tvar name=1>Module:Extension</tvar>
To change the behavior of the hook parameters:
- <tvar name=hookinuse>Template:Extension/HookInUse</tvar>: Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with <tvar name=foreach>Template:Foreach</tvar>.
- <tvar name=hookinusenocats>Template:Extension/HookInUseNoCats</tvar>: Used instead of <tvar name=hookinuse>Template:Extension/HookInUse</tvar> when this template is used in <tvar name=nocats>
templatemode=nocats</tvar>. Templates used with <tvar name=feach>Template:Foreach</tvar> can only take one parameter so we need to wrap the call to <tvar name=hookuse>Template:Extension/HookInUse</tvar> with another template that sets the mode.
Test case
See if the following pages are still ok after editing this template.</translate>
[[Category:Template documentation pages{{#translation:}}]]
Maintenance: vulnerabilities, archived
[[Category:Infobox templates{{#translation:}}|Extension]]