Template:High-use/doc: Difference between revisions

m
Remove |demo= for now for testing
Wikipedia >DB1729
(Restored revision 1025489887 by GKFX (talk): It is, afterall)
imported>Aidan9382
m (Remove |demo= for now for testing)
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
This is the {{tlx|high-use}} message box.
This is the {{tlx|high-use}} message box.


It is meant to be put at the top of the documentation subpage, for templates transcluded onto more than 2,000 pages. For templates where the number of pages is more than 100,000 or if the first parameter is set to "risk", a stronger wording is given.
It is meant to be put at the top of the documentation subpage for templates transcluded onto more than 2,000 pages. For templates transcluded onto more than 100,000 pages, or if the first parameter is set to <code>risk</code>, then a stronger wording is given.


'''Note''': It is normal that some of the links in the message box are red.
'''Note''': It is normal that some of the links in the message box are red.
Line 14: Line 14:
{{tlx |High-use |2=2=''discussion page, or use + notation'' |3=info=''additional text'' }}
{{tlx |High-use |2=2=''discussion page, or use + notation'' |3=info=''additional text'' }}


; all parameters
'''all parameters'''
<pre style="overflow:auto;">
<pre style="overflow:auto;">
{{High-use |1= |2= |info= |demo= |form= |expiry= }}
{{High-use |1= |2= |info= |demo= |form= |expiry= }}
Line 22: Line 22:
* <code>1=''number of transclusions''</code>: ''(deprecated)'' The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored, if transclusion data is available for the current page (generally, for templates with more than 2,000 transclusions).
* <code>1=''number of transclusions''</code>: ''(deprecated)'' The first parameter is either a static number of times the template has been transcluded, or the word "risk" (without quotes) to display "a very large number of" instead of the actual value. This value will be ignored, if transclusion data is available for the current page (generally, for templates with more than 2,000 transclusions).
* <code>2=''discussion page, or use + notation''</code>: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example, <code>2=WP:VPT</code> will insert a link to [[WP:VPT]]),
* <code>2=''discussion page, or use + notation''</code>: The second parameter is overloaded. It will cause the number of transclusions to display as "#,###+" instead of "approximately #,###" when set equal to "yes" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example, <code>2=WP:VPT</code> will insert a link to [[WP:VPT]]),
* <code>info=''extra information''</code>: When set to non-blank, will insert ''extra information'' into the template text.
* {{para|info|&lt;{{var|extra information}}>}}: When set to non-blank, will insert &lt;{{var|extra information}}> into the template text.
* <code>demo=''Template_name''</code>: Will use the transclusion count for the template at [[Template:Template_name]] instead of detecting what template it is being used on. Capitalization must exactly match the value used in [[Special:PrefixIndex/Module:Transclusion_count/data/]].
* {{para|demo|&lt;{{var|Template_name}}>}}: Will use the transclusion count for the template at <code><nowiki>[[Template:</nowiki>&lt;{{var|Template_name}}>]]</code> instead of detecting what template it is being used on. Capitalization must exactly match the value used in [[Special:PrefixIndex/Module:Transclusion_count/data/]].
* <code>form=</code>: When set to "editnotice", will display the message using {{tl|editnotice}} instead of {{tl|ombox}}.
* {{para|form}}: When set to "<code>editnotice</code>", will display the message using {{tl|editnotice}} instead of {{tl|ombox}}.
* <code>expiry=</code>: Sets the {{para|expiry}} parameter for {{tl|editnotice}}.
* {{para|expiry}}: Sets the {{para|expiry}} parameter for {{tl|editnotice}}.
* {{para|no-percent|yes}}: suppresses automatic 'percent of all pages' annotation; 'percent of all pages' annotation is automatically added when template is used in more than 1% of all pages (currently <code><nowiki>{{NUMBEROFPAGES}}</nowiki></code> is {{NUMBEROFPAGES}} pages so 1% is {{formatnum:{{#expr:trunc ({{formatnum:{{NUMBEROFPAGES}}|R}}/100)}}}} pages)


== Examples ==
== Examples ==
Line 50: Line 51:
=== High risk ===
=== High risk ===
{{nowiki template demo|code=<nowiki>{{high-use |demo=Yesno }}</nowiki>}}
{{nowiki template demo|code=<nowiki>{{high-use |demo=Yesno }}</nowiki>}}
{{nowiki template demo|code=<nowiki>{{high-use |demo=Yesno |no-percent=yes}}</nowiki>}}


{{nowiki template demo|code=<nowiki>{{high-use |risk |demo=High-use }}</nowiki>}}
{{nowiki template demo|code=<nowiki>{{high-use |risk |demo=High-use }}</nowiki>}}


{{nowiki template demo|code=<nowiki>{{high-use |risk |Wikipedia talk:High-risk templates |info=This is a very large number! |demo=Yesno }}</nowiki>}}
{{nowiki template demo|code=<nowiki>{{high-use |risk |Wikipedia talk:High-risk templates |info=This is a very large number! |demo=Yesno}}</nowiki>}}


== Technical details ==
== Technical details ==
Line 61: Line 64:


== Supporting templates and modules ==
== Supporting templates and modules ==
* {{tl|ombox}} which uses {{m2|Message box|ombox}}
* {{tl|ombox}} which uses {{module link|Message box|ombox}}
* {{tl|editnotice}} which uses {{m2|Message box|fmbox}}
* {{tl|editnotice}} which uses {{module link|Message box|fmbox}}
* {{m2|high-use|main}}
* {{module link|high-use|main}}
* {{m2|transclusion count|fetch}}
* {{module link|transclusion count|fetch}}


==Redirects==
==Redirects==
Line 93: Line 96:
[[Category:Documentation header templates]]
[[Category:Documentation header templates]]
}}</includeonly>
}}</includeonly>
== TemplateData == <!-- 'system' parameter is undocumented and probably should not be here. -->
<templatedata>
{
"params": {
"1": {
"label": "number of transclusions (DEPRECATED)",
"description": "either a static number of times the template has been transcluded, or the word \"risk\" (without quotes) to display \"a very large number of\" instead of the actual value.",
"type": "string",
"suggestedvalues": [
"risk"
],
"deprecated": "This value will be ignored, if transclusion data is available for the current page."
},
"2": {
"label": "discussion page, or use + notation",
"description": "The second parameter is overloaded. It will cause the number of transclusions to display as \"#,###+\" instead of \"approximately #,###\" when set equal to \"yes\" (without quotes). When used in this manner, values will be rounded down, instead of rounded to the nearest number with the appropriate number of significant figures. When set to any other non-blank value, it will replace the link to the template's talk page to the value of the parameter (for example, 2=WP:VPT will insert a link to WP:VPT)",
"type": "string",
"default": " ",
"autovalue": " "
},
"info": {
"label": "Extra information",
"description": "When set to non-blank, will insert the value of this parameter into the template text.",
"type": "content"
},
"demo": {
"label": "template name (intended for demo purposes)",
"description": "Will use the transclusion count for the template at [[Template:<Template_name>]] instead of detecting what template it is being used on. Capitalization must exactly match the value used in Special:PrefixIndex/Module:Transclusion_count/data/.",
"type": "string"
},
"form": {
"label": "form for this template",
"description": "When set to \"editnotice\", will display the message using {{editnotice}} instead of {{ombox}}.",
"type": "string",
"suggestedvalues": [
"editnotice",
" "
]
},
"expiry": {
"label": "Expiry for {{editnotice}}",
"description": "if `form=editnotice`, this will set the expiry parameter of the editnotice.",
"type": "date"
},
"system": {}
},
"description": "This is the {{high-use}} message box.\n\nIt is meant to be put at the top of the documentation subpage for templates transcluded onto more than 2,000 pages. For templates transcluded onto more than 100,000 pages, or if the first parameter is set to risk, then a stronger wording is given.\n\nNote: It is normal that some of the links in the message box are red. ",
"format": "inline"
}
</templatedata>
Anonymous user