<translate> [[<tvar|1>Special:MyLanguage/Phabricator</>|Issue tracker]]:</translate> [[phab:tag/{{{phabricator}}}/|#{{{phabricator}}}]]
Difference between revisions of "Template:Extension"
Jump to navigation
Jump to search
>Samwilson (Show MediaWiki requirement for all extensions.) |
>Pppery (Template was deleted ages ago) |
||
(27 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<languages/> | <languages/> | ||
</noinclude><includeonly>{{#switch:<translate></translate> | </noinclude><!-- | ||
--><templatestyles src="Template:Infobox/styles.css" /><!-- | |||
--><templatestyles src="Template:Extension/styles.css" /><!-- | |||
--><templatestyles src="Template:Extension/status.css" /><!-- | |||
--><includeonly>{{#switch:<translate></translate> | |||
| = | | = | ||
{{#ifeq:{{lc:{{{status}}}}}|unmaintained|{{#ifeq:{{NAMESPACE}}|Extension|{{#invoke:Extension|unmaintained}}}}}} | {{#ifeq:{{lc:{{{status}}}}}|unmaintained|{{#ifeq:{{NAMESPACE}}|Extension|{{#invoke:Extension|unmaintained}}}}}} | ||
{{#if: {{{phabricator|{{{bugzilla|}}}}}} | {{Ptag|{{{phabricator|MediaWiki-extensions-{{{bugzilla|}}}}}}}} }} | {{#if: {{{phabricator|{{{bugzilla|}}}}}} | {{Ptag|{{{phabricator|MediaWiki-extensions-{{{bugzilla|}}}}}}}} }} | ||
<table class="infobox infobox-{{dir|{{pagelang}}}} ext-infobox ext-status-{{#switch: {{lc: {{{status|unknown}}} }} | |||
<table class="infobox | |||
|unmaintained|unstable|experimental|beta|stable={{lc: {{{status}}} }} | |unmaintained|unstable|experimental|beta|stable={{lc: {{{status}}} }} | ||
|#default=unknown | |#default=unknown | ||
}}"> | }}"> | ||
<caption>'''{{ll|Manual:Extensions|2=<translate><!--T:1--> MediaWiki extensions manual</translate>}}'''</caption> | <caption>'''{{ll|Manual:Extensions|2=<translate><!--T:1--> MediaWiki extensions manual</translate>}}'''</caption> | ||
<tr class=" | <tr class="infobox-header ext-infobox-header"> | ||
<th colspan="2" style="padding-top: 0.5em;">[[File:{{#ifeq: {{lc: {{{status|}}} }} |unstable| | <th colspan="2" style="padding-top: 0.5em;">[[File:{{#ifeq: {{lc: {{{status|}}} }} |unstable | ||
|OOjs UI icon alert-invert.svg | |||
|<!--else-->OOjs UI icon advanced{{#ifeq:{{{status}}}|beta||-invert}}.svg | |||
}}|link=Special:MyLanguage/Template:Extension#Content|{{dir|{{pagelang}}|right|left}}|40px]] <span style="font-size: 130%; line-height: 100%;">{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME:{{translatable}}}}}}</span><br /> | |||
{{ll|Extension status|2=<translate><!--T:2--> Release status:</translate>}} {{#switch: {{lc: {{{status|unknown}}} }} | {{ll|Extension status|2=<translate><!--T:2--> Release status:</translate>}} {{#switch: {{lc: {{{status|unknown}}} }} | ||
|unmaintained=<translate><!--T:3--> unmaintained</translate> | |unmaintained=<translate><!--T:3--> unmaintained</translate> | ||
Line 144: | Line 150: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}| | {{#if:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}| | ||
<tr> | <tr> | ||
Line 244: | Line 237: | ||
-->{{#if:{{{changelog|}}}|<br />{{{changelog}}}<!-- -->}}</td> | -->{{#if:{{{changelog|}}}|<br />{{{changelog}}}<!-- -->}}</td> | ||
</tr> | </tr> | ||
{{#if: {{{help|}}}{{#ifexist:Help:{{FULLPAGENAME}}|yes}} | | |||
<tr> | |||
<td>'''{{ll|Template:Extension#help|2=<translate><!--T:260--> Help</translate>}}'''</td> | |||
<td>{{#if: {{{help|}}} | {{{help}}} | {{localized link|Help:{{FULLPAGENAME}}}} }}</td> | |||
</tr> | |||
}} | |||
{{#if:{{{example|}}}| | {{#if:{{{example|}}}| | ||
<tr> | <tr> | ||
Line 388: | Line 387: | ||
-->}}<!-- -->}}<!-- | -->}}<!-- -->}}<!-- | ||
-->[[Category:All extensions{{#translation:}}]]<!-- | -->[[Category:All extensions{{#translation:}}]]<!-- | ||
-->{{#invoke:Extension|getExtensionJsonCategory}}<!-- | |||
-->}}<!-- | -->}}<!-- | ||
--><!--Check if the source page was deleted/archived--> {{#invoke:Extension|maintenanceLinks}} | --><!--Check if the source page was deleted/archived--> {{#invoke:Extension|maintenanceLinks}} | ||
Line 395: | Line 395: | ||
{{intricate template}} | {{intricate template}} | ||
{{lua|Module:Extension|Module:ExtensionJson|Module:String}} | {{lua|Module:Extension|Module:ExtensionJson|Module:String}} | ||
{{Uses TemplateStyles|Template:Extension/styles.css}} | {{Uses TemplateStyles|Template:Infobox/styles.css|Template:Extension/styles.css|Template:Extension/status.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 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><!--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> | ||
Line 439: | Line 439: | ||
|readme = | |readme = | ||
|changelog = | |changelog = | ||
|help = | |||
|example = | |example = | ||
|namespace = | |namespace = | ||
Line 462: | Line 463: | ||
|username = SomeUser | |username = SomeUser | ||
|author = SomeAuthor | |author = SomeAuthor | ||
|image = Placeholder. | |image = Placeholder.svg | ||
|version = {{{version}}} | |version = {{{version}}} | ||
|update = {{{update}}} | |update = {{{update}}} | ||
Line 478: | Line 479: | ||
|readme = {{{readme}}} | |readme = {{{readme}}} | ||
|changelog = {{{changelog}}} | |changelog = {{{changelog}}} | ||
|help = {{{help}}} | |||
|example = {{{example}}} | |example = {{{example}}} | ||
|namespace = {{{namespace}}} | |namespace = {{{namespace}}} | ||
Line 522: | Line 524: | ||
* ''{{ll|Category:Stable extensions|stable}}'' - <translate><!--T:228--> stable version</translate> | * ''{{ll|Category:Stable extensions|stable}}'' - <translate><!--T:228--> stable version</translate> | ||
* ''{{ll|Category:Unmaintained extensions|unmaintained}}'' - <translate><!--T:229--> unmaintained - previously claimed to be stable, now unmaintained</translate> | * ''{{ll|Category:Unmaintained extensions|unmaintained}}'' - <translate><!--T:229--> unmaintained - previously claimed to be stable, now unmaintained</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> | ||
Line 570: | Line 571: | ||
** {{ll|Category:File repository extensions|''filerepo''}} - <translate><!--T:244--> extension that adds new file repository types as file backend</translate> | ** {{ll|Category:File repository extensions|''filerepo''}} - <translate><!--T:244--> extension that adds new file repository types as file backend</translate> | ||
** {{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> | ||
** {{ll|Category:Beta Feature extensions|''beta features''}} - <translate><!--T:257--> extensions that new <tvar name="1">{{ll|Beta Features}}</tvar>.</translate> | |||
** {{ll|Category:PHP extensions|''php''}} - <translate><!--T:258--> extensions to the underlying <tvar name=1>{{ll|PHP}}</tvar> programming language.</translate> | |||
** {{ll|Category:Internationalization extensions|''locale''}} - <translate><!--T:259--> extensions associated with [[<tvar name=1>Special:MyLanguage/Manual:Localization</tvar>|localization]]</translate> | |||
<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: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> | ||
Line 596: | Line 599: | ||
<tr> | <tr> | ||
<td><span id="newhook">'''newhook1'''</span><br/>''newhook2''<br/>''newhook3''<br/>''newhook4''<br/>...<br/>''newhook90''</td> | <td><span id="newhook">'''newhook1'''</span><br/>''newhook2''<br/>''newhook3''<br/>''newhook4''<br/>...<br/>''newhook90''</td> | ||
<td valign="top"><translate><!--T:180--> | <td valign="top"> | ||
<translate> | |||
<!--T:180--> | |||
'''name of each hook provided by the extension''' | '''name of each hook provided by the extension''' | ||
<!--T:181--> | <!--T:181--> | ||
You might also want to add the hooks to <tvar name=exthooks>[[Extension hook registry]]</tvar>.</translate></td> | You might also want to add the hooks to <tvar name=exthooks>[[Extension hook registry]]</tvar>. | ||
</translate> | |||
</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 627: | Line 634: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|mediawiki}}</td><td><translate><!--T:79--> | <td>{{visible anchor|mediawiki}}</td><td><translate><!--T:79--> Required version of MediaWiki.</translate> Most extensions should not need to use this — it defaults to the value of the {{Manual|Extension.json/Schema#requires|'requires'}} property of {{manual|extension.json}}. See also [[:Category:Extensions without MediaWiki version]] and [[:Category:Extensions with manual MediaWiki version]].</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 633: | Line 640: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|needs-updatephp}}</td><td><translate><!--T:194--> | <td>{{visible anchor|needs-updatephp}}</td> | ||
<td> | |||
<translate> | |||
<!--T:194--> | |||
<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 | <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 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 "LocalSettings.php", run from the command line:</translate> | 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><syntaxhighlight lang=php inline>$IP/extensions/ExtensionName</syntaxhighlight></tvar> and inserted <tvar name=code><syntaxhighlight lang=php inline>wfLoadExtension( "ExtensionName" );</syntaxhighlight></tvar> into "LocalSettings.php", run from the command line: | ||
</translate> | |||
<code class="mw-code mw-highlight" style="display:block"><!-- | <code class="mw-code mw-highlight" style="display:block"><!-- | ||
Line 659: | Line 670: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="download">'''download'''</span></td><td><translate><!--T:207--> '''link to the download''' : <tvar name=url>[ | <td><span id="download">'''download'''</span></td><td><translate><!--T:207--> '''link to the download''' : <tvar name=url>[[phab: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 name=1><code>extension.json</code></tvar> file.</translate></td> | <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> | ||
Line 679: | Line 690: | ||
<tr> | <tr> | ||
<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> | <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> | |||
<td>{{visible anchor|help}}</td><td>Link to user-help for the extension. If not provided, will look for <code>Help:Extension:''ExtensionName''</code>. If provided, full wikitext link should be given (because you may want to link to e.g. an external page).</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 684: | Line 698: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>{{visible anchor|compatibility}}</td><td><translate><!--T:211--> Additional compatibility information, for instance compatibility charts | <td>{{visible anchor|compatibility}}</td><td><translate><!--T:211--> 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></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 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: | 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 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 | * <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 name=tranlwikispectransl>[[translatewiki:Special:Translate]]</tvar> or | ** 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 name=transwikilangstat>[https://translatewiki.net/w/i.php?title=Special%3ALanguageStats&x=D languagestats]</tvar> after clicking "expand all".</translate></td> | ** 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 716: | Line 735: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>'''templatemode'''</td><td><translate><!--T:191--> | <td>'''templatemode'''</td> | ||
<td> | |||
<translate> | |||
<!--T:191--> | |||
'''Controls auto-categorization of host page.''' | '''Controls auto-categorization of host page.''' | ||
Line 798: | Line 820: | ||
[[Special:WhatLinksHere/Template:Extension/vulnerabilities|vulnerabilities]], | [[Special:WhatLinksHere/Template:Extension/vulnerabilities|vulnerabilities]], | ||
[[Special:WhatLinksHere/Template:Extension/archived|archived]] | [[Special:WhatLinksHere/Template:Extension/archived|archived]] | ||
</noinclude> | </noinclude> |
Latest revision as of 03:12, 15 October 2021
<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