Difference between revisions of "Template:Extension"
Jump to navigation
Jump to search
m
new tvar syntax
>Kghbln (???) |
>Shirayuki m (new tvar syntax) |
||
Line 128: | Line 128: | ||
-->|master=<translate><!--T:250--> Master maintains backwards compatibility.</translate><!-- | -->|master=<translate><!--T:250--> Master maintains backwards compatibility.</translate><!-- | ||
-->|rel=<translate><!--T:251--> Snapshots releases along with MediaWiki.</translate> <translate><!--T:252--> Master is not backwards compatible.</translate><!-- | -->|rel=<translate><!--T:251--> Snapshots releases along with MediaWiki.</translate> <translate><!--T:252--> Master is not backwards compatible.</translate><!-- | ||
-->|ltsrel= <translate><!--T:253--> Follows the [[<tvar | -->|ltsrel= <translate><!--T:253--> Follows the [[<tvar name=1>Special:MyLanguage/Version lifecycle#Release policy</tvar>|MediaWiki version lifecycle]].</translate> <translate><!--T:254--> Master is not backwards compatible.</translate><!-- | ||
-->|#default=<span class="error"><translate><!--T:47--> invalid</translate></span>{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{#translation:}}||[[Category:Extensions without a compatibility policy]]}}}}<!-- | -->|#default=<span class="error"><translate><!--T:47--> invalid</translate></span>{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{#translation:}}||[[Category:Extensions without a compatibility policy]]}}}}<!-- | ||
-->}}</td> | -->}}</td> | ||
Line 148: | Line 148: | ||
{{#if:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}| | {{#if:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}| | ||
<tr> | <tr> | ||
<td>{{ll|Template:Extension#needs-updatephp|2=<abbr title="<translate nowrap><!--T:17--> <tvar | <td>{{ll|Template:Extension#needs-updatephp|2=<abbr title="<translate nowrap><!--T:17--> <tvar name=com>'php update.php'</tvar> needed after installation</translate>">'''<translate><!--T:18--> Database changes</translate>'''</abbr>}}</td> | ||
<td>{{#switch:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}|yes|Yes=<translate><!--T:38--> Yes</translate>|no|No=<translate><!--T:39--> No</translate>|{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}}}</td> | <td>{{#switch:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}|yes|Yes=<translate><!--T:38--> Yes</translate>|no|No=<translate><!--T:39--> No</translate>|{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}}}</td> | ||
</tr> | </tr> | ||
Line 324: | Line 324: | ||
<tr> | <tr> | ||
<td colspan="2" style="text-align:center;"> | <td colspan="2" style="text-align:center;"> | ||
<translate><!--T:32--> [[<tvar | <translate><!--T:32--> [[<tvar name=1>translatewiki:Special:Translate/{{{translate|ext-{{lc:{{#invoke:String|replace|{{PAGENAME:{{translatable}}}}| |}}}}}}}</tvar>|Translate the <tvar name=2>{{PAGENAME:{{translatable}}}}</tvar> extension]] {{<tvar name=3>#if:{{{translate|}}}|</tvar>|if it is available at translatewiki.net}}</translate></td> | ||
</tr>}}<!-- | </tr>}}<!-- | ||
Note: this next check suppresses the 'Check usage' link if page is: a subpage, not in Extension: namespace, or if suppressed by 'templatemode=nocats' or 'nousage=true'. | Note: this next check suppresses the 'Check usage' link if page is: a subpage, not in Extension: namespace, or if suppressed by 'templatemode=nocats' or 'nousage=true'. | ||
Line 340: | Line 340: | ||
<tr> | <tr> | ||
<td colspan="2" style="text-align:center;"> | <td colspan="2" style="text-align:center;"> | ||
<span style="white-space:nowrap"><translate><!--T:33--> [[<tvar | <span style="white-space:nowrap"><translate><!--T:33--> [[<tvar name=1>wikiapiary:Extension:{{{CheckUsageNameOverride|{{BASEPAGENAMEE}}}}}</tvar>|Check usage and version matrix.]]</translate></span> | ||
</td> | </td> | ||
</tr> | </tr> | ||
Line 383: | Line 383: | ||
{{Uses TemplateStyles|Template:Extension/styles.css}} | {{Uses TemplateStyles|Template:Extension/styles.css}} | ||
<translate><!--T:48--> This template should be added to all extension pages on this wiki (but only the main page).</translate> | <translate><!--T:48--> This template should be added to all extension pages on this wiki (but only the main page).</translate> | ||
<translate><!--T:49--> It will add a useful infobox (see below) and will automatically add the extension to <tvar | <translate><!--T:49--> It will add a useful infobox (see below) and will automatically add the extension to <tvar name=1>{{ll|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> | ||
<translate> | <translate> | ||
Line 436: | Line 436: | ||
}}</pre> | }}</pre> | ||
<translate><!--T:52--> For help with parameter values, see [[<tvar | <translate><!--T:52--> For help with parameter values, see [[<tvar name=1>#Content parameters</tvar>|below]].</translate></td> | ||
<td align="right">{{Extension |templatemode=nocats | <td align="right">{{Extension |templatemode=nocats | ||
|name = {{{name}}} | |name = {{{name}}} | ||
Line 483: | Line 483: | ||
</translate> | </translate> | ||
<translate><!--T:54--> This section describes parameters that govern infobox content.</translate> | <translate><!--T:54--> This section describes parameters that govern infobox content.</translate> | ||
<translate><!--T:55--> For help with <tvar | <translate><!--T:55--> For help with <tvar name=1>'''templatemode'''</tvar> and other control parameters, please see ''[[<tvar name=2>#Control parameters</tvar>|Control parameters]]''.</translate> | ||
<!-- BEFORE YOU EDIT THIS: | <!-- BEFORE YOU EDIT THIS: | ||
span ids on each parameter are used by the code in Template:Extension. | span ids on each parameter are used by the code in Template:Extension. | ||
Line 512: | Line 512: | ||
<translate><!--T:160--> 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><!--T:160--> 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><!--T:161--> In cases where the value is omitted, it will be categorized as [[<tvar | <translate><!--T:161--> In cases where the value is omitted, it will be categorized as [[<tvar name=1>Special:MyLanguage/Category:extensions with unknown status</tvar>|unknown]].</translate> | ||
<translate><!--T:162--> In cases where the value is invalid, it will be placed in a [[<tvar | <translate><!--T:162--> 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> | <translate> | ||
<!--T:163--> | <!--T:163--> | ||
* [[<tvar | * [[<tvar name=1>Special:MyLanguage/Extension status</tvar>|release status colour scheme]]</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 524: | Line 524: | ||
<translate><!--T:165--> This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns.</translate> | <translate><!--T:165--> This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns.</translate> | ||
<translate><!--T:166--> 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><!--T:166--> 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><!--T:167--> If the values you have chosen for this parameter do not adequately identify the [[w:Requirements|purpose]] or possible [[w:Use case|use case]]s, we recommend you add additional [[<tvar | <translate><!--T:167--> If the values you have chosen for this parameter do not adequately identify the [[w:Requirements|purpose]] or possible [[w:Use case|use case]]s, we recommend you add additional [[<tvar name=1>Special:MyLanguage/Help:Categories</tvar>|category links]] as needed.</translate> | ||
<translate><!--T:168--> Allowed values for the '''type1''', '''type2''', ... parameters are:</translate> | <translate><!--T:168--> Allowed values for the '''type1''', '''type2''', ... parameters are:</translate> | ||
* '''''{{ll|Category:Parser extensions|parser}}''''' - <translate><!--T:213--> catchall for uncategorized [[<tvar | * '''''{{ll|Category:Parser extensions|parser}}''''' - <translate><!--T:213--> catchall for uncategorized [[<tvar name=1>Special:MyLanguage/Manual:Extending wiki markup</tvar>|parser extensions]].</translate> <translate><!--T:214--> If you have written a parser extension, please use one of the following more specific types:</translate> | ||
** ''{{ll|Category:ContentHandler extensions|contenthandler}}'' - <translate><!--T:215--> Extensions using <tvar | ** ''{{ll|Category:ContentHandler extensions|contenthandler}}'' - <translate><!--T:215--> Extensions using <tvar name=1>{{ll|Manual:ContentHandler|ContentHandler}}</tvar>.</translate> | ||
** ''{{ll|Category:Link markup extensions|link}}'' - <translate><!--T:216--> customized [[<tvar | ** ''{{ll|Category:Link markup extensions|link}}'' - <translate><!--T:216--> customized [[<tvar name=1>Special:MyLanguage/Manual:Extending wiki markup</tvar>|link markup]], e.g. <tvar name=2><code><nowiki>[[</nowiki>...]]</code></tvar></translate> | ||
** ''{{ll|Category:Parser function extensions|parser function}}'' - <translate><!--T:217--> custom [[<tvar | ** ''{{ll|Category:Parser function extensions|parser function}}'' - <translate><!--T:217--> custom [[<tvar name=1>Special:MyLanguage/Manual:Parser functions</tvar>|parameterized template markup]], e.g. <tvar name=2><code><nowiki>{{</nowiki>''#name:'' ... <nowiki>}}</nowiki></code></tvar></translate> | ||
** ''{{ll|Category:Tag extensions|tag}}'' - <translate><!--T:218--> [[<tvar | ** ''{{ll|Category:Tag extensions|tag}}'' - <translate><!--T:218--> [[<tvar name=1>Special:MyLanguage/Manual:Tag extensions</tvar>|custom XML tag markup]], e.g. <tvar name=2><code><nowiki><</nowiki>''tagname''>...<nowiki></</nowiki>''tagname''></code></tvar></translate> | ||
** ''{{ll|Category:Variable extensions|variable}}'' - <translate><!--T:219--> custom [[<tvar | ** ''{{ll|Category:Variable extensions|variable}}'' - <translate><!--T:219--> custom [[<tvar name=1>Special:MyLanguage/Manual:Variables</tvar>|unparameterized template markup]], e.g. <tvar name=2><code><nowiki>{{NAME}}</nowiki></code></tvar></translate> | ||
** ''{{ll|Category:Extended syntax extensions|extended syntax}}'' - <translate><!--T:220--> Extensions that add non-standard wiki syntax (i.e. <em>not</em> [[<tvar | ** ''{{ll|Category:Extended syntax extensions|extended syntax}}'' - <translate><!--T:220--> Extensions that add non-standard wiki syntax (i.e. <em>not</em> [[<tvar name=1>Special:MyLanguage/Manual:Tag extensions</tvar>|tags]], [[<tvar name=2>Special:MyLanguage/Manual:Parser functions</tvar>|parser functions]], or [[<tvar name=3>Special:MyLanguage/Manual:Variables</tvar>|variables]]).</translate> | ||
*: | *: | ||
* {{ll|Category:User access extensions|'''''access'''''}} - <translate><!--T:169--> catchall for <tvar | * {{ll|Category:User access extensions|'''''access'''''}} - <translate><!--T:169--> catchall for <tvar name=1>{{ll|Manual:User access extensions|nsp=0}}</tvar>, that is, extensions that create, authenticate, grant permissions, revoke permissions, or monitor the activity of users. If you have written an access extension, please use one of the following more specific types:</translate> | ||
** {{ll|Category:User activity extensions|''user activity''}} - <translate><!--T:221--> extensions that monitor user activity (logins, logouts, new user creation, etc.)</translate> | ** {{ll|Category:User activity extensions|''user activity''}} - <translate><!--T:221--> extensions that monitor user activity (logins, logouts, new user creation, etc.)</translate> | ||
** {{ll|Category:User identity extensions|''user identity''}} - <translate><!--T:222--> extensions that create and delete users, and/or verify the identity of a user</translate> | ** {{ll|Category:User identity extensions|''user identity''}} - <translate><!--T:222--> extensions that create and delete users, and/or verify the identity of a user</translate> | ||
** {{ll|Category:User rights extensions|''user rights''}} - <translate><!--T:223--> extensions to the rights management system, e.g. changes to the way rights are assigned, API, maintenance tools (does not include extensions that merely name the rights needed to use the features of that extension; for this purpose use the [[<tvar | ** {{ll|Category:User rights extensions|''user rights''}} - <translate><!--T:223--> extensions to the rights management system, e.g. changes to the way rights are assigned, API, maintenance tools (does not include extensions that merely name the rights needed to use the features of that extension; for this purpose use the [[<tvar name=1>#rights</tvar>|rights parameter]])</translate> | ||
* {{ll|Category:User interface extensions|'''''interface'''''}} - <translate><!--T:170--> catchall for uncategorized user interface extensions.</translate> | * {{ll|Category:User interface extensions|'''''interface'''''}} - <translate><!--T:170--> catchall for uncategorized user interface extensions.</translate> | ||
** ''{{ll|Category:Media handling extensions|media}}'' - <translate><!--T:232--> extensions that permit the embedding of multimedia content on wiki pages by registering a file extension with <tvar | ** ''{{ll|Category:Media handling extensions|media}}'' - <translate><!--T:232--> extensions that permit the embedding of multimedia content on wiki pages by registering a file extension with <tvar name=1>{{ll|Manual:$wgMediaHandlers|$wgMediaHandlers}}</tvar>.</translate> | ||
** ''{{ll|Category:Personalization extensions|mywiki}}'' - <translate><!--T:233--> extensions that provide infrastructure so that users may personalize their MediaWiki experience and/or assist in the management of that infrastructure</translate> | ** ''{{ll|Category:Personalization extensions|mywiki}}'' - <translate><!--T:233--> extensions that provide infrastructure so that users may personalize their MediaWiki experience and/or assist in the management of that infrastructure</translate> | ||
** {{ll|Category:Notification extensions|''notify''}} - <translate><!--T:234--> extensions that email users, broadcast messages and provide other forms of community notification</translate> | ** {{ll|Category:Notification extensions|''notify''}} - <translate><!--T:234--> extensions that email users, broadcast messages and provide other forms of community notification</translate> | ||
** ''{{ll|Category:Page action extensions|''page action''}}'' - <translate><!--T:235--> extensions that enhance or modify <tvar | ** ''{{ll|Category:Page action extensions|''page action''}}'' - <translate><!--T:235--> extensions that enhance or modify <tvar name=pageaction>{{ll|Manual:Page action|page action}}</tvar>s. This includes anything that implements an action that reads, writes, searches for, creates, renames, deletes, redirects or discusses a page. It does not include rights (use <tvar name=userrights>''user rights''</tvar>) or logs (use <tvar name=useractivity>''user activity''</tvar>).</translate> | ||
** {{ll|Category:Search extensions|''search''}} - <translate><!--T:236--> extensions that search through and select pages for users.</translate> | ** {{ll|Category:Search extensions|''search''}} - <translate><!--T:236--> extensions that search through and select pages for users.</translate> | ||
** {{ll|Category:Skin extensions|''skin''}} - <translate><!--T:237--> extensions adding [[w:CSS|CSS]] or [[w:JavaScript|JavaScript]], or implementing hook functions to change the look and feel of MediaWiki via the skins framework.</translate> | ** {{ll|Category:Skin extensions|''skin''}} - <translate><!--T:237--> extensions adding [[w:CSS|CSS]] or [[w:JavaScript|JavaScript]], or implementing hook functions to change the look and feel of MediaWiki via the skins framework.</translate> | ||
** {{ll|Category:Ajax extensions|''ajax''}} - <translate><!--T:238--> extensions that use [[w:AJAX|Ajax]] programming techniques.</translate> | ** {{ll|Category:Ajax extensions|''ajax''}} - <translate><!--T:238--> extensions that use [[w:AJAX|Ajax]] programming techniques.</translate> | ||
** {{ll|Category:Special page extensions|''special''}} - <translate><!--T:239--> extensions that subclass the <tvar | ** {{ll|Category:Special page extensions|''special''}} - <translate><!--T:239--> extensions that subclass the <tvar name=specialpage>{{Class doclink|SpecialPage}}</tvar> class, use one of its hooks, or patch one or more functions in <tvar name=filephp>{{Git file|file=includes/specialpage/SpecialPage.php|text=SpecialPage.php}}</tvar>. See <tvar name=manual>{{ll|Manual:Special pages|Special pages}}</tvar> for more information.</translate> | ||
* '''other''' | * '''other''' | ||
** {{ll|Category:API extensions|''api''}} - <translate><!--T:240--> extensions that add a new API module or extend a core API module.</translate> | ** {{ll|Category:API extensions|''api''}} - <translate><!--T:240--> extensions that add a new API module or extend a core API module.</translate> | ||
Line 557: | Line 557: | ||
** {{ll|Category:Extension examples|''example''}} - <translate><!--T:245--> Not a real extension, but an example of how to write one</translate> | ** {{ll|Category:Extension examples|''example''}} - <translate><!--T:245--> Not a real extension, but an example of how to write one</translate> | ||
<translate><!--T:172--> Any other value for 'type' is invalid, and will cause the extension to be placed in <tvar | <translate><!--T:172--> 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><!--T:173--> Note: Many extensions have more than one type, if this applies to yours, replace <tvar | <translate><!--T:173--> Note: Many extensions have more than one type, if this applies to yours, replace <tvar name=type><code><nowiki>|type=</nowiki></code></tvar> with <tvar name=value><code><nowiki>|type1=|type2=|type3=...</nowiki></code></tvar>. You may define up to six types for an extension.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 571: | Line 571: | ||
<!--T:177--> | <!--T:177--> | ||
For built-in hooks: | For built-in hooks: | ||
* use the hook name alone. Please see <tvar | * use the hook name alone. Please see <tvar name=manual>{{ll|Manual:Hooks|Manual:Hooks}}</tvar> for values (but omit introductory '/'). | ||
<!--T:178--> | <!--T:178--> | ||
For custom hooks defined by extensions: | For custom hooks defined by extensions: | ||
* use <tvar | * use <tvar name=form>''extensionName''/''hookName''</tvar>. For a partial list of custom hooks, see <tvar name=exthooks>[[Extension hook registry]]</tvar>. | ||
<!--T:179--> | <!--T:179--> | ||
Line 586: | Line 586: | ||
<!--T:181--> | <!--T:181--> | ||
You might also want to add the hooks to <tvar | You might also want to add the hooks to <tvar name=exthooks>[[Extension hook registry]]</tvar>.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="username">'''username'''</span></td><td><translate><!--T:63--> The author's username on MediaWiki.org (if they have one).</translate> <translate><!--T:64--> May be omitted, but if present it will be used to link to the author's user & user_talk page.</translate> <translate><!--T:65--> It should be provided without namespace and without <tvar | <td><span id="username">'''username'''</span></td><td><translate><!--T:63--> The author's username on MediaWiki.org (if they have one).</translate> <translate><!--T:64--> May be omitted, but if present it will be used to link to the author's user & user_talk page.</translate> <translate><!--T:65--> It should be provided without namespace and without <tvar name=1><nowiki>[[]]</nowiki></tvar>s.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 598: | Line 598: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|image}}</td><td><translate><!--T:70--> screenshot or logo of extension.</translate> <translate><!--T:71--> It should be provided without namespace and without <tvar | <td>{{visible anchor|image}}</td><td><translate><!--T:70--> screenshot or logo of extension.</translate> <translate><!--T:71--> It should be provided without namespace and without <tvar name=1><nowiki>[[]]</nowiki></tvar>s.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 610: | Line 610: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="compatibility_policy">compatibility policy</span></td><td><translate><!--T:77--> {{<tvar | <td><span id="compatibility_policy">compatibility policy</span></td><td><translate><!--T:77--> {{<tvar name=1>ll|Compatibility#mediawiki_extensions</tvar>|compatibility policy}} (accepted values are <tvar name=2>'''master'''</tvar>, <tvar name=3>'''rel'''</tvar>, and <tvar name=x>'''ltsrel'''</tvar>).</translate> ({{ll|Category:Extensions without a compatibility policy|2=<translate><!--T:78--> backlog</translate>}})</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 620: | Line 620: | ||
<tr> | <tr> | ||
<td>{{visible anchor|needs-updatephp}}</td><td><translate><!--T:194--> | <td>{{visible anchor|needs-updatephp}}</td><td><translate><!--T:194--> | ||
<tvar | <tvar name=yes><code>yes</code></tvar> 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. <tvar name=no><code>no</code></tvar> should be set as a value since this assures that the extension does not need update.php to be run and thus avoids uncertainty | ||
<!--T:195--> | <!--T:195--> | ||
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 <tvar | 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 <tvar name=target><code>$IP/extensions/ExtensionName</code></tvar> and inserted <tvar name=code><code>wfLoadExtension( "ExtensionName");</code></tvar> into "LocalSettings.php", run from the command line:</translate> | ||
cd path/to/wiki_install_directory | cd path/to/wiki_install_directory | ||
Line 632: | Line 632: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="php">composer</span></td><td><translate><!--T:196--> If applicable the name of the "vendor" as well as the "package" should be entered in the format <tvar | <td><span id="php">composer</span></td><td><translate><!--T:196--> If applicable the name of the "vendor" as well as the "package" should be entered in the format <tvar name=format><code>vendor/package</code></tvar>, e.g. <tvar name=xmp><code>mediawiki/semantic-media-wiki</code></tvar> to point people directly to packagist.org, which serves as the package archive.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="table1">'''table1'''</span><br/>''table2''<br/>''table3''<br/>''table4''<br/>...<br/>''table30''</td><td><translate><!--T:204--> '''name of each ''non-core'' table used by the extension'''</translate> | <td><span id="table1">'''table1'''</span><br/>''table2''<br/>''table3''<br/>''table4''<br/>...<br/>''table30''</td><td><translate><!--T:204--> '''name of each ''non-core'' table used by the extension'''</translate> | ||
<translate><!--T:205--> Links to a subpage of your extension page. For instance, "<tvar | <translate><!--T:205--> Links to a subpage of your extension page. For instance, "<tvar name=table1>table1 = cu_changes</tvar>" at <tvar name=url1>{{ll|Extension:CheckUser|Extension:CheckUser}}</tvar> will link to <tvar name=url2>{{ll|Extension:CheckUser/cu_changes table|Extension:CheckUser/cu_changes table}}</tvar>. Don't list core tables such as <tvar name=page>{{ll|Manual:Page table|page}}</tvar> or <tvar name=revision>{{ll|Manual:Revision table|revision}}</tvar>; only list tables that are added by extensions.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|license}}</td><td><translate><!--T:206--> license governing use of this extension, as one of the codes found in <tvar | <td>{{visible anchor|license}}</td><td><translate><!--T:206--> 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><code>GPL-2.0-or-later</code></tvar>, <tvar name=only2><code>GPL-2.0-only</code></tvar> or <tvar name=later3><code>GPL-3.0-or-later</code></tvar>, etc.</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="download">'''download'''</span></td><td><translate><!--T:207--> '''link to the download''' : <tvar | <td><span id="download">'''download'''</span></td><td><translate><!--T:207--> '''link to the download''' : <tvar name=url>[https://phabricator.wikimedia.org/r/project/mediawiki/core Git]</tvar>, <tvar name=wikimediadownload>{{tl|WikimediaDownload{{#translation:}}}}</tvar>. </translate></td> | ||
</tr> | </tr> | ||
<td><span id="repo">repo</span></td><td><translate><!--T:249--> Name of the Gerrit repository the extension's code is stored in, if different from the page name. Setting this automatically sets {{para|download}}, and allows the template to automatically load data from the appropriate <tvar | <td><span id="repo">repo</span></td><td><translate><!--T:249--> Name of the Gerrit repository the extension's code is stored in, if different from the page name. Setting this automatically sets {{para|download}}, and allows the template to automatically load data from the appropriate <tvar name=1><code>extension.json</code></tvar> file.</translate></td> | ||
<tr> | <tr> | ||
<td>{{visible anchor|readme}}</td><td><translate><!--T:208--> external link to the <tvar | <td>{{visible anchor|readme}}</td><td><translate><!--T:208--> 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></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|changelog}}</td><td><translate><!--T:209--> external link to the changelog file, e.g. <tvar | <td>{{visible anchor|changelog}}</td><td><translate><!--T:209--> external link to the changelog file, e.g. <tvar name=url>[[Extension:LDAP Authentication/Changelog]]</tvar></translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 656: | Line 656: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|tags}}</td><td><translate><!--T:198--> any tags your extension uses (e.g. <tvar | <td>{{visible anchor|tags}}</td><td><translate><!--T:198--> any tags your extension uses (e.g. <tvar name=tags><tag1>, <tag2></tvar>).</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|rights}}</td><td><translate><!--T:210--> [[<tvar | <td>{{visible anchor|rights}}</td><td><translate><!--T:210--> [[<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>''{{ll|Extension:MakeBot|makebot}}''</tvar> or <tvar name=desysop>''{{ll|Extension:Desysop|desysop}}''</tvar>, not such as GFDL or LGPL or GPL - those are licenses!</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|namespace}}</td><td><translate><!--T:199--> [[<tvar | <td>{{visible anchor|namespace}}</td><td><translate><!--T:199--> [[<tvar name=1>Special:MyLanguage/Manual:Namespace</tvar>|namespace]] in which this extension is used</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 668: | Line 668: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|compatibility}}</td><td><translate><!--T:211--> Additional compatibility information, for instance compatibility charts (formerly using <tvar | <td>{{visible anchor|compatibility}}</td><td><translate><!--T:211--> Additional compatibility information, for instance compatibility charts (formerly using <tvar name=testext>[[Template:Extension Testing]]</tvar>). 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></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|translate}}</td><td><translate><!--T:212--> | <td>{{visible anchor|translate}}</td><td><translate><!--T:212--> | ||
Optional parameter to link the exact page where ([[<tvar | 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: | ||
* <tvar | * <tvar name=lowercase>ext-LOWERCASE</tvar>(<tvar name=nospaces>NOSPACES</tvar>(Label as defined in <tvar name=file>{{git file|project=translatewiki|branch=HEAD|file=groups/MediaWiki/ExtensionsAgg.yaml|text=config}}</tvar>)), aka | ||
* the parameter you get in the URL after | * the parameter you get in the URL after | ||
** typing the name of the extension in the search/filter box at <tvar | ** typing the name of the extension in the search/filter box at <tvar name=tranlwikispectransl>[[translatewiki:Special:Translate]]</tvar> or | ||
** searching for its name in <tvar | ** searching for its name in <tvar name=transwikilangstat>[https://translatewiki.net/w/i.php?title=Special%3ALanguageStats&x=D languagestats]</tvar> after clicking "expand all".</translate></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 706: | Line 706: | ||
Normally left blank. Alternate values are: | Normally left blank. Alternate values are: | ||
</translate> | </translate> | ||
* ''nocats'' - <translate><!--T:224--> suppresses categorization and the 'check usage' link. Use this value if you are adding this template to [[<tvar | * ''nocats'' - <translate><!--T:224--> suppresses categorization and the 'check usage' link. Use this value if you are adding this template to [[<tvar name=1>Special:MyLanguage/Help:Subpage</tvar>|subpages]] of an extension or to how-to documentation of extensions. For example, the usage image above sets <tvar name=nocats><code>templatemode=nocats</code></tvar> because this isn't an actual extension page and we don't want to add this page to any categories on account of it.</translate> | ||
* ''nousage'' - <translate><!--T:225--> 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 '<tvar | * ''nousage'' - <translate><!--T:225--> 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 '<tvar name=templatemode>templatemode=nocats</tvar>'</translate> | ||
<translate><!--T:193--> If this is left blank, this template will add the host page to <tvar | <translate><!--T:193--> If this is left blank, this template will add the host page to <tvar name=allextcat>[[:Category:All extensions{{#translation:}}]]</tvar> and to one or more additional categories, depending on the values assigned to the [[<tvar name=anchor>#Content parameters</tvar>|Content parameters]].</translate></td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 719: | Line 719: | ||
<!--T:85--> | <!--T:85--> | ||
If you want to add the infobox to an existing page, copy and paste the code at the [[<tvar | 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> | </translate> | ||
Line 744: | Line 744: | ||
<!--T:182--> | <!--T:182--> | ||
* '''<tvar | * '''<tvar name=extsample>{{ll|Template:Extension/Sample}}</tvar>:''' The boilerplate extension that is preloaded into newly-created pages. | ||
* '''<tvar | * '''<tvar name=extinpbox>{{ll|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>{{tag|inputbox|open}}</tvar> tag, please see <tvar name=url>{{ll|Extension:InputBox|Extension:InputBox}}</tvar>. | ||
=== Infobox parameters === <!--T:183--> | === Infobox parameters === <!--T:183--> | ||
Line 753: | Line 753: | ||
<!--T:185--> | <!--T:185--> | ||
* 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 | * 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. | ||
<!--T:186--> | <!--T:186--> | ||
To change/correct/add to the implementation type parameters: | To change/correct/add to the implementation type parameters: | ||
* Check the [[<tvar | * Check the [[<tvar name=url>Template_talk:Extension</tvar>|talk page]] - there have been some extensive discussions about this field.</translate> | ||
<translate> | <translate> | ||
<!--T:247--> | <!--T:247--> | ||
* The valid types and what they link to are defined at <tvar | * The valid types and what they link to are defined at <tvar name=1>[[Module:Extension]]</tvar> | ||
<!--T:187--> | <!--T:187--> | ||
Line 766: | Line 766: | ||
<!--T:188--> | <!--T:188--> | ||
* '''<tvar | * '''<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 | * '''<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><code>templatemode=nocats</code></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 == <!--T:189--> | == Test case == <!--T:189--> |