Template:Infobox player: Difference between revisions
Template page
More actions
Created page with "<includeonly>{| class="wikitable playerbox" style="float:right; clear:right; width:300px; margin:0 0 1em 1em; border-collapse:collapse;" |- ! colspan="2" style="text-align:center; font-size:125%; padding:0.6em;" | {{{name|{{PAGENAME}}}}} {{#if:{{{image|}}}| {{!}}- {{!}} colspan="2" style="text-align:center; padding:10px;" {{!}} [[File:{{{image}}}|250px|frameless|alt={{{name|{{PAGENAME}}}}}]] }} {{#if:{{{rank|}}}| {{!}}- ! style="width:38%; text-align:left;" {{!}} Rank {{..." |
mNo edit summary |
||
| Line 14: | Line 14: | ||
{{!}}- | {{!}}- | ||
! style="text-align:left;" {{!}} Town | ! style="text-align:left;" {{!}} Town | ||
{{!}} [[{{{town}}}]] | {{!}} {{#ifexist:{{{town}}}|[[{{{town}}}]]|{{{town}}}}} | ||
}} | }} | ||
{{#if:{{{dateJoined|{{{date_joined|}}}}}}| | {{#if:{{{dateJoined|{{{date_joined|}}}}}}| | ||
| Line 43: | Line 43: | ||
{{!}} {{{formerNames|{{{former_names}}}}}} | {{!}} {{{formerNames|{{{former_names}}}}}} | ||
}} | }} | ||
{{#if:{{{forumsId|{{{forums_id|}}}}}}{{{uuid|}}}| | {{#if:{{{forumsId|{{{forums_id|}}}}}}{{{uuid|}}}{{{discordId|{{{discord_id|}}}}}}| | ||
{{!}}- | {{!}}- | ||
! colspan="2" style="text-align:center;" {{!}} | ! colspan="2" style="text-align:center;" {{!}} Links | ||
{{!}}- | {{!}}- | ||
! style="text-align: | {{!}} colspan="2" style="text-align:center; padding:7px;" {{!}} {{#if:{{{forumsId|{{{forums_id|}}}}}}|<span style="display:inline-block; margin:2px; padding:4px 7px; border:1px solid #777;">[https://forums.lokamc.com/members/{{{forumsId|{{{forums_id}}}}}}/ Forums]</span>}}{{#if:{{{uuid|}}}|<span style="display:inline-block; margin:2px; padding:3px; border:1px solid #777;">[[File:NameMC logo.svg|26px|link=https://namemc.com/profile/{{{uuid}}}|alt=NameMC]]</span><span style="display:inline-block; margin:2px; padding:3px; border:1px solid #777;">[[File:EldritchBot icon logo.png|26px|link=https://eldritchbot.com/player/{{{uuid}}}|alt=EldritchBot]]</span>}}{{#if:{{{discordId|{{{discord_id|}}}}}}|<span style="display:inline-block; margin:2px; padding:3px; border:1px solid #777;">[[File:Discord logo.svg|26px|link=https://discord.com/users/{{{discordId|{{{discord_id}}}}}}|alt=Discord]]</span>}} | ||
{{ | |||
}} | |||
{{#if:{{{uuid|}}}| | |||
{{ | |||
}} | }} | ||
|}</includeonly><noinclude> | |}</includeonly><noinclude> | ||
| Line 70: | Line 59: | ||
|rank=Elder | |rank=Elder | ||
|town=Example Town | |town=Example Town | ||
|dateJoined= | |dateJoined=March 26, 2026 | ||
|generation=First | |generation=First | ||
|formerNames=OldName, OlderName | |formerNames=OldName, OlderName | ||
|forumsId=1741 | |forumsId=1741 | ||
|discordId=138419767567450112 | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 103: | Line 93: | ||
|- | |- | ||
| <code>town</code> | | <code>town</code> | ||
| Current town. | | Current town. Linked only when an article with the exact town name exists; otherwise displayed as plain text. | ||
| <code>Example Town</code> | | <code>Example Town</code> | ||
|- | |- | ||
| <code>dateJoined</code> | | <code>dateJoined</code> | ||
| Date the player joined Loka. The legacy parameter <code>date_joined</code> also works. | | Date the player joined Loka, written in month–day–year format. The legacy parameter <code>date_joined</code> also works. | ||
| <code> | | <code>March 26, 2026</code> | ||
|- | |- | ||
| <code>generation</code> | | <code>generation</code> | ||
| Line 121: | Line 111: | ||
| Numerical ID from the player's Loka forums URL. Generates a forums profile link. <code>forums_id</code> also works. | | Numerical ID from the player's Loka forums URL. Generates a forums profile link. <code>forums_id</code> also works. | ||
| <code>1741</code> | | <code>1741</code> | ||
|- | |||
| <code>discordId</code> | |||
| Numerical ID of the player's linked Discord account. Generates a Discord profile link. <code>discord_id</code> also works. | |||
| <code>138419767567450112</code> | |||
|} | |} | ||
| Line 126: | Line 120: | ||
* [[Template:Rank]] supplies rank colouring, links and tooltips. | * [[Template:Rank]] supplies rank colouring, links and tooltips. | ||
* <code>NameMC logo.svg</code> | * <code>NameMC logo.svg</code>, <code>EldritchBot icon logo.png</code> and <code>Discord logo.svg</code> must be uploaded locally. | ||
* Enter UUIDs without hyphens. This installation does not currently provide the <code>#replace</code> parser function needed to remove them automatically. | * Enter UUIDs without hyphens. This installation does not currently provide the <code>#replace</code> parser function needed to remove them automatically. | ||
* Loka's API exposes rank and Discord ID by UUID, but this wiki currently has no extension capable of fetching and decoding external JSON. These values therefore remain manual parameters. | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 17:10, 17 August 2026
Usage
{{PlayerBox
|name=PlayerName
|image=PlayerName.png
|uuid=7c0ff210425f4860b158b56590c6f0b4
|rank=Elder
|town=Example Town
|dateJoined=March 26, 2026
|generation=First
|formerNames=OldName, OlderName
|forumsId=1741
|discordId=138419767567450112
}}
Only name is normally required. Rows for omitted optional parameters are hidden.
Parameters
| Parameter | Description | Example |
|---|---|---|
name
|
Player's current Minecraft name. Defaults to the page name. | PlayerName
|
image
|
Filename of an image uploaded to the wiki. Do not include the File: prefix.
|
PlayerName.png
|
uuid
|
Player's hyphenless Minecraft UUID. Generates NameMC and EldritchBot links. | 7c0ff210425f4860b158b56590c6f0b4
|
rank
|
Current Loka rank. Automatically passed through Template:Rank. | Elder
|
town
|
Current town. Linked only when an article with the exact town name exists; otherwise displayed as plain text. | Example Town
|
dateJoined
|
Date the player joined Loka, written in month–day–year format. The legacy parameter date_joined also works.
|
March 26, 2026
|
generation
|
Player generation from First through Tenth. The numbers 1–10 also work. | First
|
formerNames
|
Notable former Minecraft names. former_names also works.
|
OldName
|
forumsId
|
Numerical ID from the player's Loka forums URL. Generates a forums profile link. forums_id also works.
|
1741
|
discordId
|
Numerical ID of the player's linked Discord account. Generates a Discord profile link. discord_id also works.
|
138419767567450112
|
Requirements
- Template:Rank supplies rank colouring, links and tooltips.
NameMC logo.svg,EldritchBot icon logo.pngandDiscord logo.svgmust be uploaded locally.- Enter UUIDs without hyphens. This installation does not currently provide the
#replaceparser function needed to remove them automatically. - Loka's API exposes rank and Discord ID by UUID, but this wiki currently has no extension capable of fetching and decoding external JSON. These values therefore remain manual parameters.