Template:Barnstar documentation: Difference between revisions
m fix typo (extraneous | breaks the if) |
link to the Barnstar page |
||
(17 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{Documentation |
<includeonly>{{Documentation |
||
| content = |
| content = |
||
{{#ifeq:{{{autosubst|}}}|yes|{{Subst only|auto=yes}}|{{Subst only}}}} |
|||
{{substituted}} |
|||
{{#if:{{{header|}}}| |
{{#if:{{{header|}}}|{{{header|}}}}}{{#if:{{{for|}}}|<h2>Criteria</h2>{{{for|}}}}} |
||
<h2>Usage</h2> |
|||
{{{header|}}}}}{{#if:{{{for|}}}| |
|||
== Criteria == |
|||
{{{for|}}}}} |
|||
== Usage == |
|||
{{#if:{{{usage|}}}|{{{usage}}}| |
{{#if:{{{usage|}}}|{{{usage}}}| |
||
To use this template, add <code><nowiki>{{subst:</nowiki>{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{BASEPAGENAME}}|{{FULLPAGENAME}}}}{{#ifeq:{{{nomessage|}}}|yes||<nowiki>|1=</nowiki><var>Put your message here.</var>{{#ifeq:{{{autosign|}}}|yes|| <nowiki>~~</nowiki><nowiki>~~</nowiki>}}}}<!-- end of nomessage if --><nowiki>}}</nowiki></code> |
To use this [[WP:Barnstars|Barnstar]] template, create a new section on the user talkpage of the user you want to give the award to, and add <code><nowiki>{{subst:</nowiki>{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{BASEPAGENAME}}|{{FULLPAGENAME}}}}{{#ifeq:{{{nomessage|}}}|yes||<nowiki>|1=</nowiki><var>Put your message here.</var>{{#ifeq:{{{autosign|}}}|yes|| <nowiki>~~</nowiki><nowiki>~~</nowiki>}}}}<!-- end of nomessage if --><nowiki>}}</nowiki></code> |
||
to the talk page of the user to whom you wish to award it. |
to the talk page of the user to whom you wish to award it. |
||
{{#ifeq:{{{alt|}}}|yes |
{{#ifeq:{{{alt|}}}|yes |
||
|This barnstar has an alternate version.<br />To use, add <code><nowiki>|alt</nowiki></code> to the end: |
|This barnstar has an alternate version.<br />To use, add <code><nowiki>|2=alt</nowiki></code> to the end: |
||
<code><nowiki>{{subst:</nowiki>{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{BASEPAGENAME}}|{{FULLPAGENAME}}}}<nowiki>|</nowiki> |
<code><nowiki>{{subst:</nowiki>{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{BASEPAGENAME}}|{{FULLPAGENAME}}}}<nowiki>|1=</nowiki><var>Put your message here.</var>{{#ifeq:{{{autosign|}}}|yes|| <nowiki>~~</nowiki><nowiki>~~</nowiki>}}<nowiki>|2=alt}}</nowiki></code><br> |
||
Which produces: |
Which produces: |
||
{{ {{FULLPAGENAME}}| |
{{ {{FULLPAGENAME}}|Put your message here <nowiki>~~</nowiki><nowiki>~~</nowiki>|alt}} |
||
[[Category:Wikipedia barnstar templates with alternative versions]] |
|||
}}<!-- end of alt if --> |
}}<!-- end of alt if --> |
||
}}<!-- end of usage if --> |
}}<!-- end of usage if --> |
||
Line 41: | Line 37: | ||
}}<!-- closing tag of [[Template:Documentation]] |
}}<!-- closing tag of [[Template:Documentation]] |
||
categorization -->{{Sandbox other||{{#if:{{yesno|{{{nocat|{{{nocats|no}}}}}}}}|<!-- |
|||
⚫ | |||
explicit nocat=yes -->|<!-- |
|||
⚫ | |||
parameter "cat"-->{{#if:{{{cat|}}}|[[Category:{{{cat|}}}]]}}<!-- |
|||
closing of the nocat if-->}}<!-- /sandbox other -->}}</includeonly><noinclude> |
|||
{{Documentation}} |
{{Documentation}} |
||
</noinclude> |
</noinclude> |
Latest revision as of 17:44, 4 December 2021
Purpose
This template is used to provide generic documentation for most of the barnstar templates.
Parameters available
|autosubst=
set to yes if you wish for a bot to automatically substitute the template.|header=
Used to add any header notes to docs. Add things such as shortcut links here.|for=
Used to briefly describe what the award is for.|usage=
Used to replace the standard Usage-section with a user defined.|nomessage=
set to yes if there is not any option to customise the awards message.|autosign=
set to yes if the template automatically signs the message.|alt=
set to yes if there is an alt parameter which is used to show an alternative image.|footer=
Used to add any footer notes to docs.- Categorization:
- if the
|nocat=
is set to yes, the template will not be added to any categories. |cat=
Category name (without "Category:"), if it is something more specific than Wikipedia barnstar templates- If
|cat=
is not specified, templates will be added automatically to Category:Wikipedia barnstar templates, - if the
|alt=
is set to yes, they will be added to Category:Wikipedia barnstar templates with alternative versions,
- if the
Templates beginning with The like {{The Jupiter Barnstar}} should include a {{DEFAULTSORT}} (in this case: {{DEFAULTSORT:Jupiter Barnstar, The}}).
Usage (of this template)
- Like the general {{Documentation}} template, place
{{Barnstar documentation}}
between <noinclude> tags below the barnstar template code. Be sure to place the first tag,<noinclude>
(the opening tag), after the very last code of the barnstar template. If the opening tag is placed on its own line below the template code, then it will introduce undesirable whitespace below the end-product barnstar template.
TemplateData
TemplateData for Barnstar documentation
This template is used to provide generic documentation for most of the barnstar templates.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Auto-substitute | autosubst | set to yes if you wish for a bot to automatically substitute the template.
| String | optional |
Header | header | Used to add any header notes to docs. Add things such as shortcut links here. | Content | optional |
Award for | for | Used to briefly describe what the award is for.
| Content | optional |
Usage | usage | Used to replace the standard Usage-section on the documentation of this barnstar instance with a user defined 'usage' section. | Content | optional |
No Message | nomessage | set to 'yes' if there are **no** options to customise the awards message. yes -> cannot customize message.
| String | optional |
Auto-sign | autosign | set to 'yes' if the template automatically signs the message (automatically signing the barnstar with the awarder's signature)
| String | optional |
Does an 'alt' version of this barnstar exist? | alt | set to 'yes' if there is an 'alt' parameter which is used to show an alternative image. Setting this to 'yes' will also add this barnstar template to the 'Wikipedia barnstar templates with alternative versions' category (unless 'nocat' is set to 'yes').
| String | optional |
Documentation footer | footer | Used to add any footer notes to this barnstar's docs. | Content | optional |
Barnstar sandbox | sandbox | Link to the '/sandbox' page for this barnstar template | Unknown | optional |
Barnstar template page | template page | Link to the actual template page for this barnstar | Unknown | optional |
Barnstar testcases page | testcases | Link to the actual '/testcases' page for this barnstar | Unknown | optional |
nocat | nocat nocats | If 'yes', this barnstar template will not be added to any categories
| String | optional |
Barnstar Category name | cat | Category name (without "Category:"), if it is something more specific than 'Category:Wikipedia barnstar templates'
| String | optional |