Template:Infobox character: Difference between revisions

m (fix pipes)
(Fixed ifs)
Line 9: Line 9:


{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
{{!}}image        = [[File:{{{image}}}|{{#if:{{{size|}}}|{{{size|}}}|170px}}|center|{{{caption}}}]]
|image        = [[File:{{{image}}}|{{#if:{{{size|}}}|{{{size|}}}|170px}}|center|{{{caption}}}]]
{{!}}imagestyle  = {{{imagestyle|}}}
|imagestyle  = {{{imagestyle|}}}
{{#if:{{{caption|}}}|
{{#if:{{{caption|}}}|
{{!}}caption      = {{{caption|}}}
|caption      = {{{caption|}}}
{{!}}captionstyle = {{{captionstyle|}}}
|captionstyle = {{{captionstyle|}}}
}}}}
}}}}


Line 22: Line 22:
|header1 =  
|header1 =  


{{#if: {{{games|}}}|
|label1  = Appearances
{{!}}label1  = Appearances
|data1  = {{#if: {{{game|1|}}}|
{{!}}data1  = {{{games|}}}
[[Appearance::{{{game_1|}}}]]{{#if: {{{game_2|}}}|
|
{{#if: {{{game|1|}}}|
{{!}}label1  = Appearances
{{!}}data1  = [[Appearance::{{{game_1|}}}]]{{#if: {{{game_2|}}}|
<br />[[Appearance::{{{game_2|}}}]]}}{{#if: {{{game_3|}}}|
<br />[[Appearance::{{{game_2|}}}]]}}{{#if: {{{game_3|}}}|
<br />[[Appearance::{{{game_3|}}}]]}}{{#if: {{{game_4|}}}|
<br />[[Appearance::{{{game_3|}}}]]}}{{#if: {{{game_4|}}}|
Line 35: Line 31:
<br />[[Appearance::{{{game_6|}}}]]}}{{#if: {{{game_7|}}}|
<br />[[Appearance::{{{game_6|}}}]]}}{{#if: {{{game_7|}}}|
<br />[[Appearance::{{{game_7|}}}]]}}
<br />[[Appearance::{{{game_7|}}}]]}}
}}}}
}}
|
{{{games|}}}
}}
 
|label2  = Full Name
|data2  = {{{name|}}}


|label3  = {{abbr|Aliases|Permanent nicknames or alternative names, not one-off, affectionate or abusive names}}
|data3  = {{{aka|}}}


{{#if: {{{name|}}}|
{{!}}label2  = Full Name
{{!}}data2  = {{{name|}}}
}}


{{#if: {{{aka|}}}|
|label4  = Status
{{!}}label3  = {{abbr|Aliases|Permanent nicknames or alternative names, not one-off, affectionate or abusive names}}
|data4  = {{#if: {{{status|}}}|{[[Status::{{{status|}}}]]}}
{{!}}data3  = {{{aka|}}}
}}


{{#if: {{{status|}}}|
{{!}}label4  = Status
{{!}}data4  = {[[Status::{{{status|}}}]]
}}


{{#if: {{{gender|}}}|
|label5  = Gender
{{!}}label5  = Gender
|data5  = {{#if: {{{gender|}}}|[[Gender::{{#switch: {{{gender|}}}
{{!}}data5  = [[Gender::{{#switch: {{{gender|}}}
  | M = Male
  | M = Male
  | m = Male
  | m = Male
Line 71: Line 64:
}}
}}


{{#if: {{{dob|}}}|
 
{{!}}label6  = Date of Birth
|label6  = Date of Birth
{{!}}data6  = [[{{#time: Y |{{{dob|}}}}}|{{{dob}}}]][[DOB::{{{dob|}}}| ]] {{{dob-comment|}}}
|data6  = {{#if: {{{dob|}}}|[[{{#time: Y |{{{dob|}}}}}|{{{dob}}}]][[DOB::{{{dob|}}}| ]] {{{dob-comment|}}}
}}
}}


{{#if: {{{pob|}}}|
|label7  = Place of Birth
{{!}}label7  = Place of Birth
|data7  = {{{pob|}}}
{{!}}data7  = {{{pob|}}}
 
}}


{{#if: {{dod}}|
|label8  = Date of Death
{{!}}label8  = Date of Death
|data8  = |[[{{#time: Y |{{{dod|}}}}}|{{{dod}}}]][[DOD::{{{dod|}}}| ]] {{{dod-comment|}}}}}
{{!}}data8  = [[{{#time: Y |{{{dod|}}}}}|{{{dod}}}]][[DOD::{{{dod|}}}| ]] {{{dod-comment|}}}


|label9  = Age at Death
|data9  =
{{#if: {{dod|}}|
{{#if: {{{dob|}}}|
{{#if: {{{dob|}}}|
{{#iferror:{{#time: Y |{{{dod|abc}}}}} | <!-- dod error --> | {{#iferror:{{#time: Y |{{{dob|abc}}}}} | <!-- dob error in dod --> |  
{{#iferror:{{#time: Y |{{{dod|abc}}}}} | <!-- dod error --> | {{#iferror:{{#time: Y |{{{dob|abc}}}}} | <!-- dob error in dod --> |  
{{#expr: {{#time: Y |{{{dod}}}}} - {{#time: Y |{{{dob}}} }} }} }} }} }} }}


{{!}}label9 = Age at Death
 
{{!}}data9   = {{#expr: {{#time: Y |{{{dod}}}}} - {{#time: Y |{{{dob}}} }} }} }}}}}}
|label10 = Age Now
|
|data10   =  
{{#if: {{{dob|}}}|
{{#if: {{{dob|}}}|  
{{#if: {{dod|}}||
{{#iferror:{{#time: Y |{{{dob|abc}}}}} | <!-- dob error --> |
{{#iferror:{{#time: Y |{{{dob|abc}}}}} | <!-- dob error --> |
{{!}}label9  = Age Now
{{age|{{#time: Y |{{{dob}}} }} }} }} }} }} }}
{{!}}data9  = {{age|{{#time: Y |{{{dob}}} }} }} }} }} }}


{{#if: {{{home|}}}|
|label11  = Nationality
{{!}}label10 = Home
|data11  = {{#if: {{{nationality|}}}|[[{{Country|{{{nationality}}}}}|{{Nationality|{{{nationality}}}}}]][[Nationality::{{nationality|{{{nationality|}}}}}| ]]}}
{{!}}data10   = {{{home|}}}
 
}}
|label12 = Home
|data12   = {{{home|}}}


{{#if: {{{nationality|}}}|
{{!}}label11  = Nationality
{{!}}data11  = [[{{Country|{{{nationality}}}}}|{{Nationality|{{{nationality}}}}}]][[Nationality::{{nationality|{{{nationality|}}}}}| ]]
}}


{{#if: {{{family|}}}|
|label13 = Family
{{!}}label12 = Family
|data13   = {{{family|}}}
{{!}}data12   = {{{family|}}}
}}


{{#if: {{{affiliations|}}}|
|label14 = Main Affiliations
{{!}}label13 = Main Affiliations
|data15   = {{{affiliations|}}}
{{!}}data13   = {{{affiliations|}}}
}}


{{#if: {{{vehicles|}}}|
|label15 = Vehicles
{{!}}label14 = Vehicles
|data15   = {{{vehicles|}}}
{{!}}data14   = {{{vehicles|}}}
}}


{{#if: {{{businesses|}}}|
|label16 = Businesses
{{!}}label15 = Businesses
|data16   = {{{businesses|}}}
{{!}}data15   = {{{businesses|}}}
}}


{{#if: {{{voice|}}}|
|label17 = Voiced by
{{!}}label16 = Voiced by
|data17   = {{{voice|}}}
{{!}}data16   = {{{voice|}}}
}}


}}</includeonly><noinclude>
}}</includeonly><noinclude>

Revision as of 17:44, 2 June 2012


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 =
}}