Template:Protected

From Project Management
Jump to: navigation, search

{{#switch:

| sysop=

{{#ifeq:{{{icon}}}|no||}}
Protected {{Template:Softredirect|text1}} {{#if:|{{Template:Softredirect|reason|reason={{{1}}}}}|{{Template:Softredirect|default-reason}}}}
{{Template:Softredirect|text2}}
{{#if:||{{#switch:Template|File=|User|User talk|Template=|}} }}

| autoconfirmed=

| #default=

 {{#ifeq:Template|File
 | {{#switch:
   | sysop=
{{#if:|| }}
   | autoconfirmed=
   | #default=
{{Template:Softredirect|error-text}}
{{#if:|| }}
   }}
|
{{Template:Softredirect|error-text}}
{{#if:|| }}
 }}

}}



Usage

General protection template to inform users a page is protected. (Note: This does not protect pages. Only admins can do that.)

Syntax: {{protected|give reason here}}.

  • If no reason is given the default is "to prevent vandalism".
  • The second line doesn't show up on talk pages or user pages (unless the note parameter is used).

Examples

The message box does not appear on semi-protected pages or upload-only protected files. An icon still appears in the top-right corner.

{{protected}} → {{#switch:sysop

| sysop=

{{#ifeq:no|no||}}
Protected {{Template:Softredirect|text1}} {{#if:|{{Template:Softredirect|reason|reason={{{1}}}}}|{{Template:Softredirect|default-reason}}}}
{{Template:Softredirect|text2}}
{{#if:sysop||{{#switch:Template|File=|User|User talk|Template=|}} }}

| autoconfirmed=

| #default=

 {{#ifeq:Template|File
 | {{#switch:
   | sysop=
{{#if:sysop|| }}
   | autoconfirmed=
   | #default=
{{Template:Softredirect|error-text}}
{{#if:sysop|| }}
   }}
|
{{Template:Softredirect|error-text}}
{{#if:sysop|| }}
 }}

}}

{{protected|I said so}} → {{#switch:sysop

| sysop=

{{#ifeq:no|no||}}
Protected {{Template:Softredirect|text1}} {{#if:I said so|{{Template:Softredirect|reason|reason=I said so}}|{{Template:Softredirect|default-reason}}}}
{{Template:Softredirect|text2}}
{{#if:sysop||{{#switch:Template|File=|User|User talk|Template=|}} }}

| autoconfirmed=

| #default=

 {{#ifeq:Template|File
 | {{#switch:
   | sysop=
{{#if:sysop|| }}
   | autoconfirmed=
   | #default=
{{Template:Softredirect|error-text}}
{{#if:sysop|| }}
   }}
|
{{Template:Softredirect|error-text}}
{{#if:sysop|| }}
 }}

}}

{{protected|note=And you can change this too.}} → {{#switch:sysop

| sysop=

{{#ifeq:no|no||}}
Protected {{Template:Softredirect|text1}} {{#if:|{{Template:Softredirect|reason|reason={{{1}}}}}|{{Template:Softredirect|default-reason}}}}
And you can change this too.
{{#if:sysop||{{#switch:Template|File=|User|User talk|Template=|}} }}

| autoconfirmed=

| #default=

 {{#ifeq:Template|File
 | {{#switch:
   | sysop=
{{#if:sysop|| }}
   | autoconfirmed=
   | #default=
{{Template:Softredirect|error-text}}
{{#if:sysop|| }}
   }}
|
{{Template:Softredirect|error-text}}
{{#if:sysop|| }}
 }}

}}

Padlocks

  • 20px = full protection from editing.
  • 20px = semi protection from editing or uploading.
  • 20px = full protection from uploading (but not editing).

See also

  • {{Mprotected}} - for images included on the Main Page, which are protected because of the cascading protection (but are not protected directly).
  • {{permprot}} - for high-risk templates that are indefinitely protected (use on talk page).
  • {{MWheader}} - for MediaWiki pages (use on talk page).

Localisation

Only the text is switched out based on the user's interface, not the whole template (like with {{autotranslate}}) to avoid unnecessary complexity. Please translate the following and add it to a subpage of Template:Protected/text, e.g. Template:Protected/text/en.

Template:Pre2

There is no /lang page or /layout page to deal with. Keep in mind this is still a work in progress and new text fields may be added in the future.