Template:Editcopy: Difference between revisions

From Structorica Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- Define mainpagetitle variable -->
<!-- Define mainpagetitle variable  
{{#vardefine: mainpagetitle | {{#if: {{#pos: {{PAGENAME}} | /}} | {{#sub: {{PAGENAME}} | 0 | {{#pos: {{PAGENAME}} | /}} }} | {{PAGENAME}} }} }}
--> {{#vardefine: mainpagetitle | {{#if: {{#pos: {{PAGENAME}} | /}} | {{#sub: {{PAGENAME}} | 0 | {{#pos: {{PAGENAME}} | /}} }} | {{PAGENAME}} }} }} <!--


{{#if: {{#pos: {{PAGENAME}} | /editcopy}} | <!-- The MessageBox only appears on the /editcopy page, allowing it to be used on the main page to prevent the main page and the editcopy from appearing different
--> {{#if: {{#pos: {{PAGENAME}} | /editcopy}} | <!-- The MessageBox only appears on the /editcopy page, allowing it to be used on the main page to prevent the main page and the editcopy from appearing different
 
--> {{#if: {{{styles_editcopy|}}} | <templatestyles src="{{{styles_editcopy}}}" /> }}<!-- Load custom styles for editcopy page if specified


--> {{MessageBox
--> {{MessageBox
|image = Book and Quill JE2 BE2.png
|image = Editcopy.png
|text  = This page is for users to propose changes to [[{{#var: mainpagetitle}}|{{#if: {{{firsttitle|}}} | {{{firsttitle|}}} | {{{1|{{#var: mainpagetitle}}}}} }}]]. The {{#if: {{{pagetype|}}} | {{{pagetype|}}} | {{#switch: {{NAMESPACENUMBER}} | 0 = article | 4 = project page | 6 = file | 10 = template | 14 = category | {{#ifexpr: {{NAMESPACENUMBER}} mod 2 = 0 | page | talk page}} }} }} "{{#if: {{{1|}}} | {{{1|}}} | {{BASEPAGENAME}} }}" is protected so that only {{{2|users with certain privileges}}} can edit it, {{#if: {{{reason|}}} | {{{reason|}}} | likely due to being a high traffic page or a target of vandalism }}. <!-- Explains the reason why the editcopy exists
|text  = This page is for users to propose changes to [[{{#var: mainpagetitle}}|{{#if: {{{firsttitle|}}} | {{{firsttitle|}}} | {{{1|{{#var: mainpagetitle}}}}} }}]]. The {{#if: {{{pagetype|}}} | {{{pagetype|}}} | {{#switch: {{NAMESPACENUMBER}} | 0 = article | 4 = project page | 6 = file | 10 = template | 14 = category | {{#ifexpr: {{NAMESPACENUMBER}} mod 2 = 0 | page | talk page}} }} }} "{{#if: {{{1|}}} | {{{1|}}} | {{BASEPAGENAME}} }}" is protected so that only {{{2|users with certain privileges}}} can edit it, {{#if: {{{reason|}}} | {{{reason|}}} | likely due to being a high traffic page or a target of vandalism }}. <!-- Explains the reason why the editcopy exists


Line 16: Line 14:


<!-- We are on the main page -->
<!-- We are on the main page -->
{{#if: {{{styles_main|}}} | <templatestyles src="{{{styles_main}}}" /> }}<!-- Load custom styles for main page if specified
{{#if: {{{nocat|}}} | | [[Category:Editcopies]]}}
 
}}<!-- End of #ifeq/template --><noinclude>
--> {{#if: {{{nocat|}}} | | [[Category:Editcopies]]}} <!-- Adds to Category:Editcopies unless the nocat parameter is specified
 
--> }} <!-- End of #ifeq/template --><noinclude>
=== Documentation ===
=== Documentation ===
Examples:
Examples:
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
{{Editcopy
{{Editcopy
     | Page Name
     | Main Page
    | firsttitle = the main page
     | administrators
     | administrators
     | reason = high traffic page
     | reason = because it is a high traffic page and therefore a likely target of vandalism
     }}
    | extratext = See also editcopy pages for related templates.
     }}  
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
{{Editcopy
__NOTOC__{{#if: {{#pos: {{PAGENAME}} | /editcopy}}
| <templatestyles src=":Structorica_Wiki/styles.css/editcopy" />
| <templatestyles src=":Structorica_Wiki/styles.css" />
}}{{Editcopy
     | Main Page
     | Main Page
     | firsttitle = the main page
     | firsttitle = the main page
Line 37: Line 37:
     | reason = because it is a high traffic page and therefore a likely target of vandalism
     | reason = because it is a high traffic page and therefore a likely target of vandalism
     | extratext = See also editcopy pages for related templates.
     | extratext = See also editcopy pages for related templates.
    | styles_main = Main Page/styles.css
}}
    | styles_editcopy = Main Page/styles.css/editcopy
    }}
</syntaxhighlight>
</syntaxhighlight>


[[Category:Maintenance templates]]
[[Category:Maintenance templates]]


[[ru:Template:Editcopy]]
[[ru:Template:Копия]]


</noinclude>
</noinclude>

Latest revision as of 08:22, 15 January 2026

Documentation

Examples:

{{Editcopy
    | Main Page
    | firsttitle = the main page
    | administrators
    | reason = because it is a high traffic page and therefore a likely target of vandalism
    | extratext = See also editcopy pages for related templates.
    }}
__NOTOC__{{#if: {{#pos: {{PAGENAME}} | /editcopy}}
| <templatestyles src=":Structorica_Wiki/styles.css/editcopy" />
| <templatestyles src=":Structorica_Wiki/styles.css" />
}}{{Editcopy
    | Main Page
    | firsttitle = the main page
    | administrators
    | reason = because it is a high traffic page and therefore a likely target of vandalism
    | extratext = See also editcopy pages for related templates.
}}