Difference between revisions of "Template:Protetta"

From Project Management
Jump to: navigation, search
(Creata pagina con '<includeonly>{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|Categoria:Pagine protette<!--per LiveRC--> {{icona del titolo|link=Wikipedia:Politica di protezione delle pagine#Protezion...')
 
 
Line 1: Line 1:
<includeonly>{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|[[Categoria:Pagine protette]]<!--per LiveRC-->
+
{{#switch:{{{demo-edit|{{PROTECTIONLEVEL:edit}}}}}
{{icona del titolo|link=Wikipedia:Politica di protezione delle pagine#Protezione completa|testo=Questa pagina è protetta|Image=Crystal Clear action lock2.png|dimensione=30|right=45px|top=5px}}
 
{{#switch:{{NAMESPACE}}
 
|Template=
 
{{{!}} class="itwiki_template_toc" style="width:100%; margin: 0 auto 0.5em; padding-right: 0.5em;"
 
{{!}}-
 
{{!}} '''Template protetto''' &ndash; Le modifiche possono essere proposte nella [[{{TALKSPACE}}:{{PAGENAME}}{{!}}pagina di discussione]].
 
{{!}}}[[Categoria:Template protetti{{!}}{{PAGENAME}}]]
 
|=[[Categoria:Voci protette]]
 
|Discussioni Wikipedia
 
|Wikipedia=[[Categoria:Pagine di servizio protette{{!}}{{PAGENAME}}]]
 
|Discussioni utente
 
|Utente=[[Categoria:Pagine utente protette{{!}}{{PAGENAME}}]]
 
|[[Categoria:Altre pagine protette]]}}
 
|
 
{{#ifeq:{{PROTECTIONLEVEL:edit}}|autoconfirmed|[[Categoria:Pagine semiprotette]]<!--per LiveRC-->
 
{{icona del titolo|link=Wikipedia:Politica di protezione delle pagine#Protezione parziale|testo=Questa pagina è semiprotetta. Può essere modificata solo da utenti registrati.|Image=Crystal_Clear_action_lock8.png|dimensione=30|right=45px|top=5px}}
 
  {{#switch:{{NAMESPACE}}
 
  |Template=
 
{{{!}} class="itwiki_template_toc" style="width:100%; margin: 0 auto 0.5em; padding-right: 0.5em;"
 
{{!}}-
 
{{!}} '''Template protetto parzialmente''' &ndash; Se non puoi modificare questo template, le modifiche possono essere proposte nella [[{{TALKSPACE}}:{{PAGENAME}}{{!}}pagina di discussione]].
 
{{!}}}[[Categoria:Template protetti parzialmente{{!}}{{PAGENAME}}]]
 
  |=[[Categoria:Voci protette parzialmente]]
 
  |Discussioni Wikipedia
 
  |Wikipedia=[[Categoria:Pagine di servizio protette parzialmente{{!}}{{PAGENAME}}]]
 
  |Discussioni utente
 
  |Utente=[[Categoria:Pagine utente protette parzialmente{{!}}{{PAGENAME}}]]
 
  |[[Categoria:Altre pagine protette parzialmente]]}}
 
|{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop||{{#ifeq:{{lc:{{SUBPAGENAME}}}}{{NAMESPACE}}|sandboxTemplate|[[Categoria:Sandbox dei template]]|[[Categoria:Pagine protette - scadute]]}}}}}}
 
}}{{
 
#ifeq:{{PROTECTIONLEVEL:move}}|sysop|{{icona del titolo|link=Wikipedia:Politica di protezione delle pagine#Protezione dagli spostamenti|testo=Questa pagina è protetta dallo spostamento|Image=Crystal_Clear_action_lock4.png|dimensione=30|right=80px|top=5px}}
 
{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|<!--se c'è già il lucchetto rosso non categorizza anche per lo spostamento-->|
 
[[Categoria:Pagine protette dallo spostamento]]
 
[[Categoria:Pagine semiprotette]]<!--per LiveRC-->
 
}}|}}</includeonly><noinclude>
 
{{protetta}}
 
{{man}}
 
  
[[Categoria:Template di blocco pagine|Protetta]]
+
| sysop=
[[Categoria:Escludi dalla stampa|Protetta]]
+
  {{#ifeq:{{{icon}}}|no||<div class="topicon" id="protected-icon" style="right:10px;">[[File:Padlock.svg|20px|link=COM:P|{{{{tSwitch|protected/text}}|img-text1}}]]</div>}}
 +
  <table class="protected" style="background:#fff; border:1px solid #aaa; padding:.2em; margin:.5em auto;">
 +
  <tr>
 +
  <td style="padding-right:4px; padding-left:4px;">[[File:Padlock.svg|40px|link=COM:P|Protected]]</td>
 +
  <td>'''{{{{tSwitch|protected/text}}|text1}} {{#if:{{{1|}}}|{{{{tSwitch|protected/text}}|reason|reason={{{1}}}}}|{{{{tSwitch|protected/text}}|default-reason}}}}'''<br /><span style="font-size:90%;">{{{note|{{{{tSwitch|protected/text}}|text2}} }}}</span></td>
 +
  </tr>
 +
  </table>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|{{#switch:{{NAMESPACE}}|{{ns:6}}=[[Category:Protected files]]|{{ns:2}}|{{ns:3}}|{{ns:10}}=|[[Category:Protected pages]]}} }}} }}
  
[[ca:Plantilla:Protegida]]
+
| autoconfirmed=
[[en:Template:Protected]]
+
  <div class="topicon" id="protected-icon" style="right:10px;">[[File:Padlock-silver-medium.svg|20px|link=COM:P||{{{{tSwitch|protected/text}}|img-text2}}]]</div>
[[es:Plantilla:Protegido]]
+
 
[[fr:Modèle:Protection]]
+
| #default=
[[id:Templat:Lindungi]]
+
  {{#ifeq:{{NAMESPACE}}|{{{demo-ns|{{ns:6}}}}}
[[nl:Sjabloon:Beveiligd]]
+
  | {{#switch:{{{demo-upload|{{PROTECTIONLEVEL:upload}}}}}
[[pt:Predefinição:Protegida]]
+
 
[[simple:Template:Protected]]
+
    | sysop=
[[sv:Mall:Skyddad]]
+
      <div class="topicon" id="protected-icon" style="right:10px;">[[File:Padlock-green.svg|20px|link=COM:P||{{{{tSwitch|protected/text}}|img-text3}}]]</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Upload protected files]]}}} }}
[[ru:Шаблон:Protected]]
+
 
[[uk:Шаблон:Protected]]
+
    | autoconfirmed=
[[vi:Tiêu bản:Trang được bảo vệ]]
+
      <div class="topicon" id="protected-icon" style="right:10px;">[[File:Padlock-silver.svg|20px|link=COM:P||{{{{tSwitch|protected/text}}|img-text4}}]]</div>
[[zh:Template:Protected]]
+
 
 +
    | #default=
 +
      <div class="error">{{{{tSwitch|protected/text}}|error-text}}</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}} }}
 +
    }}
 +
  | <div class="error">{{{{tSwitch|protected/text}}|error-text}}</div>{{#if:{{{demo-edit|}}}{{{demo-upload|}}}||{{{category|[[Category:Unprotected pages using protection templates]]}}} }}
 +
  }}
 +
}}<noinclude>
 +
 
 +
 
 +
----
 +
__NOTOC__
 +
=== Usage ===
 +
General protection template to inform users a page is protected. (Note: This does not protect pages. Only admins can do that.)
 +
*Adds files to [[:Category:Protected files]] and everything else except user pages, user talk pages, and templates to [[:Category:Protected pages]]. If the page is not protected, it will end up in [[:Category:Unprotected pages using protection templates]].
 +
Syntax: <nowiki>{{</nowiki>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 <code>note</code> 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.''
 +
<nowiki>{{</nowiki>protected}} → {{protected|demo-edit=sysop|icon=no}}
 +
 
 +
<nowiki>{{</nowiki>protected|I said so}} → {{protected|I said so|demo-edit=sysop|icon=no}}
 +
 
 +
<nowiki>{{</nowiki>protected|note=And you can change this too.}} → {{protected|note=And you can change this too.|demo-edit=sysop|icon=no}}
 +
 
 +
=== Padlocks ===
 +
* [[File:Padlock.svg|20px]] = full protection from editing.
 +
* [[File:Padlock-silver.svg|20px]] = semi protection from editing or uploading.
 +
* [[File:Padlock-green.svg|20px]] = full protection from uploading (but not editing).
 +
 
 +
=== See also ===
 +
*{{tl|Mprotected}} - for images included on the [[Main Page]], which are protected because of the cascading protection (but are not protected directly).
 +
*{{tl|permprot}} - for high-risk templates that are indefinitely protected (use on talk page).
 +
*{{tl|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 {{tl|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]].
 +
 
 +
{{pre2|scroll|<nowiki>
 +
{{#switch:{{{1}}}
 +
|text1=This {{namespace}} has been protected
 +
|default-reason=from editing to prevent vandalism.
 +
|reason=because {{{reason}}}.
 +
|text2=Please discuss changes on the [[{{TALKPAGENAME}}|talk page]] or [[COM:AN/P|request unprotection]].
 +
|img-text1=This page is protected against editing.
 +
|img-text2=This page is semi-protected against editing.
 +
|img-text3=This page is protected against reuploading.
 +
|img-text4=This page is semi-protected against reuploading.
 +
|error-text=Error: This page is not currently protected. Please remove the protection template.
 +
}}&lt;noinclude>
 +
{{translated tag|localisation}}
 +
&lt;/noinclude>
 +
</nowiki>}}
 +
 
 +
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.
 +
 
 +
[[Category:Protection templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Latest revision as of 19:54, 24 November 2010

{{#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[edit]

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[edit]

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[edit]

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

See also[edit]

  • {{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[edit]

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.