Template:Editnotice load: Difference between revisions

From TEPwiki, Urth's Encyclopedia
Jump to navigation Jump to search
Content added Content deleted
((New version from /test1.) Uses /core. Adds red create links for admins+accountcreators, and for users on user pages. And better placing and naming of links. And handles blanked notices. See talk.)
m (16 revisions imported from wikipedia:Template:Editnotice_load)
 
(6 intermediate revisions by 4 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
{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
| notice action = {{{notice action|}}}
| {{BASEPAGENAME}}:::{{ns:User}}
}}<div style="clear: both;"></div></div>
| {{BASEPAGENAME}}:::{{ns:User talk}} = {{FULLPAGENAME}}/Editnotice
}}<noinclude>
| #default = Template:Editnotices/Page/{{FULLPAGENAME}}
}}
| userpage =
<!--If on a user or user talk rootpage, then "yes", else empty string-->
{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
| {{BASEPAGENAME}}:::{{ns:User}}
| {{BASEPAGENAME}}:::{{ns:User talk}} = yes
}}
}}<div style="clear: both;"></div> </div><noinclude>


{{documentation}}
{{documentation}}

Latest revision as of 20:42, 8 August 2023