Template:Editcopy: Difference between revisions
No edit summary |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<!-- | <!-- Define mainpagetitle variable | ||
{{#if: {{# | --> {{#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 | |||
|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 | |||
--> <div style="line-height: 100%; text-align: center; font-size: 85%;"><br> | |||
[{{fullurl:Special:ComparePages|page1={{urlencode:{{#var: mainpagetitle}} }}&page2={{urlencode:{{FULLPAGENAME}} }} }} Diff with main page] {{#if: {{{extratext|}}}{{{3|}}} | • {{{extratext|{{{3}}}}}} }}</div> <!-- Compares the editcopy to the main page and adds an extra parameter for users of this template to provide extra information | |||
--> }} <!-- End of MessageBox --> | |||
<!-- We are on the main page --> | |||
{{#if: {{{nocat|}}} | | [[Category:Editcopies]]}} | |||
}}<!-- End of #ifeq/template --><noinclude> | |||
=== Documentation === | |||
Examples: | |||
<syntaxhighlight lang="wikitext"> | |||
{{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. | |||
}} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="wikitext"> | |||
__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. | |||
}} | }} | ||
</syntaxhighlight> | |||
[[Category:Maintenance templates]] | |||
[[ru:Template:Копия]] | |||
</noinclude> | |||