Template:Pp-meta/doc: Difference between revisions

m
1 revision
m (1 revision)
 
m (1 revision)
(One intermediate revision by the same user not shown)
Line 27: Line 27:
| disallowlevel = <if type is not move or create and the template should only be used on one protection level, then "autoconfirmed" or "sysop">
| disallowlevel = <if type is not move or create and the template should only be used on one protection level, then "autoconfirmed" or "sysop">
| small = {{{small|}}} <unless template should always be small, then "yes", or if never small, "no" or omit>
| small = {{{small|}}} <unless template should always be small, then "yes", or if never small, "no" or omit>
| right = {{{right|}}} <unless small versions of the template should be somewhere other than the default location>
| expiry = {{{expiry|}}} <omit for indef templates>
| expiry = {{{expiry|}}} <omit for indef templates>
| reason = &amp;#32;<your reason here>
| reason = &amp;#32;<your reason here>
Line 49: Line 50:
;<code>type</code>:The '''type''' parameter applies most default settings for the broad classes of protection templates. It can have values equal to any of the following: <code>full</code>, <code>semi</code>, <code>pc1</code>, <code>pc2</code>, <code>indef</code>, <code>move</code>, <code>create</code>, and <code>office</code> (all case-insensitive). These values apply default boilerplate text, images, and links. This parameter should almost always be used, as the default settings require little other input, making the code of templates such as <span style="font-family:monospace;"><nowiki>{{</nowiki>[[Template:Pp-protected|pp-protected]]<nowiki>}}</nowiki></span> very clean. Note that not supplying this parameter causes the image to default to [[:Image:Transparent.gif]].
;<code>type</code>:The '''type''' parameter applies most default settings for the broad classes of protection templates. It can have values equal to any of the following: <code>full</code>, <code>semi</code>, <code>pc1</code>, <code>pc2</code>, <code>indef</code>, <code>move</code>, <code>create</code>, and <code>office</code> (all case-insensitive). These values apply default boilerplate text, images, and links. This parameter should almost always be used, as the default settings require little other input, making the code of templates such as <span style="font-family:monospace;"><nowiki>{{</nowiki>[[Template:Pp-protected|pp-protected]]<nowiki>}}</nowiki></span> very clean. Note that not supplying this parameter causes the image to default to [[:Image:Transparent.gif]].
;<code>small</code>: The '''small''' parameter lets the template decide whether to display a small icon version or a large boilerplate version. It can take any value, but the only one which will be acted on is "<code>yes</code>" (case-insensitive). As instance templates should be able to decide, using their input, whether or not to apply <code>small</code>, this should usually be set to <code><nowiki>{{{small|}}}</nowiki></code>, which defaults to non-small but allows small to be specified. Not supplying this parameter will cause the template to always be expanded big.
;<code>small</code>: The '''small''' parameter lets the template decide whether to display a small icon version or a large boilerplate version. It can take any value, but the only one which will be acted on is "<code>yes</code>" (case-insensitive). As instance templates should be able to decide, using their input, whether or not to apply <code>small</code>, this should usually be set to <code><nowiki>{{{small|}}}</nowiki></code>, which defaults to non-small but allows small to be specified. Not supplying this parameter will cause the template to always be expanded big.
;<code>right</code>: The '''right''' parameter sets the horizontal location of the small version of the template. The default value is 55px. Templates should pass this through, changing the default value if necessary.
;<code>expiry</code>: This '''expiry''' parameter allows, when <code>type</code> is defined normally, the expiry date to be automatically displayed properly for both the tooltip of the small version and in text for the large version. It should typically take the input <code><nowiki>{{{expiry|}}}</nowiki></code>, which allows instances using this template to be provided input specifying the expiry date. It should be left blank for templates where <code>type</code> is set to <code>indef</code>, as it has no effect because indefinite protection templates clearly do not need expiry dates to be specified.
;<code>expiry</code>: This '''expiry''' parameter allows, when <code>type</code> is defined normally, the expiry date to be automatically displayed properly for both the tooltip of the small version and in text for the large version. It should typically take the input <code><nowiki>{{{expiry|}}}</nowiki></code>, which allows instances using this template to be provided input specifying the expiry date. It should be left blank for templates where <code>type</code> is set to <code>indef</code>, as it has no effect because indefinite protection templates clearly do not need expiry dates to be specified.
;<code>dispute</code>:The '''dispute''' parameter adds some boilerplate text disclaiming against endorsement of the protected version or title. It is not dependent on the <code>type</code> parameter, but the <code>explanation-text</code> parameter described below overrides it when applicable.
;<code>dispute</code>:The '''dispute''' parameter adds some boilerplate text disclaiming against endorsement of the protected version or title. It is not dependent on the <code>type</code> parameter, but the <code>explanation-text</code> parameter described below overrides it when applicable.
14,061

edits