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.)
(Adding parameter "ownuserpage" to /core. And shorter code to detect user and user talk rootpages.)
Line 15: Line 15:
<!--If on a user or user talk rootpage, then use /Editnotice,
<!--If on a user or user talk rootpage, then use /Editnotice,
else use normal protected notice-->
else use normal protected notice-->
{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{BASEPAGENAME}}
| {{BASEPAGENAME}}:::{{ns:User}}
| {{FULLPAGENAME}}/Editnotice
| {{BASEPAGENAME}}:::{{ns:User talk}} = {{FULLPAGENAME}}/Editnotice
| Template:Editnotices/Page/{{FULLPAGENAME}}
| #default = Template:Editnotices/Page/{{FULLPAGENAME}}
}}
}}
| userpage =
| userpage =
<!--If on a user or user talk rootpage, then "yes", else empty string-->
<!--If on a user or user talk rootpage, then "yes", else empty string-->
{{#switch: {{PAGENAME}}:::{{NAMESPACE}}
{{#ifeq: {{SUBJECTSPACE}}#{{PAGENAME}} | {{ns:User}}#{{BASEPAGENAME}}
| yes
| {{BASEPAGENAME}}:::{{ns:User}}
}}
| {{BASEPAGENAME}}:::{{ns:User talk}} = 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>
}}<div style="clear: both;"></div> </div><noinclude>

Revision as of 06:04, 14 January 2010