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}}
==Instructions==
Similar to the [[TheKolWiki:Sandbox|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 [http://kol.coldfront.net/thekolwiki/index.php?title={{FULLPAGENAME}}&action=purge 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 [[MetaWikipedia:Help:Template|documentation]].
Current Test: CustomAvatarTr


==Options==
==Options==
Line 28: Line 19:


==Examples==
==Examples==
<nowiki>{{Template:CustomAvatarTr|1|jick|7|jick_avatar.gif|jick_avatar2.gif|avatar4=jick_avatar4.gif|jick_avatar3.gif}}</nowiki>
<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:CustomAvatarTr|1|[[Jick]]|7|jick_avatar.gif|jick_avatar2.gif|avatar4=jick_avatar4.gif|jick_avatar3.gif}}
{{Template:Test|1|[[Jick]]|7|[[File:jick_avatar.gif]]|[[File:jick_avatar2.gif]]|avatar4=[[File:jick_avatar4.gif]]|[[File:jick_avatar3.gif]]}}
{{Template:CustomAvatarTr|6|[[Multi Czar]]|1|aname="bob"|Avatar_6.gif}}
{{Template:Test|6|[[Multi Czar]]|1|aname="bob"|[[File:Avatar_6.gif]]}}
{{Template:CustomAvatarTr|1061|Janice is Uber Cool|2}}
{{Template:Test|1061|Janice is Uber Cool|2}}
{{Template:CustomAvatarTr|4576|[[BoozerBear]]}}
{{Template:Test|4576|[[BoozerBear]]}}
{{Template:CustomAvatarTr|4576|[[BoozerBear]]|0}}
{{Template:Test|4576|[[BoozerBear]]|0}}
|}
|}
[[Category:Utility Templates|{{PAGENAME}}]]
[[Category:Utility Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 21:40, 2 April 2019


{{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