Template:Infobox character: Difference between revisions

No edit summary
m (Removing broken semantic mediawiki reference for images)
 
(72 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>{| class="infobox" style="width:22em; font-size:90%; text-align:left; border-color:#A88; background-color: #CAA;" cellspacing="2"
<includeonly>{{infobox
{{pipe}}- style="margin:0;"
| name        =  
!colspan="2" style="text-align: center;"{{pipe}}<small>CHARACTER</small><br /><span class="fn" style="font-size:18px;">{{{name|{{PAGENAME}}}}}</span>
| bodystyle    = background-color: #F0F0FA;
{{#if:{{{image|}}}|
| title        = <div style="float:right; width:27px; font-size:10px;">[[Special:FormEdit/Character/{{PAGENAMEE}}{{#ifexist: {{PAGENAMEE}}/infobox | /infobox}}|edit]]</div><div style="margin-left:32px;">Character</div>
{{pipe}}-
| titlestyle  = font-size: 90%;
{{pipe}} colspan="2" align="center"{{pipe}}[[Image:{{{image}}}|{{#if:{{{size|}}}|{{{size|}}}|170px}}|center]]{{#if:{{{caption|}}}|<div style="line-height:1.25em;">{{{caption}}}</div>|}}|
text-transform: uppercase;
{{pipe}}-
background-color: #EEE;
border: 1px solid #AAA;
border-bottom: none;  
| above = {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}
| abovestyle = font-size: 150%;
 
| image        = {{#if:{{{image|}}}|[[File:{{{image}}}|{{#if:{{{size|}}}|{{{size|}}}|170px}}|center|{{{caption}}}]]<!--[[Image::File:{{{image}}}| ]]-->}}
| imagestyle  = {{{imagestyle|}}}
| caption      = {{{caption|}}}
| captionstyle = {{{captionstyle|}}}
 
| headerstyle  = background:#444; color: #fff;
| labelstyle  = background:#ddd;
| datastyle    =
 
| header1 =
 
| label1  = Appearances
| data1  = {{gameselect|{{{game_1|}}}|{{{game_2|}}}|{{{game_3|}}}|{{{game_4|}}}|{{{game_5|}}}|{{{game_6|}}}|{{{game_7|}}}|{{{game_8|}}}|{{{game_9|}}}|{{{game_10|}}}|{{{game_11|}}}|{{{game_12|}}}|{{{game_13|}}}|{{{game_14|}}}|{{{game_15|}}}|{{{game_16|}}}|{{{game_17|}}}|{{{game_18|}}}|{{{game_19|}}}|{{{game_20|}}}}}{{#IF: {{{games|}}} |[[Category:Fix Games]] [[Appearance::{{game|{{{games|}}}}}]]}}{{#IF: {{{game_1|}}} |  | [[Category:Fix Games]]}}{{#IF: {{{games|}}} | [[Category:Fix Games]]}}
 
| label2  = Full Name
| data2  = {{{name|}}}
 
| label3  = {{abbr|Aliases|Permanent nicknames or alternative names, not one-off, affectionate, or abusive names}}
| data3  = {{{aka|}}}
 
| label4  = Status
| data4  = {{#if: {{{status|}}}|
{{#if: {{{status-link|}}}|
[[{{{status-link|}}}|{{#switch: {{lc:{{{status|}}}}}
| alive = Alive
| dead = Deceased
| deceased = Deceased
| died = Deceased
| {{{status|}}}[[Category:Fix status]]
}}]]
|
{{#switch: {{lc:{{{status|}}}}}
| alive = Alive
| dead = Deceased
| deceased = Deceased
| died = Deceased
| {{{status|}}}[[Category:Fix status]]
}}
}}
{{pipe}}- valign="top"
!
{{#if: {{{games|}}}|
{{pipe}}-
!style="text-align:right;"{{pipe}}Appearance(s):
{{pipe}}{{{games|}}}|
{{pipe}}-
}}
}}
{{#if: {{{name|}}}|
[[Status::{{#switch: {{lc:{{{status|}}}}}
{{pipe}}-
| alive = Alive
!style="text-align:right;"{{pipe}}Full name:
| dead = Deceased
{{pipe}}{{{name|}}}|
| deceased = Deceased
{{pipe}}-
| died = Deceased
| {{{status|}}}[[Category:Fix status]]
}}| ]]}}
 
|label5  = Gender
|data5  = {{#if: {{{gender|}}}|[[Gender::{{#switch: {{lc:{{{gender|}}}}}
| m = Male
| male = Male
| boy = Male
| man = Male
| f = Female
| female = Female
| girl = Female
| [[Category: Fix Gender]]
}}]]
}}
}}
{{#if: {{{aka|}}}|
 
{{pipe}}-
| label6  = Date of Birth
!style="text-align:right;"{{pipe}}{{abbr|Alias(es)|Permanent nicknames or alternative names, not one-off affectionate or abusive names}}
| data6  = {{#if: {{{dob|}}}|[[{{#time: Y |{{{dob|}}}}}|{{{dob}}}]][[DOB::{{{dob|}}}| ]] {{{dob-comment|}}}
{{pipe}}{{{aka|}}}|
{{pipe}}-
}}
}}
{{#if: {{{status|}}}|
 
{{pipe}}-
| label7  = Place of Birth
!style="text-align:right;"{{pipe}}Status:
| data7  = {{{pob|}}}
{{pipe}}{{{status|}}}|
 
{{pipe}}-
| label8  = Date of Death
}}
| data8  = {{#if: {{{dod|}}}|[[{{#time: Y |{{{dod|}}}}}|{{{dod}}}]][[DOD::{{{dod|}}}| ]] {{{dod-comment|}}}}}
{{#if: {{{gender|}}}|
 
{{pipe}}-
| label9  = Age at Death
!style="text-align:right;"{{pipe}}Gender:
| data9  =
{{pipe}}
{{#if: {{{dod|}}}|
{{#if: {{#ifeq: {{{gender|}}}|M|M}}|Male|{{#if: {{#ifeq: {{{gender|}}}|F|F}}|Female}}|}}}}
{{#if: {{{dob|}}}|
{{#if: {{{dob|}}}|
{{pipe}}-
{{#iferror:{{#time: Y |{{{dod|abc}}}}} | <!-- dod error -->[[Category:Fix dod]] | {{#iferror:{{#time: Y |{{{dob|abc}}}}} | <!-- dob error in dod -->[[Category:Fix dob]] |
!style="text-align:right;"{{pipe}}Date of birth:
{{#expr: {{#time: Y |{{{dod}}}}} - {{#time: Y |{{{dob}}} }} }} }} }} }} }}
{{pipe}}{{{dob|}}}|
 
{{pipe}}-
| label10  = Age Now
}}
| data10  =
{{#if: {{{pob|}}}|
{{#if: {{{dob|}}}|  
{{pipe}}-
{{#if: {{{dod|}}}|{{blank}}|
!style="text-align:right;"{{pipe}}Place of birth:
{{#iferror:{{#time: Y |{{{dob|abc}}}}} | <!-- dob error -->[[Category:Fix dob]] |
{{pipe}}{{{pob|}}}|
{{age|{{#time: Y |{{{dob}}} }} }} }} }} }}
{{pipe}}-
 
}}
| label11  = Nationality
{{#if: {{{dod|}}}|
| data11  = {{#if: {{{nationality|}}}|[[{{Country|{{{nationality}}}}}|{{Nationality|{{{nationality}}}}}]][[Nationality::{{country|{{{nationality|}}}}}| ]]}}
{{pipe}}-
 
!style="text-align:right;"{{pipe}}Date of death:
| label12  = Home
{{pipe}}{{{dod|}}}|
| data12  = {{{home|}}}
{{pipe}}-
 
}}
| label13  = Family
{{#if: {{{home|}}}|
| data13  = {{{family|}}}
{{pipe}}-
 
!style="text-align:right;"{{pipe}}Home:
| label14  = Main Affiliations
{{pipe}}{{{home|}}}|
| data14  = {{{affiliations|}}}
{{pipe}}-
 
}}
| label15  = Vehicles
{{#if: {{{nationality|}}}|
| data15  = {{{vehicles|}}}
{{pipe}}-
 
!style="text-align:right;"{{pipe}}Nationality:
| label16  = Businesses
{{pipe}}{{{nationality|}}}|
| data16  = {{{businesses|}}}
{{pipe}}-
 
}}
| label17  = Occupation
{{#if: {{{family|}}}|
| data17  = {{{occupation|}}}
{{pipe}}-
 
!style="text-align:right;"{{pipe}}Family:
| label18  = Voiced by
{{pipe}}{{{family|}}}|
| data18  = {{{voice|}}}
{{pipe}}-
 
}}
| label19  = Lifeinvader page
{{#if: {{{affiliations|}}}|
| data19  = {{{lifeinvader|}}}
{{pipe}}-
 
!style="text-align:right;"{{pipe}}Main affiliation:
}}[[Type::Character| ]]</includeonly><noinclude>
{{pipe}}{{{affiliations|}}}|
 
{{pipe}}-
{{doc}}
}}
{{#if: {{{vehicles|}}}|
{{pipe}}-
!style="text-align:right;"{{pipe}}Vehicle(s):
{{pipe}}{{{vehicles|}}}|
{{pipe}}-
}}
{{#if: {{{businesses|}}}|
{{pipe}}-
!style="text-align:right;"{{pipe}}Businesses:
{{pipe}}{{{businesses|}}}|
{{pipe}}-
}}
{{#if: {{{voice|}}}|
{{pipe}}-
!style="text-align:right;"{{pipe}}Voiced by:
{{pipe}}{{{voice|}}}|
{{pipe}}-
}}
|}</includeonly><noinclude>
{{infobox character|
}}
The following code produces the fake infobox shown on the right:
<pre>{{infobox character|
|image =
|games =
|name =
|aka =
|status =
|gender =
|dob =
|pob =
|dod =
|home =
|nationality =
|family =
|affiliations =
|vehicles =
|businesses =
|voice =
}}</pre>


[[Category:Infobox Templates|{{PAGENAME}}]]</noinclude>
[[Category:Infobox Templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 22:31, 18 July 2017


This documentation is imported from Template:Infobox character/doc

This infobox should be used on ALL character pages, to display a table.

To add this template to a page, simply use Form:Character

This is a semantic template - the values for dob, dod and gender are Properties which can be searched for and filtered onto pages.

For this reason, it is important that those values are correctly set - using a date (or just a year) or M/F. Do not add links, other text (such as an age) or anything else to those properties.

These are the variables for this infobox:

{{infobox character|
|image = Image.jpg (DO NOT use [[image code]] or add the File: prefix)
|game_1 = GTA San Andreas DO NOT USE LINKS
|game_2 = GTA Vice City
|game_10 = Maximum of 10 games
|games = DO NOT USE THIS. Use game_1 to game_10 above.
|name = Use this where the characters name is not the page name
|aka = MAJOR alternative names only (not just nicknames) like [[Sweet]] being Sean Johnson
|status = Alive or Deceased
|gender = M or F
|dob = date or year
|dob-comment = A comment that goes after the date of birth such as: (estimated)
|pob =
|dod = date or year
|dod-comment = A comment after the date of death
|home = 
|nationality = south africa (just write the country name)
|family =
|affiliations = 
|vehicles = 
|businesses =
|voice =
}}