Difference between revisions of "Šablóna:AM/Editor"

From Wazeopedia
(testing)
m (48 revízií)
 
(41 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>|- align="center" {{AM/Badge|{{{badge1|}}}|color}}
+
<includeonly>|- align="center" {{AM/Badge|{{{badge1|white}}}|color}}<!-- set color based on first badge -->
|| [[User:{{{1|UserName}}}|{{{1|UserName}}}]] {{small|({{PM|{{{1|UserName}}}|PM}})}} || {{{2|}}} || {{AM/Badge|{{{badge1|}}}}}{{AM/Badge|{{{badge2}}}}}{{AM/Badge|{{{badge3}}}}}<br/>{{{3|}}}<!-- || {{{4|}}}-->
+
<!--
</includeonly><noinclude>{{documentation|Template:AM/doc}}</noinclude>
+
-->| [[User:{{{1|UserName}}}|{{{1|UserName}}}]]<!-- build user page link with default
 +
-->{{#if: {{{2|}}}<!-- does rank exist
 +
-->  | {{#iferror: <!-- check for error through process
 +
-->      {{#ifexpr: {{{2|}}} > 0 <!-- is rank over 0
 +
-->        | {{#ifexpr: {{{2|}}} < 7 <!-- is rank under 7
 +
-->            | ({{{2|}}})<!-- display rank
 +
-->            | (?)<!-- rank is too high
 +
-->          }}| (?)<!-- rank is too low
 +
-->}} | (?) <!-- error triggered
 +
-->}}}}<!-- close iferror and if
 +
-->&nbsp;{{small|[{{PM|{{{1|UserName}}}|PM}}]}}<!-- build PM link with default
 +
-->&nbsp;{{#switch: {{{2|}}}
 +
| 1 = [[File:Profile_L1.png|25px|link=https://www.waze.com/user/editor/{{{1}}}]]
 +
| 3 = [[File:Profile_L3.png|25px|link=https://www.waze.com/user/editor/{{{1}}}]]
 +
| 4 = [[File:Profile_L4.png|25px|link=https://www.waze.com/user/editor/{{{1}}}]]
 +
| 5 = [[File:Profile_L5.png|25px|link=https://www.waze.com/user/editor/{{{1}}}]]
 +
| 6 = [[File:Profile_L6.png|25px|link=https://www.waze.com/user/editor/{{{1}}}]]
 +
| [[File:Profile_L2.png|25px|link=https://www.waze.com/user/editor/{{{1}}}]]}}<!-- add user profile link with image
 +
-->{{#if:{{{gho|}}}|<!-- If GHO name is given add a new line for avatar and name --><br>{{#if:{{{pic|}}}|<div style="float:left; margin-left: 1em;">[[{{{pic}}}|30px]]</div><!-- If a pic link is provided use that at 30px -->
 +
|<div style="float:left; margin-left: 1em; width: 2em; height: 2em; border-radius: 20px; <!--
 +
-->background: {{#switch:{{padleft:|1|{{{gho|John D}}}}}
 +
|a|A|i|I|q|Q|y|Y|6 = #f16364
 +
|b|B|j|J|r|R|z|Z|7 = #f58559
 +
|c|C|k|K|s|S|0|8 = #f9a43e
 +
|d|D|l|L|t|T|1|9 = #e4c62e
 +
|e|E|m|M|u|U|2|0 = #67bf74
 +
|f|F|n|N|v|V|3 = #59a2be
 +
|g|G|o|O|w|W|4 = #2093cd
 +
|h|H|p|P|x|X|5 = #ad62a7
 +
|#59a2be}};<!-- choose color based on first character --> color: white; zoom: 1"><!--
 +
--><div style="padding: 0.3em 0.7em; ">{{padleft:|1|{{{gho|John D}}}}}</div></div><!-- end if pic -->}}<!-- If no pic, generate color tile with initial --><div style="float:left; padding: 0.3em; color: DimGray;">&nbsp;&nbsp;{{{gho|John D}}}</div><!-- end if gho -->}}<!-- add GHO avatar and name if supplied
 +
-->|| {{{3|}}} <!-- Area covered
 +
-->|| {{AM/Badge|{{{badge1|}}}}}{{AM/Badge|{{{badge2}}}}}{{AM/Badge|{{{badge3}}}}}{{AM/Badge|{{{badge4}}}}}{{AM/Badge|{{{badge5}}}}}<!-- display up to five badges
 +
-->{{#if: {{{badge1|}}}|<br/>|}}<!-- insert a break if there was a badge; requires first badge always
 +
-->{{{4|}}}<!-- display rest of comment text (if exists) below badge (if exists)
 +
--></includeonly><noinclude>{{documentation}}</noinclude><!-- This page uses its own documentation to simplify use by entry level editors. More complex documentation is covered on the [[Template:AM/doc]] page.-->

Latest revision as of 20:52, 19 June 2016

Documentation icon Template documentation[view] [edit] [history] [purge]

This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page. It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not.

Usage

Normal

<noinclude>{{documentation}}</noinclude>
 - or -
<noinclude>{{doc}}</noinclude>
 - or -
<noinclude>{{documentation|template:any page/doc}}</noinclude>

This code should be added at the bottom of the template code, with no extra space before "<noinclude>" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page.

Add categories and interwiki links to the documentation page inside <includeonly> tags.

If the documentation page contains includeonly or noinclude tags as part of the documentation, replace the "<" with "&lt;", and the ">" with "&gt;.

Customizing display

Overrides exist to customize the output in special cases:

  • {{documentation|heading=}}: change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.
  • {{documentation|content=}}: for extremely simple documentation notes, enter the message desired with the |content= parameter. The text provided with this parameter appears in a box similar to the doc subpage, without any other notations in the boxes. For more complex documentation descriptions, use a full doc subpage.

Functions

If the documentation page doesn't exist, the "edit" link includes a preload parameter so that clicking it will pre-fill the edit form with the basic documentation page format.

Rationale

This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation).

The above documentation is transcluded from Template:Documentation/doc.
Please add categories to the /doc subpage.
Subpages of this template.