|
|
(27 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| <includeonly>|- id="{{{aname|player-id-{{{id|{{{1|0}}}}}}}}}" | | <includeonly> |
| | {{{name|{{{2|<Player's Name Unknown>}}}}}} || {{{id|{{{1}}}}}} || {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 0 | {{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 1 | {{{avatar2|{{{5|[[File:{{{id|{{{1|0}}}}}}_2.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 2nd Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 2 | {{{avatar3|{{{6|[[File:{{{id|{{{1|0}}}}}}_3.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 3rd Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 3 | {{{avatar4|{{{7|[[File:{{{id|{{{1|0}}}}}}_4.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 4th Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 4 | {{{avatar5|{{{8|[[File:{{{id|{{{1|0}}}}}}_5.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 5th Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 5 | {{{avatar6|{{{9|[[File:{{{id|{{{1|0}}}}}}_6.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 6th Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 6 | {{{avatar7|{{{10|[[File:{{{id|{{{1|0}}}}}}_7.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 7th Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 7 | {{{avatar8|{{{11|[[File:{{{id|{{{1|0}}}}}}_8.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 8th Avatar]]}}}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 8 | {{{avatar9|{{{12|[[File:{{{id|{{{1|0}}}}}}_9.gif|{{{name|{{{2|<Player's Name Unknown>}}}}}}'s 9th Avatar]]}}}}}}}}</includeonly><noinclude>
| | {{{1}}} |
| | | [[Category:Test Templates]] |
| | </includeonly><noinclude> |
|
| |
|
| [[Category:Test Templates|{{PAGENAME}}]] | | [[Category:Test Templates|{{PAGENAME}}]] |
Line 14: |
Line 15: |
| Always give a template a category, even if it is [[:Category:Test Templates]]. For help on how a template works, read some [[MetaWikipedia:Help:Template|documentation]]. | | Always give a template a category, even if it is [[:Category:Test Templates]]. For help on how a template works, read some [[MetaWikipedia:Help:Template|documentation]]. |
|
| |
|
| Current Test: CustomAvatarTr | | Current Test: enchantment |
| | |
| | ==Explanation== |
| | Enchantment template |
| | |
| | ==Usage== |
| | <pre>{{Test|Foo}}</pre> |
| | {{Test|Foo}} |
| | <pre>{{Test|Foo|Bar}}</pre> |
| | {{Test|Foo|Bar}} |
| | |
| | <pre>{{Test|+1 damage to {{element|Hot|Spells}}}}</pre> |
| | {{Test|+1 damage to {{element|Hot|Spells}}}} |
| | |
| | <pre>{{Test|quest=1|autocat=yes|notrade=1|autosell=0}}</pre> |
| | {{Test|quest=1|autocat=yes|notrade=1|autosell=0}} |
| | |
| | <pre>{{Test|autocat=yes|notrade=1|autosell=0}}</pre> |
| | {{Test|autocat=yes|notrade=1|autosell=0}} |
| | |
| | <pre>{{Test|autocat=yes|notrade=1|autosell=11}}</pre> |
| | {{Test|autocat=yes|notrade=1|autosell=11}} |
| | |
| | <pre>{{Test|autocat=yes|autosell=0}}</pre> |
| | {{Test|autocat=yes|autosell=0}} |
| | |
| | <pre>{{Test|autocat=yes|autosell=11}}</pre> |
| | {{Test|autocat=yes|autosell=11}} |
|
| |
|
| ==Options==
| | <pre>{{Test|autocat=no|autosell=0}}</pre> |
| All arguments (expect for aname) are both positional and keyword selectable with the keywords have precedes over poitional.
| | {{Test|autocat=no|autosell=0}} |
| Meaning <code><nowiki>{{Template:CustomAvatarTr|1|[[Jick]]|7|[[File:jick_avatar.gif]]}}</nowiki></code> is the same as <code><nowiki>{{Template:CustomAvatarTr|id=1|avatar1=[[File:jick_avatar.gif]]|avatarcount=7|name=[[Jick]]}}</nowiki></code>
| |
| * <code>id</code> The player's ID number. Defaults to '<Player's Name Unknown>'.
| |
| * <code>name</code> The player's in-game name. Defaults to '0'.
| |
| * <code>avatarcount</code> The number of avatars the player has. Defaults to '1'. If no avatarN argument is supplied then the template will use '{{{id}}}_N.gif' instead. ( '{{{id}}}.gif' will be used for avatarcount=1 )
| |
| * <code>avatarN</code> A keyword assignment of a particular avatar. Defaults to '[[File:{{{id}}}.gif]]'. avatarN will only show if avatarcount >= N. The image should be a mediawiki File include not just the file name. Note: N is valid for numbers from 0-9. 0 will cause no images to be used.
| |
| * <code>aname</code> Anchor name (use when the monster name has special characters that cannot be used in a CSS id specifier). Defaults to 'player-id-{{{id}}}'.
| |
|
| |
|
| ==Examples==
| | [[Category:Utility Templates|{{PAGENAME}}]]</noinclude> |
| <nowiki>{{Template:Test|1|jick|7|jick_avatar.gif|jick_avatar2.gif|avatar4=jick_avatar4.gif|jick_avatar3.gif}}</nowiki>
| |
| {| border="1px" cellpadding="4px" cellspacing="0" style="margin:1em; text-align:center; width: 100%"
| |
| |- style="background-color:#EFEFEF;"
| |
| ! Player Name !! Player ID !! Custom Avatar(s)
| |
| {{Template:Test|1|[[Jick]]|7|[[File:jick_avatar.gif]]|[[File:jick_avatar2.gif]]|[[File:jick_avatar3.gif]]}}
| |
| {{Template:Test|6|[[Multi Czar]]|1|aname="bob"|[[File:Avatar_6.gif]]}}
| |
| {{Template:Test|1061|Janice is Uber Cool|2}}
| |
| {{Template:Test|4576|[[BoozerBear]]}}
| |
| {{Template:Test|4576|[[BoozerBear]]|4}}
| |
| |}
| |
| [[Category:Utility Templates|{{PAGENAME}}]] | |
| </noinclude> | |
{{{1}}}
[[Category:Test Templates]]
Instructions
Similar to the Sandbox, this page is here for you to play around with templates. Do what you like with it, but please leave this explanatory section.
Insert your desired template contents above between the "includeonly" tags, and alter the instance below to include any parameters you may need. You may need to purge this page to see the effects of changes to this template's code. The same also holds for any other template. Otherwise, you may have to wait several minutes before the wiki starts using the new code.
Always give a template a category, even if it is Category:Test Templates. For help on how a template works, read some documentation.
Current Test: enchantment
Explanation
Enchantment template
Usage
{{Test|Foo}}
Foo
{{Test|Foo|Bar}}
Foo
{{Test|+1 damage to {{element|Hot|Spells}}}}
+1 damage to Hot Spells
{{Test|quest=1|autocat=yes|notrade=1|autosell=0}}
{{{1}}}
{{Test|autocat=yes|notrade=1|autosell=0}}
{{{1}}}
{{Test|autocat=yes|notrade=1|autosell=11}}
{{{1}}}
{{Test|autocat=yes|autosell=0}}
{{{1}}}
{{Test|autocat=yes|autosell=11}}
{{{1}}}
{{Test|autocat=no|autosell=0}}
{{{1}}}