Difference between revisions of "Template:Extension"

From WPRDC Wiki
Jump to navigation Jump to search
>Wladek92
(adding < translate > sections)
>Wladek92
(Marked this version for translation)
Line 793: Line 793:
To improve the create extension button behavior:
To improve the create extension button behavior:


<!--T:182-->
* '''<tvar|extsample>[[Template:Extension/Sample]]</>:''' The boilerplate extension that is preloaded into newly-created pages.
* '''<tvar|extsample>[[Template:Extension/Sample]]</>:''' The boilerplate extension that is preloaded into newly-created pages.
* '''<tvar|extinpbox>[[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}}</>.
* '''<tvar|extinpbox>[[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 ===
=== Infobox parameters === <!--T:183-->


<!--T:184-->
In general:
In general:


<!--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 {{ll|<tvar|anchor>Template:Extension#Content parameters</>|content parameter documentation}} and link its label to that documentation.
* 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.


<!--T:186-->
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</>|talk page]] - there have been some extensive discussions about this field.
* Check the [[<tvar|url>Template_talk:Extension</>|talk page]] - there have been some extensive discussions about this field.
Line 807: Line 811:
* '''<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.
* '''<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.


<!--T:187-->
To change the behavior of the hook parameters:
To change the behavior of the hook parameters:


<!--T:188-->
* '''<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|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.
* '''<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 ==
== Test case == <!--T:189-->


<!--T:190-->
See if the following pages are still ok, after edited this template.</translate>
See if the following pages are still ok, after edited this template.</translate>
* [[Extension:Description2]]
* [[Extension:Description2]]

Revision as of 20:56, 17 November 2019

<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:}}]]