Template:Editnotice load: Difference between revisions

From TEPwiki, Urth's Encyclopedia
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
<div id="editnotice-area" class="editnotice-area" style="clear: both; width: 100%;"><!--
Namespace notice:
-->{{#ifeq: {{{notice action|}}} | view
| <!--"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-->
--><div id="editnotice-area" class="editnotice-area mw-parser-output" style="clear: both; width: 100%;">{{Editnotice load/content
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{BASEPAGENAME}}
| notice action = {{{notice action|}}}
| {{FULLPAGENAME}}/Editnotice
}}<div style="clear: both;"></div></div>
| 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
}}
}}<div style="clear: both;"></div> </div><noinclude>


{{documentation}}
{{documentation}}

Latest revision as of 20:42, 8 August 2023