Difference between revisions of "Template:Protected"

From Team Fortress Wiki
Jump to: navigation, search
(reduce footprint, simplify code, add documentation)
Line 1: Line 1:
{{#switch:{{{small|}}}
+
{{#if:{{{small|yes}}}|<div align="right" style="right:25px; top: 14px; display:none; font-size: 90%;" class="topicon">[[File:Ambox padlock gray.png|20px]]&nbsp;''This page is protected from editing.''</div>|
| 1 = <div align="right" style="right:25px; top: 14px; display:none; font-size: 90%;" class="topicon">[[File:Padlock silver.png|16px]]&nbsp;''This page is protected from editing.''</div>
 
| #default =
 
 
{{Ambox
 
{{Ambox
| image = Ambox padlock gray.png
+
| image     = Ambox padlock gray.png
| imagewidth = {{#if:{{{reduce|}}}|24px|56px}}
+
| imagewidth = 24px
| type = protection
+
| type       = protection
  
| contents = {{#if:{{{reduce|}}}|<span style="font-size:95%;">|}}'''This page is [[wikipedia:Wikipedia:Protection policy|protected]] from editing{{#ifeq:{{{1|}}}|none|.|}}<!--
+
| contents   = {{ambox/message
 +
  | 3 = '''This page is [[wikipedia:Wikipedia:Protection policy|protected]] from editing{{#ifeq:{{{1|}}}|none|.|}}<!--
 
  -->{{#switch: {{{1|}}}
 
  -->{{#switch: {{{1|}}}
| unreleased = &nbsp;until the item is officially released.''' This is to reduce incorrect speculation from appearing on this page.
+
    | unreleased = &nbsp;until the item is officially released.''' This is to reduce incorrect speculation from appearing on this page.
| none      = &nbsp;
+
    | none      = <!-- null -->
| template  = &nbsp;permanently as it is transcluded on thousands of pages.
+
    | template  = &nbsp;permanently as it is transcluded on thousands of pages.
| vandalism <!-- default -->
+
    | vandalism
| #default  = &nbsp;to prevent vandalism.
+
    | #default  = &nbsp;to prevent vandalism.
}}''' {{#ifeq:{{{hidetalk|}}}|1||Please discuss changes on the [[{{{talkpage|{{TALKPAGENAME}}}}}|talk page]].}}{{#if:{{{reduce|}}}|</span>|}}
+
    }}'''&nbsp;{{#ifeq:{{{hidetalk|}}}|1||Please discuss changes on the [[{{{talkpage|{{TALKPAGENAME}}}}}|talk page]].}}
}}
+
  }}
}}<includeonly>[[Category:Protected pages|{{BASEPAGENAME}}]]</includeonly><noinclude><br />
+
}}
{{Template doc}}
+
}}<includeonly>[[Category:Protected pages|{{BASEPAGENAME}}]]</includeonly><noinclude>{{Doc begin}}
[[Category:Maintenance templates]]
+
== Parameters ==
 +
* {{Protected
 +
:* | ''vandalism'' = "to prevent vandalism." [''default'']
 +
:* | ''unreleased'' = "until the item is officially released."
 +
:* | ''template'' = "permanently as it is transcluded on thousands of pages."
 +
:* | ''none'' = will display nothing as the reason.
 +
<hr />
 +
:* | ''small'' = 1{{n}}changes width, text size and image size to show a smaller version of the message.
 +
:* | ''style'' = any additional valid CSS style.
 +
<hr />
 +
:* | ''talkpage'' = ''Talk:Gameplay''{{n}}name of discussion page without brackets to override the default talk page link (if you want to keep discussion centralized on one page, for example)
 +
:* | ''hidetalk'' = 1{{n}}hides the "please discuss on talk page" message.
 +
* }}
 +
 
 +
[[Category:Maintenance templates|Protected]]
 
</noinclude>
 
</noinclude>

Revision as of 09:10, 19 August 2010

Documentation for Protected

Parameters

  • {{Protected
  • | vandalism = "to prevent vandalism." [default]
  • | unreleased = "until the item is officially released."
  • | template = "permanently as it is transcluded on thousands of pages."
  • | none = will display nothing as the reason.

  • | small = 1 – changes width, text size and image size to show a smaller version of the message.
  • | style = any additional valid CSS style.

  • | talkpage = Talk:Gameplay – name of discussion page without brackets to override the default talk page link (if you want to keep discussion centralized on one page, for example)
  • | hidetalk = 1 – hides the "please discuss on talk page" message.
  • }}