Line 7: |
Line 7: |
| | | |
| === Examples === | | === Examples === |
− | Note that the small padlock in the top right corner of this page also is an example created with this meta-template. This template uses a position that does not collide with icons such as the "Featured Article" star, the "[[WP:SPOKEN|Spoken Wikipedia]]" icon, or other top-right-hand-corner icons. | + | Note that the small padlock in the top right corner of this page also is an example created with this meta-template. This template uses a position that does not collide with icons such as the "Featured Article" star, the "[[Wikipedia:WikiProject Spoken Wikipedia|Spoken Wikipedia]]" icon, or other top-right-hand-corner icons. |
| | | |
| <!-- Example showing the small padlock in the top right corner. --> | | <!-- Example showing the small padlock in the top right corner. --> |
Line 47: |
Line 47: |
| | | |
| ===="Usually" required parameters==== | | ===="Usually" required parameters==== |
− | ;<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-semi-protected|pp-semi-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>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. |