Template:Editcopy: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{#vardefine: mainpagetitle | {{#ifeq: {{NAMESPACENUMBER}} | 0 | {{BASEPAGENAME}} | {{NAMESPACE}}:{{BASEPAGENAME}} }} }}<!-- -->{{#ifeq: {{PAGENAME}} | {{BASEPAGENAME}}/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..." |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{#vardefine: mainpagetitle | {{# | <!-- Define mainpagetitle variable | ||
--> {{#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 | ||
--> {{MessageBox | --> {{MessageBox | ||
|image = | |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 15: | Line 14: | ||
<!-- We are on the main page --> | <!-- We are on the main page --> | ||
{{#if: {{{nocat|}}} | | [[Category:Editcopies]]}} | |||
}}<!-- End of #ifeq/template --><noinclude> | |||
=== Documentation === | === Documentation === | ||
Examples: | Examples: | ||
<syntaxhighlight lang="wikitext"> | <syntaxhighlight lang="wikitext"> | ||
{{Editcopy | {{Editcopy | ||
| Page | | 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 36: | 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. | ||
}} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Maintenance templates]] | [[Category:Maintenance templates]] | ||
[[ru:Template: | [[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.
}}