Difference between revisions of "Template:Infobox chess biography"

From blackwiki
Jump to navigation Jump to search
imported>Sun Creator
(Added 'width: 6em' to full name, means that left column is not to small and prevents splitting to two lines for players with FIDE rating and Peak rating and having much text to the right.)
imported>Hariboneagle927
(adding medal template)
 
(72 intermediate revisions by 43 users not shown)
Line 1: Line 1:
{| class="infobox vcard" style="font-size: 90%; text-align: left; width: 25em;"
+
{{Infobox
|-
+
| bodyclass    = vcard
! colspan="2" style="font-size: 120%; text-align: center;" class="fn"| {{{playername}}}
+
| above        = {{{name|<includeonly>{{PAGENAMEBASE}}</includeonly>}}}
|-
+
| aboveclass  = fn
{{#if: {{{image|<noinclude>-</noinclude>}}} |  
 
{{!}} colspan="2" style="text-align: center;" {{!}} <span class="photo">{{{image}}}</span>
 
{{!}}-
 
}}
 
{{#if: {{{caption|<noinclude>-</noinclude>}}} |
 
{{!}} colspan="2" style="text-align: center;" {{!}} ''{{{caption}}}''
 
{{!}}-
 
}}
 
|-
 
{{#if: {{{birthname|<noinclude>-</noinclude>}}} |
 
! style="vertical-align: top; width: 6em" {{!}}'''Full name'''
 
{{!}} {{{birthname}}}
 
{{!}}- class="adr"
 
}}
 
{{#if: {{{country|<noinclude>-</noinclude>}}} |
 
! style="vertical-align: top;" {{!}}'''Country'''
 
{{!}} {{{country}}}
 
{{!}}-
 
}}
 
|'''Born'''||colspan="2"|{{{datebirth}}}<br />{{{placebirth}}}
 
|-
 
|{{#if: {{{datedeath|<noinclude>-</noinclude>}}} |
 
{{!}}'''Died'''
 
{{!}} colspan="2" {{!}} {{{datedeath}}}<br />{{{placedeath}}}
 
{{!}}-
 
}}
 
|- class="note"
 
|{{#if: {{{title|<noinclude>-</noinclude>}}} |
 
{{!}}'''Title'''
 
{{!}} colspan="2" {{!}} {{{title}}}
 
{{!}}-
 
}}
 
|- class="note"
 
|{{#if: {{{worldchampion|<noinclude>-</noinclude>}}} |
 
{{!}}'''[[World Chess Championship|World Champion]]'''
 
{{!}} colspan="2" {{!}} {{{worldchampion}}}
 
{{!}}-
 
}}
 
|- class="note"
 
|{{#if: {{{womensworldchampion|<noinclude>-</noinclude>}}} |
 
{{!}}'''[[Women's World Chess Championship|Women's World Champion]]'''
 
{{!}} colspan="2" {{!}} {{{womensworldchampion}}}
 
{{!}}-
 
}}
 
|-
 
|{{#if: {{{rating|<noinclude>-</noinclude>}}} |
 
{{!}}'''[[Fédération Internationale des Échecs|FIDE]] [[Elo rating system|rating]]'''
 
{{!}} colspan="2" {{!}} {{{rating}}}
 
{{!}}-
 
}}
 
|-
 
{{#if: {{{peakrating|<noinclude>-</noinclude>}}} |
 
! style="vertical-align: top;" {{!}}'''[[Elo rating system|Peak rating]]'''
 
{{!}}{{{peakrating}}}
 
{{!}}-
 
}}
 
|}
 
<noinclude>
 
  
{{clear}}
+
| image        = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{#invoke:Wikidata|claim|P18}}}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1|alt={{{alt|}}}|suppressplaceholder=yes}}
 +
| caption      = {{{caption|{{#invoke:Wikidata |getImageLegend|FETCH_WIKIDATA}}}}}
  
{{template doc}}
+
| label1      = Full name
 
+
| data1        = {{{full_name|{{{birth_name|{{{birthname|}}}}}}}}}
[[id:Templat:Infobox_chess_player]]
+
| label2      = Country
[[mk:Шаблон:Инфокутија Шахист]]
+
| class2      = adr
[[pl:Szablon:Szachista_infobox]]
+
| data2        = {{{country|}}}
[[ro:Template:Infobox chess player]]
+
| label3      = Born
[[ru:Шаблон:Шахматист]]
+
| data3        = {{br separated entries|{{{birth_date|}}}|{{{birth_place|}}}}}
 
+
| label4      = Died
[[Category:People infobox templates|Chess player]]
+
| data4        = {{br separated entries|{{{death_date|}}}|{{{death_place|}}}}}
[[Category:Chess templates]]
+
| label5      = Title
</noinclude>
+
| class5      = note
 +
| data5        = {{{title|}}}
 +
| label6      = [[World Chess Championship|World Champion]]
 +
| class6      = note
 +
| data6        = {{{worldchampion|}}}
 +
| label7      = [[Women's World Chess Championship|Women's World Champion]]
 +
| class7      = note
 +
| data7        = {{{womensworldchampion|}}}
 +
| label8      = [[World Correspondence Chess Championship|ICCF World Champion]]
 +
| class8      = note
 +
| data8        = {{{ICCFworldchampion|}}} 
 +
| label9      = [[FIDE]] [[Elo rating system|rating]]
 +
| data9        = {{#if:{{Elo rating|ID={{{FideID|}}}}}|[https://ratings.fide.com/card.phtml?event={{{FideID|}}} {{Elo rating|ID={{{FideID}}}}}] {{Elo rating|ID=timestamp}} {{{rating|}}}|{{{rating|}}}}}
 +
| label10      = [[Elo rating system|Peak rating]]
 +
| data10      = {{{peakrating|}}}
 +
| label11      = [http://ratings.fide.com/toplist.phtml Ranking]
 +
| data11      = {{{ranking|}}}
 +
| label12      = Peak ranking
 +
| data12      = {{{peakranking|}}}
 +
| header20  = {{Infobox medal templates
 +
| title  = {{{medaltemplates-title|}}}
 +
| medals = {{{medaltemplates|}}}
 +
| expand = {{#ifeq:{{lc:{{{show-medals}}}}}|no||yes}}
 +
}}
 +
| header21    = {{{embedded|{{{module|}}}}}}
 +
}}<noinclude>
 +
{{documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude>

Latest revision as of 09:31, 18 June 2020

Script error: No such module "Wikidata".
Script error: No such module "Wikidata".

[[Category:Infobox templates|Template:Remove first word]]

Template:Uses Wikidata

Blank syntax

{{Infobox chess biography
| name        = 
| image       = 
| image_size  = 
| caption     = 
| full_name   = 
| country     = 
| birth_date  = 
| birth_place = 
| death_date  = 
| death_place = 
| title       = 
| worldchampion = 
| womensworldchampion = 
| ICCFworldchampion =
| yearsactive =
| rating      = 
| peakrating  = 
| ranking     = 
| peakranking = 
| FideID      =
<!-- Medal record -->
| show-medals      = 
| medaltemplates   = 
| medaltemplates-title = 
| module3          = 
}}

Example usage

Alexander Morozevich
File:Alexander Morozevich grandmaster.jpg
Full nameAlexander Sergeyevich Morozevich
CountryRussia
Born (1977-07-18) July 18, 1977 (age 48)
Moscow, Russia
TitleGrandmaster
FIDE rating2758
Peak rating2788 (July 2008)
RankingNo. 10 (September 2012)
Peak rankingNo. 2 (July 2008)
[[Category:Infobox templates|Template:Remove first word]]
{{Infobox chess biography
| name        = Alexander Morozevich
| image       = Alexander_Morozevich_grandmaster.jpg
| caption     = 
| birthname   = Alexander Sergeyevich Morozevich
| country     = [[Russia]]
| birth_date  = {{birth date and age|1977|7|18}}
| birth_place = [[Moscow]], Russia
| death_date  = 
| death_place = 
| title       = [[Grandmaster (chess)|Grandmaster]]
| worldchampion = 
| womensworldchampion =
| ICCFworldchampion = 
| yearsactive = 
| rating      = 2758
| peakrating  = 2788 (July 2008)
| ranking     = No. 12 (September 2012)
| peakranking = No. 2 (July 2008)
}}

or alternatively by using the 'FideID' parameter (which uses automatically updated 'rating' data for players rated over 2400):

Alexander Morozevich
File:Alexander Morozevich grandmaster.jpg
Full nameAlexander Sergeyevich Morozevich
CountryRussia
Born (1977-07-18) July 18, 1977 (age 48)
Moscow, Russia
TitleGrandmaster
FIDE rating2659 (January 2026)
(No. 4 on the April 2007 FIDE ratings list)
Peak rating2762 (April 2007)
[[Category:Infobox templates|Template:Remove first word]]
{{Infobox chess biography
| name        = Alexander Morozevich
| image       = Alexander_Morozevich_grandmaster.jpg
| caption     = 
| birthname   = Alexander Sergeyevich Morozevich
| country     = [[Russia]]
| birth_date  = {{birth date and age|1977|7|18}}
| birth_place = [[Moscow]], Russia
| death_date  = 
| death_place = 
| title       = [[Grandmaster (chess)|Grandmaster]]
| worldchampion = 
| womensworldchampion = 
| ICCFworldchampion = 
| rating      = <br /><small>(No. 4 on the April 2007 FIDE ratings list)</small>
| peakrating  = 2762 (April 2007)
| FideID      = 4116992
}}

Microformat

Template:UF-hcard-person