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.)
(Per Wikipedia talk:Editnotice#Make_use_of_MediaWiki:Editnotice-notext https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Editnotice&oldid=654236751)
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|}}}
| notice action = {{{notice action|}}}
| group allowed = {{ns has subpages}} <!--"yes" or empty string-->
}} | <!--
| groupnotice = Template:Editnotices/Group/{{FULLROOTPAGENAME}}
We unfortunately have to call /content twice so that the editnotice-area and clear elements
| pagenotice =
are only output if there is at least one actual edit notice. This ensures the software can determine
<!--If on a user or user talk rootpage, then use /Editnotice,
whether or not a page has edit notices (for the API, WikiEditor, VisualEditor and others). And to ensure
else use normal protected notice-->
MediaWiki:Editnotice-notext gets shown when appropiate.
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{BASEPAGENAME}}
--><div id="editnotice-area" class="editnotice-area" style="clear: both; width: 100%;">{{Editnotice load/content
| {{FULLPAGENAME}}/Editnotice
| notice action = {{{notice action|}}}
| Template:Editnotices/Page/{{FULLPAGENAME}}
| notice action = {{{notice action|}}}
}}
}}<div style="clear: both;"></div></div>
| userpage =
}}<noinclude>
<!--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}}

Revision as of 15:55, 30 March 2015