Difference between revisions of "Template:Infobox sportsperson/Wikidata"
Jump to navigation
Jump to search
imported>Wil540 art m (fetching Residence info from wikidata) |
imported>Mike Peel (code upgrade) |
||
Line 7: | Line 7: | ||
| title = {{#ifeq:{{{child|{{{embed|}}}}}}|yes|'''Sports career'''|{{#if:{{{honorific_prefix|{{{honorific prefix|}}}}}}|<span class="honorific-prefix" style="font-size: small">{{{honorific_prefix|{{{honorific prefix|}}}}}}</span><br />}}<includeonly><span class="fn">{{If empty|{{{name|}}}|{{PAGENAMEBASE}}}}</span></includeonly>{{#if:{{{honorific_suffix|{{{honorific suffix|}}}}}}|<br /><span class="honorific-suffix" style="font-size: small">{{{honorific_suffix|{{{honorific suffix|}}}}}}</span>}}}} | | title = {{#ifeq:{{{child|{{{embed|}}}}}}|yes|'''Sports career'''|{{#if:{{{honorific_prefix|{{{honorific prefix|}}}}}}|<span class="honorific-prefix" style="font-size: small">{{{honorific_prefix|{{{honorific prefix|}}}}}}</span><br />}}<includeonly><span class="fn">{{If empty|{{{name|}}}|{{PAGENAMEBASE}}}}</span></includeonly>{{#if:{{{honorific_suffix|{{{honorific suffix|}}}}}}|<br /><span class="honorific-suffix" style="font-size: small">{{{honorific_suffix|{{{honorific suffix|}}}}}}</span>}}}} | ||
− | | image = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke: | + | | image = {{#invoke:InfoboxImage |InfoboxImage |image={{#invoke:WikidataIB | getValue | rank=best |P18 |name=image |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |onlysourced=no |noicon=yes | maxvals=1 |{{{image|}}}}} |size={{{image_size|{{{imagesize|}}}}}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |suppressplaceholder=yes}} |
− | | caption = {{{caption|{{#invoke:Wikidata| | + | | caption = {{#if:{{{image|}}}|{{{caption|}}}|{{#invoke:Wikidata|getImageLegend|{{{caption|FETCH_WIKIDATA}}}}}}} |
| header1 = {{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{#if:{{{native_name|}}}{{{native_name_lang|}}}{{{birth_name|}}}{{{birthname|}}}{{{full_name|}}}{{{fullname|}}}{{{nickname|}}}{{{national_team|}}}{{{nationality|}}}{{{ethnicity|}}}{{{citizenship|}}}{{{birth_date|}}}{{{birth_place|}}}{{{death_date|}}}{{{death_place|}}}{{{resting_place|}}}{{{resting place|}}}{{{restingplace|}}}{{{resting_place_coordinates|}}}{{{resting place coordinates|}}}{{{restingplacecoordinates|}}}{{{monuments|}}}{{{residence|}}}{{{education|}}}{{{alma_mater|}}}{{{alma mater|}}}{{{occupation|}}}{{{years_active|}}}{{{years active|}}}{{{yearsactive|}}}{{{employer|}}}{{{agent|}}}{{{height_cm|}}}{{{height_ft|}}}{{{height_in|}}}{{{height|}}}{{{weight_kg|}}}{{{weight_lb|}}}{{{weight_st|}}}{{{weight|}}}{{{spouse|}}}{{{life_partner|}}}{{{other_interests|}}}{{{other-interests|}}}{{{website|}}}{{#Property:P1449}}{{#Property:P19}}{{#Property:P569}}{{#Property:P2048}}{{#Property:P2067}}|{{Infobox|child=yes|decat=yes | | header1 = {{#ifeq:{{{child|{{{embed|}}}}}}|yes||{{#if:{{{native_name|}}}{{{native_name_lang|}}}{{{birth_name|}}}{{{birthname|}}}{{{full_name|}}}{{{fullname|}}}{{{nickname|}}}{{{national_team|}}}{{{nationality|}}}{{{ethnicity|}}}{{{citizenship|}}}{{{birth_date|}}}{{{birth_place|}}}{{{death_date|}}}{{{death_place|}}}{{{resting_place|}}}{{{resting place|}}}{{{restingplace|}}}{{{resting_place_coordinates|}}}{{{resting place coordinates|}}}{{{restingplacecoordinates|}}}{{{monuments|}}}{{{residence|}}}{{{education|}}}{{{alma_mater|}}}{{{alma mater|}}}{{{occupation|}}}{{{years_active|}}}{{{years active|}}}{{{yearsactive|}}}{{{employer|}}}{{{agent|}}}{{{height_cm|}}}{{{height_ft|}}}{{{height_in|}}}{{{height|}}}{{{weight_kg|}}}{{{weight_lb|}}}{{{weight_st|}}}{{{weight|}}}{{{spouse|}}}{{{life_partner|}}}{{{other_interests|}}}{{{other-interests|}}}{{{website|}}}{{#Property:P1449}}{{#Property:P19}}{{#Property:P569}}{{#Property:P2048}}{{#Property:P2067}}|{{Infobox|child=yes|decat=yes | ||
Line 22: | Line 22: | ||
| class3 = nickname | | class3 = nickname | ||
| label4 = Nickname(s) | | label4 = Nickname(s) | ||
− | | data4 = {{#invoke: | + | | data4 = {{#invoke:WikidataIB | getValue | rank=best |P1449 |name=nickname |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{nickname|}}} }} |
| class4 = nickname | | class4 = nickname | ||
| label5 = {{#if:{{{national_team|}}}|National team|Nationality}} | | label5 = {{#if:{{{national_team|}}}|National team|Nationality}} | ||
Line 28: | Line 28: | ||
| class5 = category | | class5 = category | ||
| label6 = Ethnicity | | label6 = Ethnicity | ||
− | | data6 = {{#invoke: | + | | data6 = {{#invoke:WikidataIB | getValue | rank=best |P172 |name=ethnicity |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{ethnicity|}}} }} |
| class6 = category | | class6 = category | ||
| label7 = Citizenship | | label7 = Citizenship | ||
− | | data7 = {{#invoke: | + | | data7 = {{#invoke:WikidataIB | getValue | rank=best |P27 |name=citizenship |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{citizenship|}}} }} |
| class7 = category | | class7 = category | ||
| label8 = Born | | label8 = Born | ||
| data8 = {{br separated entries | | data8 = {{br separated entries | ||
− | + | |1={{#if:{{{birth_date|}}}|{{{birth_date|}}}|{{#invoke:WikidataIB | getValue | rank=best |P569 |name=birth_date |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}}|{{{birth_date|}}} |df={{{dateformat|dmy}}} }} {{#if:{{{birth_date|}}}||{{#if:{{#invoke:WikidataIB | getValue | rank=best |P570 |name=death_date |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{death_date|}}} | df={{{dateformat|dmy}}} }}|| {{#if:{{#invoke:WikidataIB | getValue | rank=best |P569 |name=death_date |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{death_date|}}} | df={{{dateformat|dmy}}} }}|{{#ifexpr:{{str len|{{wikidata|property||{{{qid|}}}|P569}}}}>4|(age {{#expr: trunc ({{#time: Y.md}}-{{#time: Y.md|{{#titleparts:{{wikidata|property|raw|{{{qid|}}}|P569}}|1}}}})}})}}}}}}{{#ifeq:{{{refs|no}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P569}} }} }} }} | |
− | + | |2={{if then show |1={{#invoke:WikidataIB | getValue | rank=best |P19 |qual=P17 |name=birth_place |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} | {{{birth_place|}}} }} |2=|3=<span class="birthplace"> |4=</span>}} | |
− | + | }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| label9 = Died | | label9 = Died | ||
| data9 = {{br separated entries | | data9 = {{br separated entries | ||
− | + | |1={{#if:{{#invoke:WikidataIB | getValue | rank=best |P570 |name=death_date |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{death_date|}}} | df={{{dateformat|dmy}}} }}|{{#if:{{{death_date|}}}|{{{death_date|}}}|{{#invoke:WikidataIB | getValue | rank=best |P570 |name=death_date |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{death_date|}}} | df={{{dateformat|}}} }} {{#if:{{{death_date|}}}||{{#if:{{#invoke:WikidataIB | getValue | rank=best |P569 |name=birth_date |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{birth_date|}}} | df={{{dateformat|dmy}}} }}|{{#ifexpr:{{str len|{{wikidata|property||{{{qid|}}}|P570}}}}>4|{{#ifexpr:{{str len|{{wikidata|property||{{{qid|}}}|P569}}}}>4|(aged {{#expr: trunc ({{#time: Y.md|{{#titleparts:{{wikidata|property|raw|{{{qid|}}}|P570}}|1}} }}-{{#time: Y.md|{{#titleparts:{{wikidata|property|raw|{{{qid|}}}|P569}}|1}} }})}})}}}}}}}}}} {{#ifeq:{{{refs|no}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P570}} }}}} | |
− | + | |2=<!--{{#if:{{#invoke:WikidataIB | getValue | rank=best |P509 |name=death_cause |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{death_cause|}}} }}|<span class="deathcause">From {{#invoke:WikidataIB | getValue | rank=best |P509 |name=death_cause |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{death_cause|}}} }}</span>}}--> | |
− | + | |3={{if then show |1={{#invoke:WikidataIB | getValue | rank=best |P20 |qual=P17 |name=death_place |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} | {{{death_place|}}} }} |2=|3=<span class="deathplace"> |4=</span>}} | |
− | + | }} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| label10 = Resting place | | label10 = Resting place | ||
| data10 = {{br separated entries|{{{resting_place|{{{resting place|{{{restingplace|}}}}}}}}}|{{{resting_place_coordinates|{{{resting place coordinates|{{{restingplacecoordinates|}}}}}}}}}}} | | data10 = {{br separated entries|{{{resting_place|{{{resting place|{{{restingplace|}}}}}}}}}|{{{resting_place_coordinates|{{{resting place coordinates|{{{restingplacecoordinates|}}}}}}}}}}} | ||
Line 63: | Line 50: | ||
| data11 = {{{monuments|}}} | | data11 = {{{monuments|}}} | ||
| label12 = Residence | | label12 = Residence | ||
− | | data12 = {{#invoke: | + | | data12 = {{#invoke:WikidataIB | getValue | rank=best |P551 |name=residence |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{residence|}}} }} |
| label13 = Education | | label13 = Education | ||
| data13 = {{{education|}}} | | data13 = {{{education|}}} | ||
| label14 = ''[[Alma mater]]'' | | label14 = ''[[Alma mater]]'' | ||
− | | data14 = {{#invoke: | + | | data14 = {{#invoke:WikidataIB | getValue | rank=best |P69 |name=almamater |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{alma_mater|{{{alma mater||}}}}}} }} |
| label15 = Occupation | | label15 = Occupation | ||
− | | data15 = {{#invoke: | + | | data15 = {{#invoke:WikidataIB | getValue | rank=best |P106 |name=occupation |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{occupation|}}} }} |
| class15 = role | | class15 = role | ||
| label16 = Years active | | label16 = Years active | ||
| data16 = {{{years_active|{{{years active|{{{yearsactive|}}}}}}}}} | | data16 = {{{years_active|{{{years active|{{{yearsactive|}}}}}}}}} | ||
| label17 = Employer | | label17 = Employer | ||
− | | data17 = {{#invoke: | + | | data17 = {{#invoke:WikidataIB | getValue | rank=best |P108 |name=employer |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{employer|}}} }} |
| class17 = org | | class17 = org | ||
| label18 = Agent | | label18 = Agent | ||
− | | data18 = {{#invoke: | + | | data18 = {{#invoke:WikidataIB | getValue | rank=best |P1875 |name=agent |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{agent|}}} }} |
| class18 = agent | | class18 = agent | ||
| label19 = Height | | label19 = Height | ||
Line 86: | Line 73: | ||
<!-- {{convinfobox|{{{weight_kg|}}}|kg|{{{weight_st|}}}|st|{{{weight_lb|}}}|lb|{{#if:{{{weight_kg|}}}|0}}}}{{#if:{{{weight|}}}|{{infobox person/weight|{{{weight}}}}}}} --> | <!-- {{convinfobox|{{{weight_kg|}}}|kg|{{{weight_st|}}}|st|{{{weight_lb|}}}|lb|{{#if:{{{weight_kg|}}}|0}}}}{{#if:{{{weight|}}}|{{infobox person/weight|{{{weight}}}}}}} --> | ||
| label21 = Spouse(s) | | label21 = Spouse(s) | ||
− | | data21 = {{#invoke: | + | | data21 = {{#invoke:WikidataIB | getValue | rank=best |P26 |name=spouse |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{spouse|}}} }} |
| label22 = [[Life partner|Life partner(s)]] | | label22 = [[Life partner|Life partner(s)]] | ||
− | | data22 = {{#invoke: | + | | data22 = {{#invoke:WikidataIB | getValue | rank=best |P451 |name=life_partner |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{life_partner|}}} }} |
| label23 = Other interests | | label23 = Other interests | ||
| data23 = {{{other_interests|{{{other-interests|}}}}}} | | data23 = {{{other_interests|{{{other-interests|}}}}}} | ||
| label24 = Website | | label24 = Website | ||
− | | data24 = {{#invoke: | + | | data24 = {{if empty | {{#invoke:WikidataIB | getValue | rank=best |P856 |name=website |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |onlysourced=no |noicon={{{noicon|}}} | {{{website|{{{homepage|}}}}}} }} | {{#invoke:WikidataIB | getValue | rank=best |P1581 |name=blog |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |onlysourced={{{onlysourced|no}}} |noicon={{{noicon|}}} }} }} |
+ | |||
+ | |||
}}}}}} | }}}}}} | ||
Line 101: | Line 90: | ||
| data4 = {{{country|}}} | | data4 = {{{country|}}} | ||
| label5 = Sport | | label5 = Sport | ||
− | | data5 = {{#invoke: | + | | data5 = {{#invoke:WikidataIB | getValue | rank=best |P641 |name=sport |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{sport|}}} }} |
| label6 = Discipline | | label6 = Discipline | ||
− | | data6 = {{#invoke: | + | | data6 = {{#invoke:WikidataIB | getValue | rank=best |P2416 |name=discipline |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{discipline|}}} }} |
| label7 = Position | | label7 = Position | ||
| data7 = {{{position|}}} | | data7 = {{{position|}}} | ||
Line 126: | Line 115: | ||
| class16 = org | | class16 = org | ||
| label17 = Club | | label17 = Club | ||
− | | data17 = {{#invoke: | + | | data17 = {{#invoke:WikidataIB | getValue | rank=best |P54 |name=club |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{club|}}} }} |
| class17 = org | | class17 = org | ||
| label18 = Team | | label18 = Team | ||
Line 138: | Line 127: | ||
| data21 = {{{former_partner|{{{formerpartner|}}}}}} | | data21 = {{{former_partner|{{{formerpartner|}}}}}} | ||
| label22 = Coached by | | label22 = Coached by | ||
− | | data22 = {{#invoke: | + | | data22 = {{#invoke:WikidataIB | getValue | rank=best |P286 |name=coach |qid={{{qid|}}} |suppressfields={{{suppressfields|}}} |fetchwikidata={{{fetchwikidata|ALL}}} |noicon={{{noicon|}}} |{{{coach|}}} }} |
| class22 = agent | | class22 = agent | ||
| label23 = Retired | | label23 = Retired | ||
Line 175: | Line 164: | ||
| belowstyle = color:darkslategray; | | belowstyle = color:darkslategray; | ||
− | | below = | + | | below = {{EditOnWikidata|noicon={{{noicon|false}}}}}{{#if:{{{updated|}}}|<br />Updated on {{{updated}}}.}} |
}}<includeonly>{{#if:{{{textcolor|}}}|[[Category:Pages using infobox sportsperson with textcolor]] | }}<includeonly>{{#if:{{{textcolor|}}}|[[Category:Pages using infobox sportsperson with textcolor]] | ||
}}{{#if:{{{module2|{{{misc2|}}}}}}|[[Category:Pages using infobox sportsperson with module2 parameter]] | }}{{#if:{{{module2|{{{misc2|}}}}}}|[[Category:Pages using infobox sportsperson with module2 parameter]] | ||
Line 182: | Line 171: | ||
| unknown = {{main other|[[Category:Pages using Infobox sportsperson with unknown parameters|_VALUE_{{PAGENAME}}]]}} | | unknown = {{main other|[[Category:Pages using Infobox sportsperson with unknown parameters|_VALUE_{{PAGENAME}}]]}} | ||
| preview = Page using [[Template:Infobox sportsperson]] with unknown parameter "_VALUE_" | | preview = Page using [[Template:Infobox sportsperson]] with unknown parameter "_VALUE_" | ||
− | | child | embed | headercolor | textcolor | honorific_prefix | honorific prefix | name | honorific_suffix | honorific suffix | image | image_size | imagesize | alt | caption | native_name | native_name_lang | birth_name | birthname | full_name | fullname | nickname | national_team | nationality | ethnicity | citizenship | birth_date | birth_place | death_date | death_place | resting_place | resting place | restingplace | resting_place_coordinates | resting place coordinates | restingplacecoordinates | monuments | residence | education | alma_mater | alma mater | occupation | years_active | years active | yearsactive | employer | agent | height_cm | height_ft | height_in | height | weight_kg | weight_lb | weight_st | weight | spouse | life_partner | other_interests | other-interests | website | module | misc | country | sport | position | shoots | catches | disability | disability_class | weight_class | rank | event | universityteam | collegeteam | league | club | team | turnedpro | partner | former_partner | formerpartner | coach | retired | coaching | weight_class_type | event_type | league_type | turnedpro_type | module2 | misc2 | worlds | regionals | nationals | olympics | paralympics | commonwealth | highestranking | pb | medaltemplates-title | medaltemplates | show-medals | module3 | misc3 | updated | + | | child | embed | headercolor | textcolor | honorific_prefix | honorific prefix | name | honorific_suffix | honorific suffix | image | image_size | imagesize | alt | caption | native_name | native_name_lang | birth_name | birthname | full_name | fullname | nickname | national_team | nationality | ethnicity | citizenship | birth_date | birth_place | death_date | death_place | resting_place | resting place | restingplace | resting_place_coordinates | resting place coordinates | restingplacecoordinates | monuments | residence | education | alma_mater | alma mater | occupation | years_active | years active | yearsactive | employer | agent | height_cm | height_ft | height_in | height | weight_kg | weight_lb | weight_st | weight | spouse | life_partner | other_interests | other-interests | website | module | misc | country | sport | position | shoots | catches | disability | disability_class | weight_class | rank | event | universityteam | collegeteam | league | club | team | turnedpro | partner | former_partner | formerpartner | coach | retired | coaching | weight_class_type | event_type | league_type | turnedpro_type | module2 | misc2 | worlds | regionals | nationals | olympics | paralympics | commonwealth | highestranking | pb | medaltemplates-title | medaltemplates | show-medals | module3 | misc3 | updated | fetchwikidata |
}}<noinclude> | }}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
<!--PLEASE PUT CATEGORIES IN [[Template:Infobox Sportsperson/doc]].--> | <!--PLEASE PUT CATEGORIES IN [[Template:Infobox Sportsperson/doc]].--> | ||
</noinclude> | </noinclude> |
Revision as of 12:51, 28 September 2019
Personal information | |
---|---|
Website | Script error: No such module "If empty". |
Sport |
Template:Person infobox header
![]() | This template uses Lua: |
Usage
This is a copy of Template:Infobox sportsperson that is wikidataified. Please use as:
{{Infobox sportsperson/Wikidata}}
It will hopefully be merged with Template:Infobox sportsperson at some point.
See also
The above documentation is transcluded from Template:Infobox sportsperson/Wikidata/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |