Jump to content

📢 Please make sure to read our Style Guide before editing. For questions, suggestions, or technical issues, please contact Noah. ✖

Template:Infobox Player: Difference between revisions

From CrabCraft Wiki
Created player infobox
 
Setup new infobox functionality
Line 6: Line 6:


{{Infobox Player
{{Infobox Player
| name          = Alex The Builder
| username      = Alex The Builder
| username      = BuilderAlex
| seasonjoined     = Season 2
| alias          = Lex, The Builder
| nationality = British
| joinseason     = Season 2
| discord = alextb
| nationality   = Canadian
| quote          = "One block at a time."
| favitem          = Golden Axe
| favblock          = Polished Diorite
| cabinet        = Minister of Infrastructure
| assumedoffice  = 4 March 2024
| succeeded      = Player_B
}}
}}
 
</noinclude>
<!--
<includeonly>
The template's functional code begins below, wrapped in <includeonly> tags.
{{#invoke:Infobox Player|infobox}}
-->
</noinclude><includeonly>
{| class="infobox" style="width: 250px; border: 1px solid #aaa; background: #f9f9f9; float: right; clear: right; margin: 0 0 1em 1em; font-size: 90%;"
! colspan="2" style="text-align: center; font-size: 120%; background: #F4BB44;" | '''{{{name|Infobox}}}'''
{{#if: {{{username|}}}
  | {{!}}-
{{!}} colspan="2" style="text-align: center;" {{!}}
https://mc-heads.net/player/{{{username}}}/100.png
}}
{{#if: {{{username|}}}{{{alias|}}}{{{joinseason|}}}{{{nationality|}}}
  | {{!}}-
{{!}} colspan="2" style="background: #F4BB44; text-align: center; font-weight: bold;" {{!}} Biography
}}
{{#if: {{{username|}}}
  | {{!}}-
! Username
{{!}} {{{username}}}
}}
{{#if: {{{alias|}}}
  | {{!}}-
! Aliases
{{!}} {{{alias}}}
}}
{{#if: {{{joinseason|}}}
  | {{!}}-
! Season Joined
{{!}} {{{joinseason}}}
}}
{{#if: {{{nationality|}}}
  | {{!}}-
! Nationality
{{!}} {{{nationality}}}
}}
{{#if: {{{quote|}}}{{{item|}}}{{{block|}}}
  | {{!}}-
{{!}} colspan="2" style="background: #F4BB44; text-align: center; font-weight: bold;" {{!}} Personality
}}
{{#if: {{{quote|}}}
  | {{!}}-
! Quote
{{!}} {{{quote}}}
}}
{{#if: {{{favitem|}}}
  | {{!}}-
! Favourite Item
{{!}} {{{favitem}}}
}}
{{#if: {{{favblock|}}}
  | {{!}}-
! Favourite Block
{{!}} {{{favblock}}}
}}
{{#if: {{{cabinet|}}}{{{assumedoffice|}}}{{{succeeded|}}}
  | {{!}}-
{{!}} colspan="2" style="background: #F4BB44; text-align: center; font-weight: bold;" {{!}} Government
}}
{{#if: {{{cabinet|}}}
  | {{!}}-
! Cabinet Role
{{!}} {{{cabinet}}}
}}
{{#if: {{{assumedoffice|}}}
  | {{!}}-
! Assumed Office
{{!}} {{{assumedoffice}}}
}}
{{#if: {{{succeeded|}}}
  | {{!}}-
! Succeeded by
{{!}} {{{succeeded}}}
}}
|}
</includeonly>
</includeonly>

Revision as of 11:58, 21 June 2025

Usage

Place this on any player’s page to display the infobox. Just replace the example values in the code block below with your own.

Example

Alex The Builder
https://mc-heads.net/player/Alex The Builder/110.png
Biography
Username Alex The Builder
Season Joined Season 2
Nationality British
Discord alextb