Mal:Protected page text

Fra Wikipedia, den frie encyklopedi
Maldokumentasjon

This template displays the text that users see when they do not have permission to edit a page. Specifically, it is used in MediaWiki:Protectedpagetext and MediaWiki:Cascadeprotected, the system messages that are shown when users cannot edit a page due to normal protection (semi, template or full) or cascading protection. Other system messages are also shown in this situation, but the display from this template is the largest and most visible. This template was created to encourage reuse of code in both messages.

For convenience, there are three subtemplates already filled out with the settings for semi-protection, template protection and full protection: {{Protected page text/semi}}, {{Protected page text/template}} and {{Protected page text/full}}. It is recommended that you use these subtemplates, as this will allow you to benefit from future updates to the templates.

Syntax[rediger kilde]

Pre-defined settings[rediger kilde]

Semi-protection
{{protected page text/semi}}
Template protection
{{protected page text/template}}
Full protection
{{protected page text/full}}

Manual settings[rediger kilde]

{{protected page text
| image = 
| protection-message = 
| suggestions = 
| protection-reason = 
| login-message = 
| main-page-links = 
| template-links = 
| who-can-edit = 
| request-type = 
}}

Parameters[rediger kilde]

  • image - The padlock image used in the top message box. Defaults to Padlock.svg.
  • protection-message - The message inside the top message box. This should explain that the page is protected, and who can edit it. This parameter is required.
  • suggestions - If this parameter is set with any text, the template shows the "Why is the page protected?" and "What can I do?" headings with a list of suggestions on what actions editors can take upon discovering that they can't edit the page. This parameter can be used with the #ifexist parser function to display the suggestions only on existing pages (i.e. to disable them on create-protected pages).
  • protection-reason - The general reasons why pages of a given protection level might be protected. This is the first bullet point under the "Why is the page protected?" heading. This parameter is required.
  • log-text - Optional text to use instead of the protection log explanation in the "Why is the page protected?" heading.
  • login-message - If this parameter is set with any text, the template displays a message about logging in and becoming autoconfirmed.
  • main-page-links - If this parameter is set with any text, and the current page is the Main Page, the template displays advice for new editors and a link to Wikipedia:Main Page/Errors.
  • template-links - If this parameter is set with any text, and the current page is in the template namespace, the template will display links to the documentation and the template sandbox if they exist.
  • who-can-edit - The users that can edit pages protected at this level. This should start with a capital letter and include an article, e.g. An [[Wikipedia:Administrator|administrator]]. This parameter is required.
  • request-type - The value to send to the |type= parameter of Template:Submit an edit request. Possible values are semi, template and full. This parameter is required.

Example[rediger kilde]

The following example uses the code for full protection.

Code[rediger kilde]

{{protected page text
| protection-message = Denne siden er for tiden [[Wikipedia:Protection policy#Full protection|beskyttet]] og kan kun redigeres av [[Wikipedia:Administratorer|administratorer]].
| suggestions = {{#ifexist: {{FULLPAGENAME}} | yes}}
| protection-reason = Noen maler og grensesnittsider er permanent beskyttet på grunn av synlighet. Artikler beskyttes midlertidig ved [[Wikipedia:Redigeringskrig|redigeringskriger]], men til enhver tid kan de fleste artikler redigeres av hvem som helst.
| main-page-links = yes
| template-links = yes
| who-can-edit = En [[Wikipedia:Administratorer|administrator]]
| request-type = full
}}

Result[rediger kilde]