Difference between revisions of "Template:Extension"
Jump to navigation
Jump to search
>Shirayuki |
>Shirayuki (translation tweaks) |
||
Line 383: | Line 383: | ||
{{lua|Module:Extension|Module:ExtensionJson|Module:String}} | {{lua|Module:Extension|Module:ExtensionJson|Module:String}} | ||
{{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:49--> It will add a useful infobox (see below) and will automatically add the extension to <tvar|1>{{ll|Category:All extensions}}</>, along with the appropriate {{<tvar|2>ll|Category:Extensions by status</>|status}} and {{<tvar|3>ll|Category:Extensions by implementation type</>|implementation type}} categories.</translate> | |||
<translate> | <translate> | ||
== Usage == <!--T:50--> | == Usage == <!--T:50--> | ||
</translate> | </translate> | ||
Line 485: | Line 482: | ||
<translate> | <translate> | ||
== Content parameters == <!--T:53--> | == Content parameters == <!--T:53--> | ||
</translate> | </translate> | ||
<translate><!--T:54--> This section describes parameters that govern infobox content.</translate> | |||
<translate><!--T:55--> For help with <tvar|1>'''templatemode'''</> and other control parameters, please see ''[[<tvar|2>#Control parameters</>|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 507: | Line 500: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="status">'''status'''</span></td><td>'''<translate><!--T:60--> current release status</translate>''' | <td><span id="status">'''status'''</span></td><td> | ||
<translate> | '''<translate><!--T:60--> current release status</translate>''' | ||
<!--T:158--> | <translate><!--T:158--> One of:</translate> | ||
One of: | |||
</translate> | |||
* ''{{ll|Category:Unstable extensions|unstable}}'' - <translate><!--T:159--> broken - do not use this extension</translate> | * ''{{ll|Category:Unstable extensions|unstable}}'' - <translate><!--T:159--> broken - do not use this extension</translate> | ||
Line 520: | Line 511: | ||
* ''{{ll|Category:Archived extensions|archive}}'' - <translate><!--T:230--> archived - deprecated or merged with another extension</translate> | * ''{{ll|Category:Archived extensions|archive}}'' - <translate><!--T:230--> archived - deprecated or merged with another extension</translate> | ||
* ''{{ll|Category:Extensions with unknown status|unknown}}'' - <translate><!--T:231--> default</translate> | * ''{{ll|Category:Extensions with unknown status|unknown}}'' - <translate><!--T:231--> default</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|1>Special:MyLanguage/Category:extensions with unknown status</>|unknown]].</translate> | |||
<translate><!--T:162--> In cases where the value is invalid, it will be placed in a [[<tvar|1>Special:MyLanguage/Category:extensions with invalid status</>|special category]] so that the error can be caught and fixed.</translate> | |||
<translate> | <translate> | ||
<!--T:163--> | <!--T:163--> | ||
* [[<tvar|1>Special:MyLanguage/Extension status</>|release status colour scheme]]</translate></td> | * [[<tvar|1>Special:MyLanguage/Extension status</>|release status colour scheme]]</translate></td> | ||
Line 536: | Line 522: | ||
<tr> | <tr> | ||
<td>'''type1'''<br/>''type2''<br/>''type3''<br/>''type4''<br/>''type5''<br/>''type6''<br/></td><td><span id="type">'''<translate><!--T:61--> implementation type</translate>'''</span><!-- id here so at top of documentation --> | <td>'''type1'''<br/>''type2''<br/>''type3''<br/>''type4''<br/>''type5''<br/>''type6''<br/></td><td><span id="type">'''<translate><!--T:61--> implementation type</translate>'''</span><!-- id here so at top of documentation --> | ||
<translate> | <translate><!--T:164--> The implementation strategy(s) employed in building this extension.</translate> | ||
<!--T:164--> | <translate><!--T:165--> This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns.</translate> | ||
The implementation strategy(s) employed in building this extension.</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> | <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|1>Special:MyLanguage/Help:Categories</>|category links]] as needed.</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: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|1>Special:MyLanguage/Help:Categories</>|category links]] as needed. | |||
<!--T:168--> | <translate><!--T:168--> Allowed values for the '''type1''', '''type2''', ... parameters are:</translate> | ||
Allowed values for the '''type1''', '''type2''', ... parameters are: | |||
</translate> | |||
* '''''{{ll|Category:Parser extensions|parser}}''''' - <translate><!--T:213--> catchall for uncategorized [[<tvar|1>Special:MyLanguage/Manual:Extending wiki markup</>|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:Parser extensions|parser}}''''' - <translate><!--T:213--> catchall for uncategorized [[<tvar|1>Special:MyLanguage/Manual:Extending wiki markup</>|parser extensions]].</translate> <translate><!--T:214--> If you have written a parser extension, please use one of the following more specific types:</translate> | ||
Line 582: | Line 558: | ||
** {{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> | <translate><!--T:172--> Any other value for 'type' is invalid, and will cause the extension to be placed in <tvar|typemissingcat>[[:Category:Extensions with invalid or missing type{{#translation:}}]]</>.</translate> | ||
<!--T:172--> | |||
Any other value for 'type' is invalid, and will cause the extension to be placed in <tvar|typemissingcat>[[:Category:Extensions with invalid or missing type{{#translation:}}]]</>. | |||
<!--T:173--> | <translate><!--T:173--> Note: Many extensions have more than one type, if this applies to yours, replace <tvar|type><code><nowiki>|type=</nowiki></code></> with <tvar|value><code><nowiki>|type1=|type2=|type3=...</nowiki></code></>. You may define up to six types for an extension.</translate></td> | ||
Note: Many extensions have more than one type, if this applies to yours, replace <tvar|type><code><nowiki>|type=</nowiki></code></> with <tvar|value><code><nowiki>|type1=|type2=|type3=...</nowiki></code></>. You may define up to six types for an extension.</translate></td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="hook">'''hook1'''</span><br/>''hook2''<br/>''hook3''<br/>''hook4''<br/>...</td> | <td><span id="hook">'''hook1'''</span><br/>''hook2''<br/>''hook3''<br/>''hook4''<br/>...</td> | ||
<td valign="top">'''<translate><!--T:62--> name of each hook used by the extension</translate>''' | <td valign="top">'''<translate><!--T:62--> name of each hook used by the extension</translate>''' | ||
<translate><!--T:174--> Entering values in this field is a good way to get exposure for your extension and help other developers.</translate> | |||
<translate><!--T:175--> Each documented hook will automatically add the extension to a category listing extensions that use that hook.</translate> | |||
<translate><!--T:176--> This category is autolinked to each hook page so that programmers can easily find examples of extensions that use a particular hook.</translate> | |||
<translate> | <translate> | ||
<!--T:177--> | <!--T:177--> | ||
For built-in hooks: | For built-in hooks: | ||
Line 670: | Line 638: | ||
<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> | <translate><!--T:205--> Links to a subpage of your extension page. For instance, "<tvar|table1>table1 = cu_changes</>" at <tvar|url1>{{ll|Extension:CheckUser|Extension:CheckUser}}</> will link to <tvar|url2>{{ll|Extension:CheckUser/cu_changes table|Extension:CheckUser/cu_changes table}}</>. Don't list core tables such as <tvar|page>{{ll|Manual:Page table|page}}</> or <tvar|revision>{{ll|Manual:Revision table|revision}}</>; only list tables that are added by extensions.</translate></td> | ||
<!--T:205--> | |||
Links to a subpage of your extension page. For instance, "<tvar|table1>table1 = cu_changes</>" at <tvar|url1>{{ll|Extension:CheckUser|Extension:CheckUser}}</> will link to <tvar|url2>{{ll|Extension:CheckUser/cu_changes table|Extension:CheckUser/cu_changes table}}</>. Don't list core tables such as <tvar|page>{{ll|Manual:Page table|page}}</> or <tvar|revision>{{ll|Manual:Revision table|revision}}</>; only list tables that are added by extensions.</translate></td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 744: | Line 710: | ||
* ''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|templatemode>templatemode=nocats</>'</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|templatemode>templatemode=nocats</>'</translate> | ||
<translate> | <translate><!--T:193--> If this is left blank, this template will add the host page to <tvar|allextcat>[[:Category:All extensions{{#translation:}}]]</> and to one or more additional categories, depending on the values assigned to the [[<tvar|anchor>#Content parameters</>|Content parameters]].</translate></td> | ||
<!--T:193--> | |||
If this is left blank, this template will add the host page to <tvar|allextcat>[[:Category:All extensions{{#translation:}}]]</> and to one or more additional categories, depending on the values assigned to the [[<tvar|anchor>#Content parameters</>|Content parameters]].</translate></td> | |||
</tr> | </tr> | ||
</table> | </table> | ||
Line 759: | Line 723: | ||
=== Create a new extension page === <!--T:86--> | === Create a new extension page === <!--T:86--> | ||
</translate> | </translate> | ||
<translate><!--T:87--> If you want to create a new extension page, enter the name below and click the button.</translate> | |||
<translate><!--T:88--> A new page will be created with the infobox template already in place.</translate> | |||
{{Extension/CreateExtensionInputBox}} | {{Extension/CreateExtensionInputBox}} | ||
Line 771: | Line 731: | ||
<translate> | <translate> | ||
== Enhancing this template == <!--T:89--> | == Enhancing this template == <!--T:89--> | ||
</translate> | |||
<translate><!--T:90--> If you would like to improve on this template, thanks!</translate> | |||
<translate><!--T:91--> This is a complicated template so here is some help along the way:</translate> | |||
<translate> | <translate> | ||
=== The Create extension button === <!--T:92--> | === The Create extension button === <!--T:92--> | ||
Revision as of 21:42, 6 October 2020
<languages/> Lua error in Module:TNT at line 158: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab.[[Category:Template documentation pages{{#translation:}}]] Maintenance: vulnerabilities, archived
[[Category:Info templates{{#translation:}}|Extension]] [[Category:Extension creation{{#translation:}}]] [[Category:Categorizing templates{{#translation:}}|Extension]] [[Category:Extension templates{{#translation:}}]]