Template:Infobox player: Difference between revisions
Template page
More actions
m Remove obsolete Fandom links |
m Fix documentation links to templates that no longer exist under those names |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
|type= | |type= | ||
|content={{#if:{{{rank|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Rank</span><span class="loka-infobox-row-value">{{Rank|{{{rank|}}}}}</span></div>}}{{#if:{{{town|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Town</span><span class="loka-infobox-row-value">{{#ifexist:{{{town|}}}|[[{{{town|}}}]]|{{{town|}}}}}</span></div>}}{{#if:{{{dateJoined|{{{date_joined|}}}}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Date joined</span><span class="loka-infobox-row-value">{{{dateJoined|{{{date_joined|}}}}}}</span></div>}}{{#if:{{{dateJoined|{{{date_joined|}}}}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Generation</span><span class="loka-infobox-row-value">{{#iferror:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}}|<span title="The join date could not be interpreted.">Unknown</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20111203|<span class="loka-generation loka-generation--first">First Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20121202|<span class="loka-generation loka-generation--second">Second Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20131207|<span class="loka-generation loka-generation--third">Third Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20150919|<span class="loka-generation loka-generation--fourth">Fourth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20160807|<span class="loka-generation loka-generation--fifth">Fifth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20180328|<span class="loka-generation loka-generation--sixth">Sixth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20200530|<span class="loka-generation loka-generation--seventh">Seventh Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20211017|<span class="loka-generation loka-generation--eighth">Eighth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20230929|<span class="loka-generation loka-generation--ninth">Ninth Generation</span>|<span class="loka-generation loka-generation--tenth">Tenth Generation</span>}}}}}}}}}}}}}}}}}}}}</span></div>}}{{#if:{{{formerNames|{{{former_names|}}}}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Former names</span><span class="loka-infobox-row-value">{{{formerNames|{{{former_names|}}}}}}</span></div>}}{{#if:{{{forumsId|{{{forums_id|}}}}}}{{{uuid|}}}{{{discordId|{{{discord_id|}}}}}}|<div class="loka-player-links">{{#if:{{{forumsId|{{{forums_id|}}}}}}|<span class="loka-player-link">[https://forums.lokamc.com/members/{{{forumsId|{{{forums_id|}}}}}}/ Forums]</span>}}{{#if:{{{uuid|}}}|<span class="loka-player-link">[[File:NameMC logo.png|26px|link=https://namemc.com/profile/{{{uuid|}}}|alt=NameMC]]</span><span class="loka-player-link">[[File:EldritchBot icon logo.png|26px|link=https://eldritchbot.com/player/{{{uuid|}}}|alt=EldritchBot]]</span>}}{{#if:{{{discordId|{{{discord_id|}}}}}}|<span class="loka-player-link">[[File:Discord logo.svg|26px|link=https://discord.com/users/{{{discordId|{{{discord_id|}}}}}}|alt=Discord]]</span>}}</div>}} | |content={{#if:{{{rank|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Rank</span><span class="loka-infobox-row-value">{{Rank|{{{rank|}}}}}</span></div>}}{{#if:{{{town|}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Town</span><span class="loka-infobox-row-value">{{#ifexist:{{{town|}}}|[[{{{town|}}}]]|{{{town|}}}}}</span></div>}}{{#if:{{{dateJoined|{{{date_joined|}}}}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Date joined</span><span class="loka-infobox-row-value">{{{dateJoined|{{{date_joined|}}}}}}</span></div>}}{{#if:{{{dateJoined|{{{date_joined|}}}}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Generation</span><span class="loka-infobox-row-value">{{#iferror:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}}|<span title="The join date could not be interpreted.">Unknown</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20111203|<span class="loka-generation loka-generation--first">First Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20121202|<span class="loka-generation loka-generation--second">Second Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20131207|<span class="loka-generation loka-generation--third">Third Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20150919|<span class="loka-generation loka-generation--fourth">Fourth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20160807|<span class="loka-generation loka-generation--fifth">Fifth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20180328|<span class="loka-generation loka-generation--sixth">Sixth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20200530|<span class="loka-generation loka-generation--seventh">Seventh Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20211017|<span class="loka-generation loka-generation--eighth">Eighth Generation</span>|{{#ifexpr:{{#time:Ymd|{{{dateJoined|{{{date_joined|}}}}}}}} < 20230929|<span class="loka-generation loka-generation--ninth">Ninth Generation</span>|<span class="loka-generation loka-generation--tenth">Tenth Generation</span>}}}}}}}}}}}}}}}}}}}}</span></div>}}{{#if:{{{formerNames|{{{former_names|}}}}}}|<div class="loka-infobox-row"><span class="loka-infobox-row-key">Former names</span><span class="loka-infobox-row-value">{{{formerNames|{{{former_names|}}}}}}</span></div>}}{{#if:{{{forumsId|{{{forums_id|}}}}}}{{{uuid|}}}{{{discordId|{{{discord_id|}}}}}}|<div class="loka-player-links">{{#if:{{{forumsId|{{{forums_id|}}}}}}|<span class="loka-player-link">[https://forums.lokamc.com/members/{{{forumsId|{{{forums_id|}}}}}}/ Forums]</span>}}{{#if:{{{uuid|}}}|<span class="loka-player-link">[[File:NameMC logo.png|26px|link=https://namemc.com/profile/{{{uuid|}}}|alt=NameMC]]</span><span class="loka-player-link">[[File:EldritchBot icon logo.png|26px|link=https://eldritchbot.com/player/{{{uuid|}}}|alt=EldritchBot]]</span>}}{{#if:{{{discordId|{{{discord_id|}}}}}}|<span class="loka-player-link">[[File:Discord logo.svg|26px|link=https://discord.com/users/{{{discordId|{{{discord_id|}}}}}}|alt=Discord]]</span>}}</div>}} | ||
}}</includeonly><noinclude> | }}{{#if:{{{rank|}}}|[[Category:{{{rank|}}} holders]]}}</includeonly><noinclude> | ||
== Usage == | == Usage == | ||
| Line 21: | Line 21: | ||
</pre> | </pre> | ||
Only <code>name</code> is normally required. Rows for omitted optional parameters are hidden. Built on [[Template:Infobox]] for the shared name/image/row chrome | Only <code>name</code> is normally required. Rows for omitted optional parameters are hidden. Built on [[Template:Infobox]] for the shared name/image/row chrome — see there for the wiki's common infobox look. | ||
== Parameters == | == Parameters == | ||
| Line 43: | Line 43: | ||
|- | |- | ||
| <code>rank</code> | | <code>rank</code> | ||
| Current Loka rank. Automatically passed through [[Template:Rank]]. | | Current Loka rank. Automatically passed through [[Template:Rank]], and adds this page to a "<rank> holders" category — e.g. <code>rank=Sentry</code> adds [[:Category:Sentry holders]]. [[Template:Infobox rank]]'s "Current holders" count reads this category, so keeping this parameter current here is what keeps that count accurate — there's no separate number to remember to update. | ||
| <code>Elder</code> | | <code>Elder</code> | ||
|- | |- | ||
| Line 76: | Line 76: | ||
== Automatic generation calculation == | == Automatic generation calculation == | ||
The generation is calculated automatically from <code>dateJoined</code>; do not supply a separate generation parameter. The template converts the join date to <code>YYYYMMDD</code> with <code>#time</code> and compares it with the generation boundaries recorded | The generation is calculated automatically from <code>dateJoined</code>; do not supply a separate generation parameter. The template converts the join date to <code>YYYYMMDD</code> with <code>#time</code> and compares it with the generation boundaries recorded below: | ||
{| class="wikitable" | {| class="wikitable" | ||
Latest revision as of 01:16, 24 August 2026
Usage
{{Infobox player
|name=PlayerName
|image=PlayerName.png
|uuid=7c0ff210425f4860b158b56590c6f0b4
|rank=Elder
|town=Example Town
|dateJoined=March 26, 2026
|formerNames=OldName, OlderName
|forumsId=1741
|discordId=138419767567450112
}}
Only name is normally required. Rows for omitted optional parameters are hidden. Built on Template:Infobox for the shared name/image/row chrome — see there for the wiki's common infobox look.
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, and adds this page to a "<rank> holders" category — e.g. rank=Sentry adds Category:Sentry holders. Template:Infobox rank's "Current holders" count reads this category, so keeping this parameter current here is what keeps that count accurate — there's no separate number to remember to update.
|
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
|
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.png,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.
Automatic generation calculation
The generation is calculated automatically from dateJoined; do not supply a separate generation parameter. The template converts the join date to YYYYMMDD with #time and compares it with the generation boundaries recorded below:
| Generation | Join-date range |
|---|---|
| First Generation | Before December 3, 2011 |
| Second Generation | December 3, 2011 - December 1, 2012 |
| Third Generation | December 2, 2012 - December 6, 2013 |
| Fourth Generation | December 7, 2013 - September 18, 2015 |
| Fifth Generation | September 19, 2015 - August 6, 2016 |
| Sixth Generation | August 7, 2016 - March 27, 2018 |
| Seventh Generation | March 28, 2018 - May 29, 2020 |
| Eighth Generation | May 30, 2020 - October 16, 2021 |
| Ninth Generation | October 17, 2021 - September 28, 2023 |
| Tenth Generation | September 29, 2023 onward |