Template
Player
From Dogcraft Wiki
m (adding class "playername") |
(Removed support for UUIDs and former IGNs to improve performance. This is probably the most used template, it should be small and fast. UUIDs could need ping-ponging between continents, while the 'formerly' option was rarely used and can be added manually where required in the text. This change should not effect most uses and users of this template. If minotar.net goes down this template will stop working.) |
||
Line 1: | Line 1: | ||
<noinclude> | <includeonly><span class="playername" style="white-space:nowrap;">https://minotar.net/helm/{{{1|MHF_Steve}}}/20.png<nowiki></nowiki> ''{{{1}}}''</span></includeonly><noinclude> | ||
==Player template== | ==Player template== | ||
This template adds a head image next to a player's username. Add wherever you refer to a player name. Useful for helping identify players. | This template adds a head image next to a player's username. Add wherever you refer to a player name. Useful for helping identify players. | ||
===Example=== | ===Example=== | ||
<nowiki>{{Player|William278}}</nowiki> generates: {{Player|William278}} | <code><nowiki>{{Player|William278}}</nowiki></code> generates: {{Player|William278}} | ||
===Template Data=== | ===Template Data=== | ||
<templatedata>{ | <templatedata>{ | ||
Line 13: | Line 13: | ||
"type": "string", | "type": "string", | ||
"required": true | "required": true | ||
} | } | ||
}, | }, | ||
"format": "inline", | "format": "inline", | ||
"paramOrder": [ | "paramOrder": [ | ||
"1 | "1" | ||
] | ] | ||
}</templatedata>< | }</templatedata> | ||
<!-- Complex version of the template with UUID and former IGNs support, replaced to improve performance: {{#if: {{{uuid|}}}|https://dogcraft.net/img/mc/avatars/{{{uuid}}}?size=20.png|{{#ifeq: {{UUID|{{{1}}}}}|Unlinked Account|https://minotar.net/helm/{{{1|char}}}/20.png|https://dogcraft.net/img/mc/avatars/{{UUID|{{{1}}}}}?size=20.png}}}}<nowiki></nowiki> ''{{#if: {{{formerly|}}}|{{{1}}} (formerly {{{2}}})|{{#if: {{{2|}}}|{{{2|}}}|{{{1}}}}}}}''</span> --></noinclude> |
Revision as of 01:01, 8 June 2022
Player template
This template adds a head image next to a player's username. Add wherever you refer to a player name. Useful for helping identify players.
Example
{{Player|William278}}
generates: William278
Template Data
Displays a player head next to a player's username and italicizes the username.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Username | 1 | Player's in-game name | String | required |
This page was last modified on 8 June 2022, at 01:01. (11 months ago)