Difference between pages "Template:Barnstar documentation" and "Template:Barnstar documentation/sandbox"

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Mdaniels5757
(allow autosubsting option to be passed through)
 
imported>BrownHairedGirl
(update categs)
 
Line 1: Line 1:
<includeonly>{{Documentation
+
{{Documentation
  | content =
+
  | content =<noinclude>
{{#ifeq:{{{autosubst|}}}|yes|{{Subst only|auto=yes}}|{{Subst only}}}}
+
== Purpose ==
{{#if:{{{header|}}}|{{{header|}}}}}{{#if:{{{for|}}}|<h2>Criteria</h2>{{{for|}}}}}
+
 
<h2>Usage</h2>
+
This template is used to provide generic documentation for most of the [[WP:barnstar|barnstar]] templates.
 +
 
 +
Parameters available are:
 +
*{{para|for}} Used to briefly describe what the award is for.
 +
*{{para|alt}} set to ''yes'' if there is an alt parameter which is used to show an alternative image.
 +
*{{para|nomessage}} set to ''yes'' if there is not any option to customise the awards message.
 +
*{{para|autosign}} set to ''yes'' if the template automatically signs the message.
 +
*{{para|header}} Used to add any header notes to docs. Add things such as shortcut links here.
 +
*{{para|footer}} Used to add any footer notes to docs.
 +
*{{para|usage}} Used to replace the standard ''Usage''-section with a user defined.
 +
*{{para|cat}} Category name (without "Category:"), if it is something more specific than [[:Category:Wikipedia barnstar templates‎|Wikipedia barnstar templates‎]]
 +
**Templates will be added automatically to [[:Category:Wikipedia barnstar templates‎]],
 +
**if the {{para|alt}} is set to ''yes'', they will be added to [[:Category:Wikipedia barnstar templates with alternative versions]],
 +
**if the {{para|nocats}} is set to ''yes'', the template will not be added to any categories.
 +
 
 +
Templates beginning with ''The'' like {{tl|The Jupiter Barnstar}} should include a {{tl|DEFAULTSORT}} (in this case: ''<nowiki>{{DEFAULTSORT:Jupiter Barnstar, The}}</nowiki>'').
 +
 
 +
== Usage (of this template) ==
 +
* Like the general {{tl|Documentation}} template, place {{tlc|Barnstar documentation}} between [[WP:NOINCLUDE|<nowiki><noinclude></nowiki>]] tags below the barnstar template code.  Be sure to place the first tag, <code><nowiki><noinclude></nowiki></code> (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.
 +
* The next "Usage" header and the text beneath it will be included in the barnstar documentation under that header unless altered by the <code><nowiki>usage=</nowiki></code> parameter.
 +
</noinclude><includeonly>
 +
{{substituted}}</includeonly>
 +
{{{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||&#32;<nowiki>~~</nowiki><nowiki>~~</nowiki>}}}}<!-- end of nomessage if --><nowiki>}}</nowiki></code>
+
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||&#32;<nowiki>~~~~</nowiki>}}}}<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>|alt</nowiki></code> to the end:
<code><nowiki>{{subst:</nowiki>{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{BASEPAGENAME}}|{{FULLPAGENAME}}}}<nowiki>|</nowiki>put your message here{{#ifeq:{{{autosign|}}}|yes||&#32;<nowiki>~~</nowiki><nowiki>~~</nowiki>}}<nowiki>|alt}}</nowiki></code><br>
+
<code><nowiki>{{subst:</nowiki>{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{BASEPAGENAME}}|{{FULLPAGENAME}}}}<nowiki>|</nowiki>put your message here{{#ifeq:{{{autosign|}}}|yes||&#32;<nowiki>~~~~</nowiki>}}<nowiki>|alt}}</nowiki></code><br>
 
Which produces:
 
Which produces:
{{ {{FULLPAGENAME}}|put your message here <nowiki>~~</nowiki><nowiki>~~</nowiki>|alt}}
+
{{{{FULLPAGENAME}}|message <nowiki>~~~~</nowiki>|alt}}
 
[[Category:Wikipedia barnstar templates with alternative versions]]
 
[[Category:Wikipedia barnstar templates with alternative versions]]
}}<!-- end of alt if -->
+
}}
}}<!-- end of usage if -->
+
}}
 
{{{footer|}}}
 
{{{footer|}}}
<!-- *** transclusion of /doc if it exists *** -->{{#ifexist:{{FULLPAGENAME}}/doc|{{ {{FULLPAGENAME}}/doc}} }}
 
  
|link box=This documentation is transcluded from [[Template:Barnstar documentation]]. <span style="font-size:small; font-style: normal line-height:130%">([{{fullurl:Template:Barnstar documentation|action=edit}} edit] &#124; [{{fullurl:Template:Barnstar documentation|action=history}} history])</span><br />Editors can experiment in this {{#switch: {{SUBJECTSPACE}} | {{ns:module}} = module's | #default = template's}} <!--
+
<!-- *** transclusion of /doc if it exists *** -->
 +
{{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}}
 +
}}
  
links for /sandbox -->{{
+
|link box=This documentation is transcluded from [[Template:Barnstar documentation]]. <span style="font-size:small; font-style: normal line-height:130%">([{{fullurl:Template:Barnstar documentation|action=edit}} edit] &#124; [{{fullurl:Template:Barnstar documentation|action=history}} history])</span><br />Editors can experiment in this {{#switch: {{SUBJECTSPACE}} | {{ns:module}} = module's | #default = template's}} {{
 
         #ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
 
         #ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
         | <!-- links for "sandbox (edit|diff)"-->[[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] <nowiki>|</nowiki> [{{fullurl:Special:ComparePages | page1={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&page2={{urlencode:{{{sandbox|{{FULLPAGENAME}}/sandbox}}}}}}} diff])</small>  
+
         | [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] <nowiki>|</nowiki> [{{fullurl:Special:ComparePages | page1={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&page2={{urlencode:{{{sandbox|{{FULLPAGENAME}}/sandbox}}}}}}} diff])</small>  
         | <!-- links for "sandbox (create|mirror)"-->sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-{{#ifeq: {{SUBJECTSPACE}}|{{ns:Module}}|module-}}sandbox }} create] <nowiki>|</nowiki> [{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&summary={{urlencode:Create sandbox version of [[{{{template page|{{FULLPAGENAME}}}}}]]}} }} mirror])</small>
+
         | sandbox <small style="font-style: normal">([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload=Template:Documentation/preload-{{#ifeq: {{SUBJECTSPACE}}|{{ns:Module}}|module-}}sandbox }} create] <nowiki>|</nowiki> [{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&preload={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&summary={{urlencode:Create sandbox version of [[{{{template page|{{FULLPAGENAME}}}}}]]}} }} mirror])</small>
         }} and <!--
+
         }} and {{
 
 
links for /testcases -->{{
 
 
         #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
 
         #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
 
         | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
 
         | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small>
 
         | testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-{{#ifeq: {{SUBJECTSPACE}}|{{ns:Module}}|module-}}testcases }} create])</small>
 
         | testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-{{#ifeq: {{SUBJECTSPACE}}|{{ns:Module}}|module-}}testcases }} create])</small>
         }} pages. <br /><!--
+
         }} pages. <br />{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop
 
 
Protection info -->{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop
 
 
  |<br/>This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Category_interwiki/preload}} /doc] subpage, which is not protected, while [[H:ILL|interlanguage links]] should be added to Wikidata.  For more information see [[Wikipedia:Wikidata]].
 
  |<br/>This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Category_interwiki/preload}} /doc] subpage, which is not protected, while [[H:ILL|interlanguage links]] should be added to Wikidata.  For more information see [[Wikipedia:Wikidata]].
 
}}
 
}}
}}<!-- closing tag of [[Template:Documentation]]
+
}}<includeonly>{{#ifeq:{{{nocats|no}}}|yes | |{{#ifeq:{{{alt|}}}|yes |[[Category:Barnstars with alternative versions]] |[[Category:{{{cat|Barnstar award templates}}}]]}} }}</includeonly><noinclude>
 +
 
 +
{{#ifeq:{{SUBPAGENAME}}|sandbox||
 +
[[Category:Documentation pages]]
 +
[[Category:Template documentation]]
  
categorization -->{{#ifeq:{{{nocat|{{{nocats|no}}}}}}|yes|<!--
+
}}</noinclude>
  explicit nocat=yes -->|<!--
 
  top-level categories-->{{#ifeq:{{{alt|}}}|yes|[[Category:Wikipedia barnstar templates with alternative versions]]|{{#if:{{{cat|}}}|<!--more specific below-->|[[Category:Wikipedia barnstar templates]]}}}}<!--
 
  parameter "cat"-->{{#if:{{{cat|}}}|[[Category:{{{cat|}}}]]}}<!--
 
closing of the nocat if-->}}</includeonly><noinclude>
 
{{Documentation}}
 
</noinclude>