[[<tvar|1>Special:MyLanguage/Phabricator|Phabricator]] project: [[phab:tag/{{{phabricator}}}/|#{{{phabricator}}}]]
Difference between revisions of "Template:Extension"
Jump to navigation
Jump to search
Template documentation
Joelmartin (talk | contribs) m (Text replacement - "</translate>" to "") |
Joelmartin (talk | contribs) m (Text replacement - "<tvar|1>" to "") |
||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
|#default=unknown | |#default=unknown | ||
}}"> | }}"> | ||
− | <caption>'''{{ll|Manual:Extensions| | + | <caption>'''{{ll|Manual:Extensions| MediaWiki extensions manual}}'''</caption> |
<tr class="tpl-infobox-header ext-infobox-header"> | <tr class="tpl-infobox-header ext-infobox-header"> | ||
<th colspan="2" style="padding-top: 0.5em;">[[File:{{#ifeq: {{lc: {{{status|}}} }} |unstable|OOjs_UI_icon_alert-invert.svg|<!--else-->OOjs UI icon advanced.svg}}|link=Special:MyLanguage/Template:Extension#Content|{{dir|{{pagelang}}|right|left}}|40px]] <span style="font-size: 130%; line-height: 100%;">{{{name|{{IfNotTranslation|{{PAGENAME}}|{{BASEPAGENAME}}}}}}}</span><br /> | <th colspan="2" style="padding-top: 0.5em;">[[File:{{#ifeq: {{lc: {{{status|}}} }} |unstable|OOjs_UI_icon_alert-invert.svg|<!--else-->OOjs UI icon advanced.svg}}|link=Special:MyLanguage/Template:Extension#Content|{{dir|{{pagelang}}|right|left}}|40px]] <span style="font-size: 130%; line-height: 100%;">{{{name|{{IfNotTranslation|{{PAGENAME}}|{{BASEPAGENAME}}}}}}}</span><br /> | ||
− | {{ll|Extension status| | + | {{ll|Extension status| Release status:}} {{#switch: {{lc: {{{status|unknown}}} }} |
− | |unmaintained= | + | |unmaintained= unmaintained |
− | |archive= | + | |archive= archive |
− | |milestone= | + | |milestone= milestone |
− | |unstable= | + | |unstable= unstable |
− | |experimental= | + | |experimental= experimental |
− | |beta= | + | |beta= beta |
− | |stable= | + | |stable= stable |
− | |magic= | + | |magic= magic |
− | |#default= | + | |#default= unknown |
}}<!-- Category logic -->{{#if:{{{license|}}}|{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#invoke:Extension|getLicenseCategory|{{{license}}}}}}}}}<!-- | }}<!-- Category logic -->{{#if:{{{license|}}}|{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#invoke:Extension|getLicenseCategory|{{{license}}}}}}}}}<!-- | ||
-->{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->[[Category:{{#switch: {{lc:{{{status|}}} }} | -->{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->[[Category:{{#switch: {{lc:{{{status|}}} }} | ||
Line 41: | Line 41: | ||
{{#if:{{{type|}}}{{{type1|}}}| | {{#if:{{{type|}}}{{{type1|}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#type|''' | + | <td>{{ll|Template:Extension#type|''' Implementation'''}}</td> |
<td>{{#invoke:Extension|getTypes | <td>{{#invoke:Extension|getTypes | ||
− | |ajax = | + | |ajax = [[w:AJAX|Ajax]] |
− | |api = {{ll|API:Action API| | + | |api = {{ll|API:Action API| API}} |
− | |beta feature = {{ll|Beta Features| | + | |beta feature = {{ll|Beta Features| Beta Feature}} |
|contenthandler = {{ll|Manual:ContentHandler|nsp=0}} | |contenthandler = {{ll|Manual:ContentHandler|nsp=0}} | ||
− | |database = {{ll|Manual:Database layout| | + | |database = {{ll|Manual:Database layout| Database}} |
− | |data extraction = | + | |data extraction = Data extraction |
− | |example = | + | |example = Example |
− | |extended syntax = {{ll|Manual:Extending wiki markup| | + | |extended syntax = {{ll|Manual:Extending wiki markup| Extended syntax}} |
− | |filerepo = | + | |filerepo = File repository |
− | |hook = {{ll|Manual:Hooks| | + | |hook = {{ll|Manual:Hooks| Hook}} |
− | |interface = | + | |interface = User interface |
− | |link = {{ll|Manual:Extending wiki markup| | + | |link = {{ll|Manual:Extending wiki markup| Link markup}} |
− | |media = | + | |media = Media |
− | |mywiki = {{ll|Manual:Personalization| | + | |mywiki = {{ll|Manual:Personalization| MyWiki}} |
− | |notify = | + | |notify = Notify |
− | |page action = {{ll|Manual:Parameters to index.php#Actions| | + | |page action = {{ll|Manual:Parameters to index.php#Actions| Page action}} |
− | |parser = {{ll|Manual:Extending wiki markup| | + | |parser = {{ll|Manual:Extending wiki markup| Parser extension}} |
− | |parser function = {{ll|Manual:Parser functions| | + | |parser function = {{ll|Manual:Parser functions| Parser function}} |
− | |php = | + | |php = PHP |
− | |search = | + | |search = Search |
− | |skin = {{ll|Manual:Skins| | + | |skin = {{ll|Manual:Skins| Skin}} |
− | |special page = {{ll|Manual:Special pages| | + | |special page = {{ll|Manual:Special pages| Special page}} |
− | |locale = {{ll|Manual:Localization| | + | |locale = {{ll|Manual:Localization| Locale}} |
− | |tag = {{ll|Manual:Tag extensions| | + | |tag = {{ll|Manual:Tag extensions| Tag}} |
− | |user access = {{ll|Manual:Security| | + | |user access = {{ll|Manual:Security| User access}} |
− | |user identity = {{ll|Manual:Security| | + | |user identity = {{ll|Manual:Security| User identity}} |
− | |user rights = {{ll|Manual:Security| | + | |user rights = {{ll|Manual:Security| User rights}} |
− | |user activity = {{ll|Manual:Security| | + | |user activity = {{ll|Manual:Security| User activity}} |
− | |variable = {{ll|Manual:Variables| | + | |variable = {{ll|Manual:Variables| Variable}} |
}}<!-- | }}<!-- | ||
-->|<!--else--><!-- | -->|<!--else--><!-- | ||
Line 84: | Line 84: | ||
{{#if:{{{description|}}}| | {{#if:{{{description|}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#description|''' | + | <td>{{ll|Template:Extension#description|''' Description'''}}</td> |
<td>{{{description}}}</td> | <td>{{{description}}}</td> | ||
</tr> | </tr> | ||
Line 90: | Line 90: | ||
{{#if:{{{author|}}}{{{username|}}} | | {{#if:{{{author|}}}{{{username|}}} | | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#username|''' | + | <td>{{ll|Template:Extension#username|''' Author(s)'''}}</td> |
<td>{{#if: {{{username|}}} |<!-- | <td>{{#if: {{{username|}}} |<!-- | ||
-->{{#ifeq: {{{username}}}|{{{author|{{{username}}}<!-- -->}}}|<!-- | -->{{#ifeq: {{{username}}}|{{{author|{{{username}}}<!-- -->}}}|<!-- | ||
Line 111: | Line 111: | ||
{{#if:{{{maintainer|}}} | | {{#if:{{{maintainer|}}} | | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#maintainer|''' | + | <td>{{ll|Template:Extension#maintainer|''' Maintainer(s)'''}}</td> |
<td>{{#ifexist:User:{{{maintainer}}}|[[User:{{{maintainer}}}]]<sup>[[User talk:{{{maintainer}}}|{{int:talkpagelinktext}}]]</sup>|{{{maintainer}}}}}</td> | <td>{{#ifexist:User:{{{maintainer}}}|[[User:{{{maintainer}}}]]<sup>[[User talk:{{{maintainer}}}|{{int:talkpagelinktext}}]]</sup>|{{{maintainer}}}}}</td> | ||
</tr> | </tr> | ||
Line 117: | Line 117: | ||
{{#if:{{#invoke:extension|getVersion|{{{latest release version|{{{latest_release_version|{{{version|}}}}}}}}}}}| | {{#if:{{#invoke:extension|getVersion|{{{latest release version|{{{latest_release_version|{{{version|}}}}}}}}}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#version|''' | + | <td>{{ll|Template:Extension#version|''' Latest version'''}}</td> |
<td>{{#invoke:extension|getVersion|{{{latest release version|{{{latest_release_version|{{{version|}}}}}}}}}}}{{#if:{{{latest release date|{{{latest_release_date|{{{update|}}}}}}}}}| ({{{latest release date|{{{latest_release_date|{{{update}}})}}}}}}}}</td> | <td>{{#invoke:extension|getVersion|{{{latest release version|{{{latest_release_version|{{{version|}}}}}}}}}}}{{#if:{{{latest release date|{{{latest_release_date|{{{update|}}}}}}}}}| ({{{latest release date|{{{latest_release_date|{{{update}}})}}}}}}}}</td> | ||
</tr> | </tr> | ||
Line 123: | Line 123: | ||
{{#if:{{{latest preview version|{{{latest_preview_version|{{{version_preview|{{{version preview|}}}}}}}}}}}}| | {{#if:{{{latest preview version|{{{latest_preview_version|{{{version_preview|{{{version preview|}}}}}}}}}}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#version|''' | + | <td>{{ll|Template:Extension#version|''' Latest preview version'''}}</td> |
<td>{{{latest preview version|{{{latest_preview_version|{{{version_preview|{{{version preview|}}}}}}}}}}}}{{#if:{{{latest preview version|{{{latest_preview_version|{{{update_preview|{{{update preview|}}}}}}}}}}}}| ({{{latest preview version|{{{latest_preview_version|{{{update_preview|{{{update preview}}}}}}}}}}}})}}</td> | <td>{{{latest preview version|{{{latest_preview_version|{{{version_preview|{{{version preview|}}}}}}}}}}}}{{#if:{{{latest preview version|{{{latest_preview_version|{{{update_preview|{{{update preview|}}}}}}}}}}}}| ({{{latest preview version|{{{latest_preview_version|{{{update_preview|{{{update preview}}}}}}}}}}}})}}</td> | ||
</tr> | </tr> | ||
Line 129: | Line 129: | ||
{{#if:{{{compatibility policy|}}}| | {{#if:{{{compatibility policy|}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Compatibility#mediawiki_extensions|''' | + | <td>{{ll|Compatibility#mediawiki_extensions|''' Compatibility policy'''}}</td> |
<td>{{#switch:{{{compatibility policy}}}<!-- | <td>{{#switch:{{{compatibility policy}}}<!-- | ||
− | -->|master= | + | -->|master= master<!-- |
− | -->|rel= | + | -->|rel= release branches<!-- |
− | -->|#default=<span class="error" | + | -->|#default=<span class="error"> invalid</span>{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{#translation:}}||[[Category:Extensions without a compatibility policy]]}}}}<!-- |
-->}}</td> | -->}}</td> | ||
</tr> | </tr> | ||
Line 152: | Line 152: | ||
{{#if:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}| | {{#if:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#needs-updatephp|2=<abbr title=" | + | <td>{{ll|Template:Extension#needs-updatephp|2=<abbr title=" <tvar|com>'php update.php' needed after installation">''' Database changes'''</abbr>}}</td> |
− | <td>{{#switch:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}|yes|Yes= | + | <td>{{#switch:{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}|yes|Yes= Yes|no|No= No|{{{needs-updatephp|{{#invoke:Extension|getNeedsUpdates}}}}}}}</td> |
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{composer|}}}| | {{#if:{{{composer|}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Composer|2=<abbr title=" | + | <td>{{ll|Composer|2=<abbr title=" Supports 'Composer' for installation">'''Composer'''</abbr>}}</td> |
<td>[https://packagist.org/packages/{{{composer}}} {{{composer}}}] {{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{{composer|}}}|[[Category:Extensions supporting Composer{{#translation:}}]]|}} }}</td> | <td>[https://packagist.org/packages/{{{composer}}} {{{composer}}}] {{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{{composer|}}}|[[Category:Extensions supporting Composer{{#translation:}}]]|}} }}</td> | ||
</tr> | </tr> | ||
Line 164: | Line 164: | ||
{{#if:{{{table1|}}}| | {{#if:{{{table1|}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#table1|''' | + | <td>{{ll|Template:Extension#table1|''' Tables'''}}</td> |
<td>{{ll|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{table1}}} table|{{{table1}}}}}<!-- | <td>{{ll|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{table1}}} table|{{{table1}}}}}<!-- | ||
-->{{#if:{{{table2|}}}|<br />{{ll|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{table2}}} table|{{{table2}}}}}<!-- -->}}<!-- | -->{{#if:{{{table2|}}}|<br />{{ll|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{table2}}} table|{{{table2}}}}}<!-- -->}}<!-- | ||
Line 188: | Line 188: | ||
}} | }} | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#license|''' | + | <td>{{ll|Template:Extension#license|''' License'''}}</td> |
<td>{{#if:{{{license|}}}|{{#invoke:Extension|getFormattedLicense|{{{license}}} | <td>{{#if:{{{license|}}}|{{#invoke:Extension|getFormattedLicense|{{{license}}} | ||
− | |GPL-2.0 = | + | |GPL-2.0 = GNU General Public License 2.0 |
− | |GPL-2.0-only = | + | |GPL-2.0-only = GNU General Public License 2.0 only |
− | |GPL-2.0-or-later = | + | |GPL-2.0-or-later = GNU General Public License 2.0 or later |
− | |GPL-3.0 = | + | |GPL-3.0 = GNU General Public License 3.0 |
− | |GPL-3.0-only = | + | |GPL-3.0-only = GNU General Public License 3.0 only |
− | |GPL-3.0-or-later = | + | |GPL-3.0-or-later = GNU General Public License 3.0 or later |
− | |AGPL-3.0 = | + | |AGPL-3.0 = GNU Affero General Public License 3.0 |
− | |LGPL-2.1 = | + | |LGPL-2.1 = GNU Lesser General Public License 2.1 |
− | |LGPL-2.1-only = | + | |LGPL-2.1-only = GNU Lesser General Public License 2.1 only |
− | |LGPL-2.1-or-later = | + | |LGPL-2.1-or-later = GNU Lesser General Public License 2.1 or later |
− | |LGPL-3.0 = | + | |LGPL-3.0 = GNU Lesser General Public License 3.0 |
− | |LGPL-3.0-only = | + | |LGPL-3.0-only = GNU Lesser General Public License 3.0 only |
− | |LGPL-3.0-or-later = | + | |LGPL-3.0-or-later = GNU Lesser General Public License 3.0 or later |
− | |FDL = | + | |FDL = GNU Free Documentation License |
− | |MIT = | + | |MIT = MIT License |
− | |ISC = | + | |ISC = ISC License |
− | |BSD-2-Clause = | + | |BSD-2-Clause = BSD 2-clause "Simplified" License |
− | |BSD-3-Clause = | + | |BSD-3-Clause = BSD 3-clause "Modified" License |
− | |BSD-4-Clause = | + | |BSD-4-Clause = BSD 4-clause "Original" License |
− | |MPL-1.0 = | + | |MPL-1.0 = Mozilla Public License 1.0 |
− | |MPL-2.0 = | + | |MPL-2.0 = Mozilla Public License 2.0 |
− | |WTFPL = | + | |WTFPL = WTFPL 2.0 |
− | |Apache-2.0 = | + | |Apache-2.0 = Apache License 2.0 |
− | |Zlib = | + | |Zlib = zlib License |
− | |CC0-1.0 = | + | |CC0-1.0 = Creative Commons Zero v1.0 Universal |
− | |CC-BY-3.0 = | + | |CC-BY-3.0 = Creative Commons Attribution 3.0 |
− | |CC-BY-SA-2.0 = | + | |CC-BY-SA-2.0 = Creative Commons Attribution Share Alike 2.0 |
− | |CC-BY-SA-2.5 = | + | |CC-BY-SA-2.5 = Creative Commons Attribution Share Alike 2.5 |
− | |CC-BY-NC-SA-2.5 = | + | |CC-BY-NC-SA-2.5 = Creative Commons Attribution NonCommercial Share Alike 2.5 |
− | |CC-BY-NC-SA-3.0 = | + | |CC-BY-NC-SA-3.0 = Creative Commons Attribution NonCommercial Share Alike 3.0 |
− | |CC-BY-NC-3.0 = | + | |CC-BY-NC-3.0 = Creative Commons Attribution NonCommercial 3.0 |
− | |CC-BY-SA-3.0 = | + | |CC-BY-SA-3.0 = Creative Commons Attribution Share Alike 3.0 |
− | |CC-BY-SA-4.0 = | + | |CC-BY-SA-4.0 = Creative Commons Attribution Share Alike 4.0 |
− | |ECL-2.0 = | + | |ECL-2.0 = [[w:Educational Community License|Educational Community License 2.0]] |
− | |PD = | + | |PD = [[w:Public domain|Public domain]] |
− | |+ = | + | |+ =  or later |
− | }}| | + | }}| No license specified {{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->[[Category:Extensions with no license specified{{#translation:}}]]}}}}</td> |
</tr><tr> | </tr><tr> | ||
− | <td>''' | + | <td>''' Download'''</td> |
<td><!-- | <td><!-- | ||
− | -->{{#if:{{{download|}}}|{{{download}}}|'' | + | -->{{#if:{{{download|}}}|{{{download}}}|'' No link''}}<!-- |
-->{{#if:{{{readme|}}}|<br />{{{readme}}}<!-- -->}}<!-- | -->{{#if:{{{readme|}}}|<br />{{{readme}}}<!-- -->}}<!-- | ||
-->{{#if:{{{changelog|}}}|<br />{{{changelog}}}<!-- -->}}</td> | -->{{#if:{{{changelog|}}}|<br />{{{changelog}}}<!-- -->}}</td> | ||
Line 236: | Line 236: | ||
{{#if:{{{example|}}}| | {{#if:{{{example|}}}| | ||
<tr> | <tr> | ||
− | <td>{{ll|Template:Extension#example|''' | + | <td>{{ll|Template:Extension#example|''' Example'''}}</td> |
<td>{{{example}}}</td> | <td>{{{example}}}</td> | ||
</tr> | </tr> | ||
Line 243: | Line 243: | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
− | <div class="mw-collapsible-header">{{ll|Template:Extension#namespace|''' | + | <div class="mw-collapsible-header">{{ll|Template:Extension#namespace|''' Namespace'''}}</div> |
<div class="mw-collapsible-content"><!-- the parameter "namespace" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | <div class="mw-collapsible-content"><!-- the parameter "namespace" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | ||
{{{namespace|}}}</div></td> | {{{namespace|}}}</div></td> | ||
Line 251: | Line 251: | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
− | <div class="mw-collapsible-header">{{ll|Template:Extension#parameters| | + | <div class="mw-collapsible-header">{{ll|Template:Extension#parameters| Parameters}}</div> |
<div class="mw-collapsible-content"><!-- the parameter "parameters" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | <div class="mw-collapsible-content"><!-- the parameter "parameters" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | ||
{{{parameters}}}</div></td> | {{{parameters}}}</div></td> | ||
Line 259: | Line 259: | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
− | <div class="mw-collapsible-header">{{ll|Template:Extension#tags| | + | <div class="mw-collapsible-header">{{ll|Template:Extension#tags| Tags}}</div> |
<div class="mw-collapsible-content">{{{tags}}}</div></td> | <div class="mw-collapsible-content">{{{tags}}}</div></td> | ||
</tr> | </tr> | ||
Line 266: | Line 266: | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
− | <div class="mw-collapsible-header">{{ll|Template:Extension#rights| | + | <div class="mw-collapsible-header">{{ll|Template:Extension#rights| Added rights}}</div> |
<div class="mw-collapsible-content"><!-- the parameter "rights" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | <div class="mw-collapsible-content"><!-- the parameter "rights" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | ||
{{{rights}}} | {{{rights}}} | ||
Line 285: | Line 285: | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
− | <div class="mw-collapsible-header">{{ll|Template:Extension#hook| | + | <div class="mw-collapsible-header">{{ll|Template:Extension#hook| Hooks used}}</div> |
<div class="mw-collapsible-content plainlist"><ul><li><!-- | <div class="mw-collapsible-content plainlist"><ul><li><!-- | ||
-->{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- | -->{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- | ||
Line 331: | Line 331: | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
− | <div class="mw-collapsible-header">{{ll|Template:Extension#newhook| | + | <div class="mw-collapsible-header">{{ll|Template:Extension#newhook| Hooks provided}}</div> |
<div class="mw-collapsible-content plainlist"><ul><li><!-- | <div class="mw-collapsible-content plainlist"><ul><li><!-- | ||
-->{{Foreach|Extension/HookProvided|delim=</li><li>|<!-- | -->{{Foreach|Extension/HookProvided|delim=</li><li>|<!-- | ||
Line 362: | Line 362: | ||
<tr> | <tr> | ||
<td colspan="2" style="text-align:center;"> | <td colspan="2" style="text-align:center;"> | ||
− | + | [[translatewiki:Special:Translate/{{{translate|ext-{{lc:{{#invoke:String/enwiki|replace|{{BASEPAGENAME}}| |}}}}}}}|Translate the {{BASEPAGENAME}} extension]] {{<tvar|3>#if:{{{translate|}}}||if it is available at translatewiki.net}}</td> | |
</tr><tr> | </tr><tr> | ||
<td colspan="2" style="text-align:center;"><!-- | <td colspan="2" style="text-align:center;"><!-- | ||
Line 377: | Line 377: | ||
}}}}} | }}}}} | ||
|<!-- no usage -->| | |<!-- no usage -->| | ||
− | <span style="white-space:nowrap" | + | <span style="white-space:nowrap"> |
− | [[ | + | [[wikiapiary:Extension:{{{CheckUsageNameOverride|{{BASEPAGENAMEE}}}}}|Check usage and version matrix.]] |
</span> | </span> | ||
<!-- | <!-- | ||
Line 385: | Line 385: | ||
{{#if:{{{vagrant-role|}}} | | {{#if:{{{vagrant-role|}}} | | ||
<tr> | <tr> | ||
− | <td>{{ll|MediaWiki-Vagrant#Using roles|''' | + | <td>{{ll|MediaWiki-Vagrant#Using roles|''' Vagrant role'''}}</td> |
<td>[https://doc.wikimedia.org/mediawiki-vagrant/puppet_classes/role_3A_3A{{{vagrant-role}}}.html {{{vagrant-role}}}]</td> | <td>[https://doc.wikimedia.org/mediawiki-vagrant/puppet_classes/role_3A_3A{{{vagrant-role}}}.html {{{vagrant-role}}}]</td> | ||
</tr> | </tr> | ||
Line 392: | Line 392: | ||
<tr> | <tr> | ||
<td> | <td> | ||
− | '''{{ll|Phabricator| | + | '''{{ll|Phabricator| Issues}}'''</td> |
− | <td>[[phab:tag/{{lc:{{{phabricator|MediaWiki-extensions-{{{bugzilla}}}}}}}}| | + | <td>[[phab:tag/{{lc:{{{phabricator|MediaWiki-extensions-{{{bugzilla}}}}}}}}| Open tasks]] · [https://phabricator.wikimedia.org/maniphest/task/create/?projects={{{phabricator|MediaWiki-extensions-{{{bugzilla}}}}}} Report a bug]</td> |
</tr> | </tr> | ||
}} | }} | ||
Line 400: | Line 400: | ||
<tr> | <tr> | ||
<td> | <td> | ||
− | '''{{ll|Gerrit/GitHub| | + | '''{{ll|Gerrit/GitHub| Issues}}'''</td> |
− | <td>[https://www.github.com/{{{github}}}/issues | + | <td>[https://www.github.com/{{{github}}}/issues Open issues] · [https://www.github.com/{{{github}}}/issues/new Report a bug]</td> |
</tr> | </tr> | ||
}} | }} | ||
Line 430: | Line 430: | ||
{{intricate template}} | {{intricate template}} | ||
− | + | ||
This template should be added to all extension pages on this wiki (but only the main page). | This template should be added to all extension pages on this wiki (but only the main page). | ||
− | |||
− | |||
− | == Usage == | + | It will add a useful infobox (see below) and will automatically add the extension to {{ll|Category:All extensions}}, along with the appropriate {{ll|Category:Extensions by status|status}} and {{<tvar|3>ll|Category:Extensions by implementation type|implementation type}} categories. |
+ | |||
+ | == Usage == | ||
<table width="100%"> | <table width="100%"> | ||
Line 445: | Line 445: | ||
<tr valign="top"> | <tr valign="top"> | ||
<td align="left"> | <td align="left"> | ||
− | <span id="CutAndPaste" | + | <span id="CutAndPaste"> Copy and paste:</span> |
<pre>{{Extension |templatemode = | <pre>{{Extension |templatemode = | ||
|name = | |name = | ||
Line 486: | Line 486: | ||
}}</pre> | }}</pre> | ||
− | + | For help with parameter values, see [[#Content parameters|below]].</td> | |
<td align="right">{{Extension |templatemode=nocats | <td align="right">{{Extension |templatemode=nocats | ||
|name = {{{name}}} | |name = {{{name}}} | ||
Line 530: | Line 530: | ||
{{anchor|Content parameters}} | {{anchor|Content parameters}} | ||
− | == Content parameters == | + | == Content parameters == |
+ | |||
− | |||
This section describes parameters that govern infobox content. | This section describes parameters that govern infobox content. | ||
− | + | ||
− | For help with | + | For help with '''templatemode''' and other control parameters, please see ''[[#Control parameters|Control parameters]]''. |
<!-- BEFORE YOU EDIT THIS: | <!-- BEFORE YOU EDIT THIS: | ||
Line 544: | Line 544: | ||
--> | --> | ||
<table class="wikitable"> | <table class="wikitable"> | ||
− | <caption>''' | + | <caption>''' Content parameters'''</caption> |
<tr> | <tr> | ||
− | <th | + | <th> Parameter</th> |
− | <th | + | <th> Description</th> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="name">'''name'''</span></td><td>''' | + | <td><span id="name">'''name'''</span></td><td>''' name of the extension'''</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="status">'''status'''</span></td><td>''' | + | <td><span id="status">'''status'''</span></td><td>''' current release status''' |
+ | |||
− | |||
One of: | One of: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | + | * <tvar|unstable>''{{ll|Category:Unstable extensions|unstable}}'' (broken - do not use this extension) |
− | + | * <tvar|experimental>''{{ll|Category:Experimental extensions|experimental}}'' (early stages of development, may change drastically) | |
− | + | * <tvar|beta>''{{ll|Category:Beta status extensions|beta}}'' (stable but not fully tested) | |
+ | * <tvar|stable>''{{ll|Category:Stable extensions|stable}}'' (stable version) | ||
+ | * <tvar|unmaintained>''{{ll|Category:Not LTS ready|unmaintained}}'' (unmaintained - previously claimed to be stable, now unmaintained) | ||
+ | * <tvar|archive>''{{ll|Category:Archived extensions|archive}}'' (archived - deprecated or merged with another extension) | ||
+ | * <tvar|unknown>''{{ll|Category:Extensions with unknown status|unknown}}'' (default) | ||
+ | |||
− | < | + | 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. In cases where the value is omitted, it will be categorized as {{ll|<tvar|url>:category:extensions with unknown status|unknown}}. |
− | * {{ll|<tvar|url>Extension status | + | In cases where the value is invalid, it will be placed in a {{ll|<tvar|url>:category:extensions with invalid status|special category}} so that the error can be caught and fixed. |
+ | |||
+ | |||
+ | * {{ll|<tvar|url>Extension status|release status colour scheme}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td>'''type1'''<br/>''type2''<br/>''type3''<br/>''type4''<br/>''type5''<br/>''type6''<br/></td><td><span id="type">''' | + | <td>'''type1'''<br/>''type2''<br/>''type3''<br/>''type4''<br/>''type5''<br/>''type6''<br/></td><td><span id="type">''' implementation type'''</span><!-- id here so at top of documentation --> |
+ | |||
+ | |||
+ | The implementation strategy(s) employed in building this extension. This parameter is used to create categories that help programmers find examples of various MediaWiki specific implementation strategies or patterns. Although the values of this parameter sometimes coincide with the use case or purpose of an extension, that is not reason for this parameter. | ||
+ | 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 {{ll|<tvar|url>Help:Categories|category links}} as needed. | ||
− | |||
− | |||
− | |||
− | |||
Allowed values for the '''type1''', '''type2''', ... parameters are: | Allowed values for the '''type1''', '''type2''', ... parameters are: | ||
− | * <tvar|parser>'''''{{ll|Category:Parser extensions|parser}}''''' | + | * <tvar|parser>'''''{{ll|Category:Parser extensions|parser}}''''' - catchall for uncategorized {{ll|<tvar|url1>Manual:Extending wiki markup|parser extensions}}. If you have written a parser extension, please use one of the following more specific types: |
− | ** <tvar|conthandl>''{{ll|Category:ContentHandler extensions|contenthandler}}'' | + | ** <tvar|conthandl>''{{ll|Category:ContentHandler extensions|contenthandler}}'' - Extensions using <tvar|contenthandler>{{ll|Manual:ContentHandler|ContentHandler}}. |
− | ** <tvar|link>''{{ll|Category:Link markup extensions|link}}'' | + | ** <tvar|link>''{{ll|Category:Link markup extensions|link}}'' - customized {{ll|<tvar|url2>Manual:Extending wiki markup|link markup}}, e.g. <tvar|xmp1><code><nowiki>[[</nowiki>...]]</code> |
− | ** <tvar|parserfunction>''{{ll|Category:Parser function extensions|parser function}}'' | + | ** <tvar|parserfunction>''{{ll|Category:Parser function extensions|parser function}}'' - custom {{ll|<tvar|url3>Manual:Parser functions|parameterized template markup}}, e.g. <tvar|xmp2><code><nowiki>{{</nowiki>''#name:'' ... <nowiki>}}</nowiki></code> |
− | ** <tvar|tag>''{{ll|Category:Tag extensions|tag}}'' | + | ** <tvar|tag>''{{ll|Category:Tag extensions|tag}}'' - {{ll|<tvar|url4>Manual:Tag extensions|custom XML tag markup}}, e.g. <tvar|xmp4><code><nowiki><</nowiki>''tagname''>...<nowiki></</nowiki>''tagname''></code> |
− | ** <tvar|variable>''{{ll|Category:Variable extensions|variable}}'' | + | ** <tvar|variable>''{{ll|Category:Variable extensions|variable}}'' - custom {{ll|<tvar|url5>Manual:Variables|unparameterized template markup}}, e.g. <tvar|xmp5><code><nowiki>{{NAME}}</nowiki></code> |
− | ** <tvar|xtdsyntax>''{{ll|Category:Extended syntax extensions|extended syntax}}'' | + | ** <tvar|xtdsyntax>''{{ll|Category:Extended syntax extensions|extended syntax}}'' - Extensions that add non-standard wiki syntax (i.e. <em>not</em> {{ll|<tvar|url61>Manual:Tag extensions|tags}}, {{ll|<tvar|url62>Manual:Parser functions|parser functions}}, or {{ll|<tvar|url63>Manual:Variables|variables}}). |
*: | *: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | + | * <tvar|access>{{ll|Category:User access extensions|'''''access'''''}} - catchall for {{ll|<tvar|url1>Manual:User access extensions|user access extensions}}, 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: |
− | * <tvar|interface>{{ll|Category:User interface extensions|'''''interface'''''}} | + | ** <tvar|useractivity>{{ll|Category:User activity extensions|''user activity''}} - extensions that monitor user activity (logins, logouts, new user creation, etc.) |
− | ** <tvar|media>''{{ll|Category:Media handling extensions|media}}'' | + | ** <tvar|useridentity>{{ll|Category:User identity extensions|''user identity''}} - extensions that create and delete users, and/or verify the identity of a user |
− | ** <tvar|mywiki>''{{ll|Category:Personalization extensions|mywiki}}'' | + | ** <tvar|userrights>{{ll|Category:User rights extensions|''user rights''}} - 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|skip>#rights|rights parameter]]) |
− | ** <tvar|notify>{{ll|Category:Notification extensions|''notify''}} | + | |
− | ** <tvar|catpageaction>''{{ll|Category:Page action extensions|''page action''}}'' | + | |
− | ** <tvar|search>{{ll|Category:Search extensions|''search''}} | + | * <tvar|interface>{{ll|Category:User interface extensions|'''''interface'''''}} - catchall for uncategorized user interface extensions. |
− | ** <tvar|skin>{{ll|Category:Skin extensions|''skin''}} | + | ** <tvar|media>''{{ll|Category:Media handling extensions|media}}'' - extensions that permit the embedding of multimedia content on wiki pages by registering a file extension with <tvar|wgMediaHandlers>{{ll|Manual:$wgMediaHandlers|$wgMediaHandlers}}. |
− | ** <tvar|catajax>{{ll|Category:Ajax extensions|''ajax''}} | + | ** <tvar|mywiki>''{{ll|Category:Personalization extensions|mywiki}}'' - extensions that provide infrastructure so that users may personalize their MediaWiki experience and/or assist in the management of that infrastructure |
− | ** <tvar|special>{{ll|Category:Special page extensions|''special''}} | + | ** <tvar|notify>{{ll|Category:Notification extensions|''notify''}} - extensions that email users, broadcast messages and provide other forms of community notification |
+ | ** <tvar|catpageaction>''{{ll|Category:Page action extensions|''page action''}}'' - extensions that enhance or modify <tvar|pageaction>{{ll|Manual:Page action|page action}}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|userrights>''user rights'') or logs (use <tvar|useractivity>''user activity''). | ||
+ | ** <tvar|search>{{ll|Category:Search extensions|''search''}} - extensions that search through and select articles for users. | ||
+ | ** <tvar|skin>{{ll|Category:Skin extensions|''skin''}} - 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. | ||
+ | ** <tvar|catajax>{{ll|Category:Ajax extensions|''ajax''}} - extensions that use [[w:AJAX|Ajax]] programming techniques. | ||
+ | ** <tvar|special>{{ll|Category:Special page extensions|''special''}} - extensions that subclass the <tvar|specialpage>{{Class doclink|SpecialPage}} class, use one of its hooks, or patch one or more functions in <tvar|filephp>{{Git file|file=includes/specialpage/SpecialPage.php|text=SpecialPage.php}}. See <tvar|manual>{{ll|Manual:Special pages|Special pages}} for more information. | ||
+ | |||
− | |||
* '''other''' | * '''other''' | ||
− | ** <tvar|api>{{ll|Category:API extensions|''api''}} | + | ** <tvar|api>{{ll|Category:API extensions|''api''}} - extensions that add a new API module or extend a core API module. |
− | ** <tvar|hook>{{ll|Category:Hook extensions|''hook''}} | + | ** <tvar|hook>{{ll|Category:Hook extensions|''hook''}} - Hook extension - defines a <em>new</em> hook - see hook1, etc. below if you want to define hooks <em>used</em> by your extension |
− | ** <tvar|database>{{ll|Category:Database extensions|''database''}} | + | ** <tvar|database>{{ll|Category:Database extensions|''database''}} - adds tables and/or fields to the database backing a MediaWiki installation |
− | ** <tvar|dataextraction>{{ll|Category:Data extraction extensions|''data extraction''}} | + | ** <tvar|dataextraction>{{ll|Category:Data extraction extensions|''data extraction''}} - Data extraction |
− | ** <tvar|filerepo>{{ll|Category:File repository extensions|''filerepo''}} | + | ** <tvar|filerepo>{{ll|Category:File repository extensions|''filerepo''}} - extension that adds new file repository types as file backend |
− | ** <tvar|example>{{ll|Category:Extension examples|''example''}} | + | ** <tvar|example>{{ll|Category:Extension examples|''example''}} - Not a real extension, but an example of how to write one |
− | |||
− | |||
− | < | + | 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:}}]]. |
− | Note: Many extensions have more than one type, if this applies to yours, replace <tvar|type><code><nowiki>|type=</nowiki></code | + | |
+ | |||
+ | 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.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span id="hook">'''hook1'''</span><br/>''hook2''<br/>''hook3''<br/>''hook4''<br/>...<br/>''hook90''</td> | <td><span id="hook">'''hook1'''</span><br/>''hook2''<br/>''hook3''<br/>''hook4''<br/>...<br/>''hook90''</td> | ||
− | <td valign="top">''' | + | <td valign="top">''' name of each hook used by the extension''' |
− | + | ||
− | Entering values in this field is a good way to get exposure for your extension and help other developers. | + | 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 article so that programmers can easily find examples of extensions that use a particular hook. | This category is autolinked to each hook article so that programmers can easily find examples of extensions that use a particular hook. | ||
− | + | ||
For built-in hooks: | For built-in hooks: | ||
− | * use the hook name alone. Please see <tvar|manual>{{ll|Manual:Hooks|Manual:Hooks}} | + | * use the hook name alone. Please see <tvar|manual>{{ll|Manual:Hooks|Manual:Hooks}} for values (but omit introductory '/'). |
+ | |||
− | |||
For custom hooks defined by extensions: | For custom hooks defined by extensions: | ||
− | * use <tvar|form>''extensionName''/''hookName'' | + | * use <tvar|form>''extensionName''/''hookName''. For a partial list of custom hooks, see <tvar|exthooks>[[Extension hook registry]]. |
+ | |||
− | |||
For multiple hooks, assign the first hook to '''hook1''', the second to '''hook2''' and so on.</td> | For multiple hooks, assign the first hook to '''hook1''', the second to '''hook2''' and so on.</td> | ||
</tr> | </tr> | ||
<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" | + | <td valign="top"> |
'''name of each hook provided by the extension''' | '''name of each hook provided by the extension''' | ||
− | + | ||
− | You might also want to add the hooks to <tvar|exthooks>[[Extension hook registry]] | + | You might also want to add the hooks to <tvar|exthooks>[[Extension hook registry]].</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="username">'''username'''</span></td><td | + | <td><span id="username">'''username'''</span></td><td> 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 <nowiki>[[]]</nowiki>s.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="author">author</span></td><td | + | <td><span id="author">author</span></td><td> The extension author's name, if different from their MediaWiki.org username. Free text. If omitted then the 'username' field will be used (if present).</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="description">'''description'''</span></td><td>''' | + | <td><span id="description">'''description'''</span></td><td>''' short description'''</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="image">image</span></td><td | + | <td><span id="image">image</span></td><td> screenshot or logo of extension. It should be provided without namespace and without <nowiki>[[]]</nowiki>s.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="imagesize">imagesize</span></td><td | + | <td><span id="imagesize">imagesize</span></td><td> ''facultative'', size of the image (default size is 220px)</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="version">version</span></td><td | + | <td><span id="version">version</span></td><td> last version</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="update">update</span></td><td | + | <td><span id="update">update</span></td><td> date of the last update</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="compatibility_policy">compatibility policy</span></td><td | + | <td><span id="compatibility_policy">compatibility policy</span></td><td> {{ll|Compatibility#mediawiki_extensions|compatibility policy}} (accepted values are '''master''' and <tvar|3>'''rel'''). ({{ll|Category:Extensions without a compatibility policy| backlog}})</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="mediawiki">mediawiki</span></td><td | + | <td><span id="mediawiki">mediawiki</span></td><td> required version of MediaWiki</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="php">php</span></td><td | + | <td><span id="php">php</span></td><td> required version of PHP</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="needs-updatephp">needs-updatephp</span></td><td | + | <td><span id="needs-updatephp">needs-updatephp</span></td><td> |
− | <tvar|yes><code>yes</code | + | <tvar|yes><code>yes</code> 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|no><code>no</code> 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 <tvar|target><code>$IP/extensions/ExtensionName</code | + | 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|target><code>$IP/extensions/ExtensionName</code> and inserted <tvar|code><code>wfLoadExtension( "ExtensionName");</code> into "LocalSettings.php", run from the command line: |
cd path/to/wiki_install_directory | cd path/to/wiki_install_directory | ||
Line 695: | Line 695: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="php">composer</span></td><td | + | <td><span id="php">composer</span></td><td> If applicable the name of the "vendor" as well as the "package" should be entered in the format <tvar|format><code>vendor/package</code>, e.g. <tvar|xmp><code>mediawiki/semantic-media-wiki</code> to point people directly to packagist.org, which serves as the package archive.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="table1">'''table1'''</span><br/>''table2''<br/>''table3''<br/>''table4''<br/>...<br/>''table30''</td><td | + | <td><span id="table1">'''table1'''</span><br/>''table2''<br/>''table3''<br/>''table4''<br/>...<br/>''table30''</td><td> |
'''name of each ''non-core'' table used by the extension''' | '''name of each ''non-core'' table used by the extension''' | ||
− | + | ||
− | Links to a subpage of your extension page. For instance, "<tvar|table1>table1 = cu_changes | + | 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.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="license">license</span></td><td | + | <td><span id="license">license</span></td><td> license governing use of this extension, as one of the codes found in <tvar|url>https://spdx.org/licenses/, e.g. <tvar|later2><code>GPL-2.0-or-later</code>, <tvar|only2><code>GPL-2.0-only</code> or <tvar|later3><code>GPL-3.0-or-later</code>, etc.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="download">'''download'''</span></td><td | + | <td><span id="download">'''download'''</span></td><td> '''link to the download''' : <tvar|url>[https://phabricator.wikimedia.org/r/project/mediawiki/core Git], <tvar|wikimediadownload>{{tl|WikimediaDownload{{#translation:}}}} with <tvar|server>server=svn in case it was not migrated from <tvar|svn>{{ll|Subversion|Subversion}}. If you put the code into page in the MediaWiki wiki, link to it using a full page name and section name, e.g. <tvar|code><code> <nowiki>[[Extension:Example/version_1.22a#Code]]</nowiki> </code> (it must remain valid when bot-copied elsewhere)</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="readme">readme</span></td><td | + | <td><span id="readme">readme</span></td><td> external link to the <tvar|readme>readme file, e.g. <tvar|url>https://phabricator.wikimedia.org/r/browse/mediawiki/extensions/Flow;master;README</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="changelog">changelog</span></td><td | + | <td><span id="changelog">changelog</span></td><td> external link to the changelog file, e.g. <tvar|url>[[Extension:LDAP Authentication/Changelog]]</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="parameters">parameters</span></td><td | + | <td><span id="parameters">parameters</span></td><td> available parameters for LocalSettings.php</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="tags">tags</span></td><td | + | <td><span id="tags">tags</span></td><td> any tags your extension uses (e.g. <tvar|tags><tag1>, <tag2>).</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td>rights</td><td><span id="rights"></span> | + | <td>rights</td><td><span id="rights"></span> rights added by the extension. '''Not to be confused with the license!''' Rights are such as <tvar|makebot>''{{ll|Extension:MakeBot|makebot}}'' or <tvar|desysop>''{{ll|Extension:Desysop|desysop}}'', not such as GFDL or LGPL or GPL - those are licenses!</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="namespace">namespace</span></td><td | + | <td><span id="namespace">namespace</span></td><td> namespace in which this extension is used</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="example">example</span></td><td | + | <td><span id="example">example</span></td><td> example, website or screenshot of working extension</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="compatibility">compatibility</span></td><td | + | <td><span id="compatibility">compatibility</span></td><td> Additional compatibility information, for instance compatibility charts (formerly using <tvar|testext>[[Template:Extension Testing]]). It's encouraged to add any client-side compatibility information here too, especially when diverging from {{ll|<tvar|url>Compatibility#Browsers|expectations of full support for a browser}}.</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="translate">translate</span></td><td | + | <td><span id="translate">translate</span></td><td> |
− | Optional parameter to link the exact page where ({{ll|<tvar|url>Help:Extension:Translate/Glossary | + | Optional parameter to link the exact page where ({{ll|<tvar|url>Help:Extension:Translate/Glossary|message group id}} with which) the extension will be translatable on <tvar|translatewiki>[[translatewiki.net]] if enabled. If the default link is incorrect, manually set it to: |
− | * <tvar|lowercase>ext-LOWERCASE | + | * <tvar|lowercase>ext-LOWERCASE(<tvar|nospaces>NOSPACES(Label as defined in <tvar|file>{{git file|project=translatewiki|branch=HEAD|file=groups/MediaWiki/ExtensionsAgg.yaml|text=config}})), 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|tranlwikispectransl>[[translatewiki:Special:Translate]] | + | ** typing the name of the extension in the search/filter box at <tvar|tranlwikispectransl>[[translatewiki:Special:Translate]] or |
− | ** searching for its name in <tvar|transwikilangstat>[https://translatewiki.net/w/i.php?title=Special%3ALanguageStats&x=D languagestats] | + | ** searching for its name in <tvar|transwikilangstat>[https://translatewiki.net/w/i.php?title=Special%3ALanguageStats&x=D languagestats] after clicking "expand all".</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="bugzilla">bugzilla</span></td><td | + | <td><span id="bugzilla">bugzilla</span></td><td> Bugzilla MediaWiki extension component name</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="phabricator">phabricator</span></td><td | + | <td><span id="phabricator">phabricator</span></td><td> Phabricator project name</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><span id="CheckUsageNameOverride">CheckUsageNameOverride</span></td><td | + | <td><span id="CheckUsageNameOverride">CheckUsageNameOverride</span></td><td> override the page name used for the check usage link. |
</tr> | </tr> | ||
</table> | </table> | ||
Line 755: | Line 755: | ||
{{anchor|Control parameters}} | {{anchor|Control parameters}} | ||
− | == Control parameters == | + | == Control parameters == |
<table class="wikitable"> | <table class="wikitable"> | ||
− | <caption>''' | + | <caption>''' Control parameters'''</caption> |
<tr> | <tr> | ||
− | <th | + | <th> Parameter</th> |
− | <th | + | <th> Description</th> |
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td>'''templatemode'''</td><td | + | <td>'''templatemode'''</td><td> |
'''Controls auto-categorization of host page.''' | '''Controls auto-categorization of host page.''' | ||
− | + | ||
Normally left blank. Alternate values are: | Normally left blank. Alternate values are: | ||
− | * <tvar|nocats>''nocats'' | + | * <tvar|nocats>''nocats'' - suppresses categorization and the 'check usage' link. Use this value if you are adding this template to {{ll|<tvar|url>Help:Subpage|subpages}} of an extension or to how-to documentation of extensions. For example, the usage image above sets <tvar|nocats><code>templatemode=nocats</code> because this isn't an actual extension page and we don't want to add this page to any categories on account of it. |
− | * <tvar|nousage>''nousage'' | + | * <tvar|nousage>''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 '<tvar|templatemode>templatemode=nocats' |
− | + | ||
− | If this is left blank, this template will add the host page to <tvar|allextcat>[[:Category:All extensions{{#translation:}}]] | + | 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]].</td> |
</tr> | </tr> | ||
</table> | </table> | ||
− | == Using the infobox == | + | == Using the infobox == |
− | === Existing extension pages === | + | === Existing extension pages === |
− | |||
− | |||
− | === Create a new extension article === | + | If you want to add the infobox to an existing page, copy and paste the code at the [[#CutAndPaste|top of this page]]. |
+ | |||
+ | === Create a new extension article === | ||
+ | |||
− | |||
If you want to create a new extension page, enter the name below and click the button. | 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. | A new page will be created with the infobox template already in place. | ||
Line 797: | Line 797: | ||
− | == Enhancing this template == | + | == Enhancing this template == |
+ | |||
− | |||
If you would like to improve on this template, thanks! | If you would like to improve on this template, thanks! | ||
− | + | ||
This is a complicated template so here is some help along the way: | This is a complicated template so here is some help along the way: | ||
− | === The Create extension button === | + | === The Create extension button === |
+ | |||
− | |||
To improve the create extension button behavior: | To improve the create extension button behavior: | ||
− | |||
− | |||
− | |||
− | === Infobox parameters === | + | * '''<tvar|extsample>{{ll|Template:Extension/Sample}}:''' The boilerplate extension that is preloaded into newly-created pages. |
+ | * '''<tvar|extinpbox>{{ll|Template:Extension/CreateExtensionInputBox}}:''' An input box that can be inserted wherever you want users to easily create extensions. For documentation on the <tvar|tagvalue><code><nowiki><inputbox></nowiki></code> tag, please see <tvar|url>{{ll|Extension:InputBox|Extension:InputBox}}. | ||
+ | |||
+ | === Infobox parameters === | ||
+ | |||
− | |||
In general: | 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 {{ll|<tvar|anchor>Template:Extension#Content parameters|content parameter documentation}} and link its label to that documentation. |
+ | |||
+ | |||
To change/correct/add to the implementation type parameters: | To change/correct/add to the implementation type parameters: | ||
− | * Check the [[<tvar|url>Template_talk:Extension | + | * Check the [[<tvar|url>Template_talk:Extension|talk page]] - there have been some extensive discussions about this field. |
− | * '''<tvar|typeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}} | + | * '''<tvar|typeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}}:''' Stores the possible values for the type field. Multiple values are implemented by calling this template with <tvar|foreach>[[Template:Foreach]]. |
− | * '''<tvar|typeswitchnocats>{{ll|Template:Extension/TypeSwitchNoCats|Template:Extension/TypeSwitchNoCats}} | + | * '''<tvar|typeswitchnocats>{{ll|Template:Extension/TypeSwitchNoCats|Template:Extension/TypeSwitchNoCats}}:''' Does not need to be modified when adding a new type. Used instead of <tvar|typeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}} when this template is used in <tvar|nocats><code>templatemode=nocats</code>. Templates used with <tvar|foreach>[[Template:Foreach]] can only take one parameter so we need to wrap the call to <tvar|tpeswitch>{{ll|Template:Extension/TypeSwitch|Template:Extension/TypeSwitch}} with another template that sets the mode. |
+ | |||
− | |||
To change the behavior of the hook parameters: | To change the behavior of the hook parameters: | ||
− | |||
− | |||
− | |||
− | == Test case == | + | * '''<tvar|hookinuse>[[Template:Extension/HookInUse]]:''' Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with <tvar|foreach>[[Template:Foreach]]. |
+ | * '''<tvar|hookinusenocats>[[Template:Extension/HookInUseNoCats]]:''' Used instead of <tvar|hookinuse>[[Template:Extension/HookInUse]] when this template is used in <tvar|nocats><code>templatemode=nocats</code>. Templates used with <tvar|feach>[[Template:Foreach]] can only take one parameter so we need to wrap the call to <tvar|hookuse>[[Template:Extension/HookInUse]] with another template that sets the mode. | ||
+ | |||
+ | == Test case == | ||
+ | |||
− | |||
See if the following pages are still ok, after edited this template. | See if the following pages are still ok, after edited this template. | ||
* [[Extension:Description2]] | * [[Extension:Description2]] |
Latest revision as of 18:13, 21 December 2019

![]() | This template employs intricate features of template syntax.
You are encouraged to familiarize yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general sandbox or your user space before changing anything here. |
This template should be added to all extension pages on this wiki (but only the main page).
It will add a useful infobox (see below) and will automatically add the extension to Category:All extensions , along with the appropriate status and {{<tvar|3>ll|Category:Extensions by implementation type|implementation type}} categories.
Usage
Copy and paste: {{Extension |templatemode = |name = |status = |type1 = |type2 = |hook1 = |hook2 = |newhook1 = |newhook2 = |username = |author = |description = |image = |imagesize = |version = |update = |version preview = |update preview = |compatibility policy = |mediawiki = |php = |needs-updatephp = |composer = |table1 = |table2 = |license = |download = |readme = |changelog = |example = |namespace = |parameters = |tags = |rights = |compatibility = |bugzilla = |phabricator = |vagrant-role = }}For help with parameter values, see below. |
|
Content parameters
This section describes parameters that govern infobox content.
For help with templatemode and other control parameters, please see Control parameters.
Parameter | Description |
---|---|
name | name of the extension |
status | current release status
Maintenance: vulnerabilities, archived |