Template:Editnotice load: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Adding parameter "ownuserpage" to /core. And shorter code to detect user and user talk rootpages.) |
m (16 revisions imported from wikipedia:Template:Editnotice_load) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#if: {{Editnotice load/content |
|||
⚫ | |||
Namespace notice: |
|||
⚫ | |||
| <!--"Viewing the source" of a protected page, don't show namespace notice--> |
|||
| {{#ifexist: Template:Editnotices/Namespace/{{#if:{{NAMESPACE}}|{{NAMESPACE}}|Main}} |
|||
| <div class="editnotice-namespace" style="width: 100%;"> {{Template:Editnotices/Namespace/{{#if:{{NAMESPACE}}|{{NAMESPACE}}|Main}}}} </div> |
|||
}} |
|||
⚫ | |||
Group and page notice: |
|||
-->{{editnotice load/core |
|||
| notice action = {{{notice action|}}} |
| notice action = {{{notice action|}}} |
||
⚫ | |||
| group allowed = {{ns has subpages}} <!--"yes" or empty string--> |
|||
We unfortunately have to call /content twice so that the editnotice-area and clear elements |
|||
| groupnotice = Template:Editnotices/Group/{{FULLROOTPAGENAME}} |
|||
are only output if there is at least one actual edit notice. This ensures the software can determine |
|||
| pagenotice = |
|||
whether or not a page has edit notices (for the API, WikiEditor, VisualEditor and others). And to ensure |
|||
<!--If on a user or user talk rootpage, then use /Editnotice, |
|||
MediaWiki:Editnotice-notext gets shown when appropiate. |
|||
else use normal protected notice--> |
|||
⚫ | |||
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{BASEPAGENAME}} |
|||
⚫ | |||
| {{FULLPAGENAME}}/Editnotice |
|||
⚫ | |||
| Template:Editnotices/Page/{{FULLPAGENAME}} |
|||
}}<noinclude> |
|||
}} |
|||
| userpage = |
|||
<!--If on a user or user talk rootpage, then "yes", else empty string--> |
|||
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{BASEPAGENAME}} |
|||
| yes |
|||
}} |
|||
| ownuserpage = |
|||
<!--If on the user's own user or user talk rootpage, then "yes", else empty string. {{REVISIONUSER}} returns current user when in system messages. --> |
|||
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{REVISIONUSER}} |
|||
| yes |
|||
}} |
|||
⚫ | |||
{{documentation}} |
{{documentation}} |