Template:Test: Difference between revisions
From A KoL Wiki
imported>Pastrywoman mNo edit summary |
imported>Pastrywoman mNo edit summary |
||
Line 2: | Line 2: | ||
| id="{{{aname|player-id-{{{id|{{{1|0}}}}}}}}}"| {{{name|{{{2|<Player's Name Unknown>}}}}}} || {{{id|{{{1}}}}}} || | | id="{{{aname|player-id-{{{id|{{{1|0}}}}}}}}}"| {{{name|{{{2|<Player's Name Unknown>}}}}}} || {{{id|{{{1}}}}}} || | ||
{{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}.gif]]}}}}}} | {{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}.gif]]}}}}}} | ||
{{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 0 | {{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}.gif]]}}}}}}}} | {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 0 | {{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}_2.gif]]}}}}}}}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
Line 8: | Line 8: | ||
__NOTOC__ | __NOTOC__ | ||
{{Code2}} | {{Code2}} | ||
==Options== | ==Options== | ||
Line 28: | Line 19: | ||
==Examples== | ==Examples== | ||
<nowiki>{{Template: | <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%" | {| border="1px" cellpadding="4px" cellspacing="0" style="margin:1em; text-align:center; width: 100%" | ||
|- style="background-color:#EFEFEF;" | |- style="background-color:#EFEFEF;" | ||
! Player Name !! Player ID !! Custom Avatar(s) | ! Player Name !! Player ID !! Custom Avatar(s) | ||
{{Template: | {{Template:Test|1|[[Jick]]|7|[[File:jick_avatar.gif]]|[[File:jick_avatar2.gif]]|avatar4=[[File:jick_avatar4.gif]]|[[File:jick_avatar3.gif]]}} | ||
{{Template: | {{Template:Test|6|[[Multi Czar]]|1|aname="bob"|[[File:Avatar_6.gif]]}} | ||
{{Template: | {{Template:Test|1061|Janice is Uber Cool|2}} | ||
{{Template: | {{Template:Test|4576|[[BoozerBear]]}} | ||
{{Template: | {{Template:Test|4576|[[BoozerBear]]|0}} | ||
|} | |} | ||
[[Category:Utility Templates|{{PAGENAME}}]] | [[Category:Utility Templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Revision as of 21:40, 2 April 2019
[edit]
{{Test}}
|-
| id="{{{aname|player-id-{{{id|{{{1|0}}}}}}}}}"| {{{name|{{{2|<Player's Name Unknown>}}}}}} || {{{id|{{{1}}}}}} || {{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}.gif]]}}}}}} {{#ifexpr: {{{avatarcount|{{{3|1}}}}}} > 0 | {{{avatar1|{{{4|[[File:{{{id|{{{1|0}}}}}}_2.gif]]}}}}}}}}
Options
All arguments (expect for aname) are both positional and keyword selectable with the keywords have precedes over poitional.
Meaning {{Template:CustomAvatarTr|1|[[Jick]]|7|[[File:jick_avatar.gif]]}}
is the same as {{Template:CustomAvatarTr|id=1|avatar1=[[File:jick_avatar.gif]]|avatarcount=7|name=[[Jick]]}}
id
The player's ID number. Defaults to '<Player's Name Unknown>'.name
The player's in-game name. Defaults to '0'.avatarcount
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 )avatarN
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.aname
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
{{Template:Test|1|jick|7|jick_avatar.gif|jick_avatar2.gif|avatar4=jick_avatar4.gif|jick_avatar3.gif}}
Player Name | Player ID | Custom Avatar(s) |
---|---|---|
Jick | 1 | |
Multi Czar | 6 | |
Janice is Uber Cool | 1061 | |
BoozerBear | 4576 | |
BoozerBear | 4576 |
|