Template:Character Data: Difference between revisions
More languages
More actions
No edit summary Tags: Manual revert 2017 source edit |
No edit summary Tags: Reverted 2017 source edit |
||
| Line 1: | Line 1: | ||
<includeonly>{| class="infobox" cellspacing="5" | <includeonly>{| class="infobox character-infobox" cellspacing="5" | ||
|-class="infoboxheader" | |-class="infoboxheader" | ||
| colspan="2"| | | colspan="2"| | ||
{| | {| | ||
|- style="text-align: left; font-size: larger;" cellpadding="0" cellspacing="0" width="100%" | |- style="text-align: left; font-size: larger;" cellpadding="0" cellspacing="0" width="100%" | ||
| width="27" | {{Series Icon|series={{{series|}}}}} | | width="27" | {{#ifexist:Template:Series Icon|{{Series Icon|series={{{series|}}}}}|<span class="series-icon-placeholder">{{#if:{{{series|}}}|{{{series}}}|}}</span>}} | ||
| width="{{#if:{{{series 2|}}}|27|0}}" | {{#if:{{{series 2|}}}|{{Series Icon|series={{{series 2|}}}}}|< | | width="{{#if:{{{series 2|}}}|27|0}}" | {{#if:{{{series 2|}}}|{{#ifexist:Template:Series Icon|{{Series Icon|series={{{series 2|}}}}}|<span class="series-icon-placeholder">{{{series 2}}}</span>}}|}} | ||
| width="{{#if:{{{series 3|}}}|27|0}}" | {{#if:{{{series 3|}}}|{{Series Icon|series={{{series 3|}}}}}|< | | width="{{#if:{{{series 3|}}}|27|0}}" | {{#if:{{{series 3|}}}|{{#ifexist:Template:Series Icon|{{Series Icon|series={{{series 3|}}}}}|<span class="series-icon-placeholder">{{{series 3}}}</span>}}|}} | ||
| style="text-align: center;" width="95%" | '''{{{title|{{PAGENAME}}}}}''' | | style="text-align: center;" width="95%" | '''{{{title|{{PAGENAME}}}}}''' | ||
|} | |} | ||
|- | |- | ||
{{#if:{{{photo|}}}| | |||
| colspan="2" style="text-align: center;" | [[File:{{{photo | |- class="character-photo" | ||
| | | colspan="2" style="text-align: center;" | [[File:{{{photo}}}|300px|alt={{{title|{{PAGENAME}}}}}|{{{title|{{PAGENAME}}}}}]]{{#if:{{{caption|}}}|<br/><small>{{{caption}}}</small>|}} | ||
| colspan="2" style="text-align:center;" | <span class="mw-customtoggle-infobox" style="color: var(--color-link);">[show/hide spoilers]</span><br/><small>Spoilers hidden in infobox by default only.</small> | |}} | ||
|- style="vertical-align: top; text-align: left; | {{#if:{{{spoilers|}}}| | ||
|- | |||
| colspan="2" style="text-align:center;" | <div class="spoiler-toggle-container"><span class="mw-customtoggle-infobox spoiler-toggle" style="color: var(--color-link);">[show/hide spoilers]</span><br/><small>Spoilers hidden in infobox by default only.</small></div> | |||
|}} | |||
{{#if:{{{name|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| style="white-space: nowrap;" | | | style="white-space: nowrap;" | | ||
{{#switch:{{{cylon}}} | {{#switch:{{{cylon|}}} | ||
| Y | | Y | y | Yes | yes = '''Human Name''' | ||
| y | | #default = '''Name''' | ||
| Yes | |||
| yes = '''Human Name''' | |||
| #default='''Name''' | |||
}} | }} | ||
| {{{name}}} | | {{{name}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{age|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Age''' | | '''Age''' | ||
| {{{age}}} | | {{{age}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{colony|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Colony''' | | '''Colony''' | ||
| {{{colony}}} | | {{{colony}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{birthplace|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Birth place''' | | '''Birth place''' | ||
| {{{birthplace}}} | | {{{birthplace}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{birthname|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| style="white-space: nowrap;" | '''Birth Name''' | | style="white-space: nowrap;" | '''Birth Name''' | ||
| {{{birthname}}} | | {{{birthname}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{birthdate|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| style="white-space: nowrap;" | '''Birth Date''' | | style="white-space: nowrap;" | '''Birth Date''' | ||
| {{{birthdate}}} | | {{{birthdate}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{callsign|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| '''Callsign''' | | '''Callsign''' | ||
| {{{callsign}}} | | {{{callsign}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{nickname|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| '''Nickname''' | | '''Nickname''' | ||
| {{{nickname}}} | | {{{nickname}}} | ||
| | |}} | ||
{{#if:{{{seen|}}}{{{seenref|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| style="white-space: nowrap;" |'''Introduced''' | | style="white-space: nowrap;" |'''Introduced''' | ||
| {{#if:{{{seenref|}}}|{{{seenref | | {{#if:{{{seenref|}}}|{{{seenref}}}|{{#if:{{{seen|}}}|[[{{{seen}}}{{#if:{{{pseen|}}}|{{!}}{{{pseen}}}|}}]]|}}}} | ||
| | |}} | ||
{{#if:{{{lastseen|}}}{{{lastseenref|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Last Known Appearance''' | | '''Last Known Appearance''' | ||
| {{#if:{{{lastseenref|}}}|{{{lastseenref | | {{#if:{{{lastseenref|}}}|{{{lastseenref}}}|{{#if:{{{lastseen|}}}|[[{{{lastseen}}}{{#if:{{{plastseen|}}}|{{!}}{{{plastseen}}}|}}]]|}}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{death|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Death''' | | '''Death''' | ||
| {{{death}}} | | {{{death}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{parents|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| '''Parents''' | | '''Parents''' | ||
| {{{parents}}} | | {{{parents}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{siblings|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| '''Siblings''' | | '''Siblings''' | ||
| {{{siblings}}} | | {{{siblings}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{children|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Children''' | | '''Children''' | ||
| {{{children}}} | | {{{children}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{marital status|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| style="white-space: nowrap;"|'''Marital Status''' | | style="white-space: nowrap;"|'''Marital Status''' | ||
| {{{marital status}}} | | {{{marital status}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{familytree|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| style="white-space: nowrap;"|'''Family Tree''' | | style="white-space: nowrap;"|'''Family Tree''' | ||
| [[#Family tree|View]] | | [[#Family tree|View]] | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{role|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Role''' | | '''Role''' | ||
| {{{role}}} | | {{{role}}} | ||
|- style="vertical-align: top; text-align: left;" | |}} | ||
{{#if:{{{rank|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: left;" class="spoiler-content" | |||
| | |||
|- style="vertical-align: top; text-align: left;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed" | |||
}} | |||
| '''Rank''' | | '''Rank''' | ||
| {{{rank}}} | | {{{rank}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{serial|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| '''Serial Number''' | | '''Serial Number''' | ||
| {{{serial}}} | | {{{serial}}} | ||
|- style="vertical-align: top; text-align: left; | |}} | ||
{{#if:{{{actor|}}}| | |||
|- style="vertical-align: top; text-align: left;" | |||
| style="white-space: nowrap;" |'''Portrayed by''' | | style="white-space: nowrap;" |'''Portrayed by''' | ||
| style="white-space: nowrap;" | {{{actor}}} | | style="white-space: nowrap;" | {{{actor}}} | ||
|- style="vertical-align: top; text-align: center;" | |}} | ||
{{#if:{{{cylon|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: center;" class="spoiler-content cylon-indicator" | |||
| | |||
|- style="vertical-align: top; text-align: center;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed cylon-indicator" | |||
}} | |||
| colspan="2"| {{{title|{{PAGENAME}}}}} is a [[Humanoid Cylon|Cylon]] | | colspan="2"| {{{title|{{PAGENAME}}}}} is a [[Humanoid Cylon|Cylon]] | ||
|- style="vertical-align: top; text-align: center;" | |}} | ||
{{#if:{{{5cylon|}}}| | |||
{{#if:{{{spoilers|}}}| | |||
|- style="vertical-align: top; text-align: center;" class="spoiler-content cylon-indicator" | |||
| | |||
|- style="vertical-align: top; text-align: center;" id="mw-customcollapsible-infobox" class="mw-collapsible mw-collapsed cylon-indicator" | |||
}} | |||
| colspan="2"| {{{title|{{PAGENAME}}}}} is a [[Final Five]] [[Humanoid Cylon|Cylon]] | | colspan="2"| {{{title|{{PAGENAME}}}}} is a [[Final Five]] [[Humanoid Cylon|Cylon]] | ||
|- style="vertical-align: top; text-align: center;" class=" | |}} | ||
{{#if:{{{hcylon|}}}| | |||
|- style="vertical-align: top; text-align: center;" class="cylon-indicator" | |||
| colspan="2" | {{{title|{{PAGENAME}}}}} is a [[Humanoid_Cylon#Human.2FCylon_Hybrids|Human/Cylon Hybrid]] | | colspan="2" | {{{title|{{PAGENAME}}}}} is a [[Humanoid_Cylon#Human.2FCylon_Hybrids|Human/Cylon Hybrid]] | ||
|- style="vertical-align: top; text-align: center;" class=" | |}} | ||
{{#if:{{{mcylon|}}}| | |||
|- style="vertical-align: top; text-align: center;" class="cylon-indicator" | |||
| colspan="2"| {{{title|{{PAGENAME}}}}} is an Original Series Cylon | | colspan="2"| {{{title|{{PAGENAME}}}}} is an Original Series Cylon | ||
| | |}} | ||
! class="infoboxheader" | {{#if:{{{archives|}}}{{{media|}}}| | ||
|- style="vertical-align: top; text-align: center; | |- | ||
| {{#if:{{{media|}}}| | ! class="infoboxheader" colspan="2" | Related Media | ||
{{#if:{{{archives|}}}| | |||
| | |- style="vertical-align: top; text-align: center;" | ||
! class="infoboxheader" | | {{#if:{{{media|}}}||colspan="2"}} style="white-space: nowrap;" | [[Gallery:{{PAGENAME}}|Photo Gallery]] | ||
|- style="vertical-align: top; text-align: center; | |}} | ||
| colspan="2" | {{#if:{{{media|}}}| | ||
|- style="vertical-align: top; text-align: center; | |- style="vertical-align: top; text-align: center;" | ||
| colspan="2" | | {{#if:{{{archives|}}}||colspan="2"}} style="white-space: nowrap;" | [[md:{{{media}}}|@ BW Media]] | ||
|}} | |||
| colspan="2" style="text-align: center;" | [[File:{{{photo 2 | |}} | ||
|} | {{#if:{{{sepcon|}}}{{{primecon|}}}| | ||
|- | |||
! class="infoboxheader" colspan="2" | Additional Information | |||
{{#if:{{{sepcon|}}}| | |||
|- style="vertical-align: top; text-align: center;" | |||
| colspan="2"| [[{{{sepcon title|{{{title|{{PAGENAME}}}}} {{#if:{{{series|}}}|({{{series}}} alternate)|(alternate)}}}}}|{{#if:{{{sepcon title|}}}|{{#explode:{{{sepcon title}}}|(|0}}|{{{title|{{PAGENAME}}}}}}} in the separate continuity]] | |||
|}} | |||
{{#if:{{{primecon|}}}| | |||
|- style="vertical-align: top; text-align: center;" | |||
| colspan="2"| [[{{{primecon title|{{{title|{{PAGENAME}}}}} {{#if:{{{series|}}}|({{{series}}})|}}}}}|{{#if:{{{primecon title|}}}|{{#explode:{{{primecon title}}}|(|0}}|{{{title|{{PAGENAME}}}}}}} in the primary continuity]] | |||
|}} | |||
|}} | |||
{{#if:{{{photo 2|}}}| | |||
|- class="character-photo-secondary" | |||
| colspan="2" style="text-align: center;" | [[File:{{{photo 2}}}|300px|alt={{{title|{{PAGENAME}}}}} - Additional Image|{{{title|{{PAGENAME}}}}}]]{{#if:{{{caption 2|}}}|<br/><small>{{{caption 2}}}</small>|}} | |||
|}} | |||
|} | |||
{{#if:{{{sortkey|}}}|{{DEFAULTSORT:{{{sortkey}}}}}|}}</includeonly> | |||
<noinclude> | <noinclude> | ||
= Documentation = | = Documentation = | ||
| Line 125: | Line 234: | ||
| seen= | | seen= | ||
| pseen= | | pseen= | ||
| seenref= | |||
| lastseen= | | lastseen= | ||
| plastseen= | | plastseen= | ||
| lastseenref= | |||
| death= | | death= | ||
| parents= | | parents= | ||
| Line 141: | Line 252: | ||
| hcylon= | | hcylon= | ||
| mcylon= | | mcylon= | ||
| archives= | |||
| media= | |||
| sepcon= | | sepcon= | ||
| primecon= | | primecon= | ||
| sepcon title= | |||
| primecon title= | |||
| series= | | series= | ||
| series 2= | |||
| series 3= | |||
| name= | | name= | ||
| sortkey= | | sortkey= | ||
| spoilers= | |||
}} | }} | ||
</pre> | </pre> | ||
=== Required parameters === | |||
None. All parameters are optional. | |||
=== Optional parameters === | === Optional parameters === | ||
* '''title''': If different from the article name. | * '''title''': If different from the article name. | ||
* '''photo''': The filename of the photo. | * '''photo''': The filename of the photo (without File: prefix). | ||
* '''photo 2''': The file name for a second photo, which goes on the bottom of the infobox. | * '''photo 2''': The file name for a second photo, which goes on the bottom of the infobox. | ||
* '''caption''': The caption of the first photo. | * '''caption''': The caption of the first photo. | ||
| Line 164: | Line 285: | ||
* '''seen''': The episode in which the character first appears. Do not wikify. | * '''seen''': The episode in which the character first appears. Do not wikify. | ||
* '''pseen''': If the episode name is different than the article name, this is what will displayed. Do not wikify. | * '''pseen''': If the episode name is different than the article name, this is what will displayed. Do not wikify. | ||
* '''seenref''': Custom reference for first appearance (overrides seen/pseen). | |||
* '''lastseen''': The episode in which the character last appears. Do not wikify. | |||
* '''plastseen''': If the last seen episode name is different than the article name, this is what will displayed. Do not wikify. | |||
* '''lastseenref''': Custom reference for last appearance (overrides lastseen/plastseen). | |||
* '''death''': When, Where, and How they died. Please wikify the episode. | * '''death''': When, Where, and How they died. Please wikify the episode. | ||
* '''parents''': Who are their parents. | * '''parents''': Who are their parents. | ||
| Line 175: | Line 300: | ||
* '''actor''': Actor/actress who plays this character. Please wikify. | * '''actor''': Actor/actress who plays this character. Please wikify. | ||
* '''name''': If the character is a Cylon, this is their human name. For example, "[[Sharon Valerii]]" for [[Number Eight]]. | * '''name''': If the character is a Cylon, this is their human name. For example, "[[Sharon Valerii]]" for [[Number Eight]]. | ||
* '''sortkey''': This tells the category system where this entry should go. (For [[William Adama]], the sortkey would be "Adama, William"—without quotes—thus telling the software to alphabetize by his last name.) | * '''sortkey''': This tells the category system where this entry should go. (For [[William Adama]], the sortkey would be "Adama, William"—without quotes—thus telling the software to alphabetize by his last name.) | ||
* '''spoilers''': Set to '''Y''' to enable spoiler mode for sensitive information. | |||
==== Series Icons ==== | |||
* '''series''': Insert the series acronym for the primary series. Values are '''TOS''', '''1980''', and '''RDM'''. | |||
* '''series 2''': Insert the series acronym for a secondary series icon. | |||
* '''series 3''': Insert the series acronym for a tertiary series icon. | |||
==== RDM ==== | ==== RDM ==== | ||
| Line 184: | Line 315: | ||
==== TOS ==== | ==== TOS ==== | ||
* '''mcylon''': Insert '''Y''' to indicate that this character is a Cylon. | * '''mcylon''': Insert '''Y''' to indicate that this character is a Cylon. | ||
==== Media Parameters ==== | |||
* '''archives''': Insert '''Y''' to show link to photo gallery. | |||
* '''media''': Insert media identifier to show link to BW Media. | |||
==== Separate Continuity ==== | ==== Separate Continuity ==== | ||
* '''sepcon''': Insert '''Y''' to indicate that a [[Battlestar Wiki:Separate continuity|separate continuity]] article is available on the subject. | * '''sepcon''': Insert '''Y''' to indicate that a [[Battlestar Wiki:Separate continuity|separate continuity]] article is available on the subject. | ||
* '''sepcon title''': The name of the article on the subject in the separate continuity. Do not encase in any link syntax. | * '''sepcon title''': The name of the article on the subject in the separate continuity. Do not encase in any link syntax. | ||
** ''Note:'' Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example: <code>Vella (TOS alternate reality)</code> will only print <code>Vella</code>. It will '''not affect''' the actual link itself, only the '''printed output''' in the template. | ** ''Note:'' Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example: <code>Vella (TOS alternate reality)</code> will only print <code>Vella</code>. It will '''not affect''' the actual link itself, only the '''printed output''' in the template. | ||
==== Primary Continuity ==== | ==== Primary Continuity ==== | ||
: ''This is meant for articles on ''separate continuity'' characters, i.e. {{alt|Daniel Novacek}}.'' | : ''This is meant for articles on ''separate continuity'' characters, i.e. {{alt|Daniel Novacek}}.'' | ||
| Line 200: | Line 331: | ||
* '''primecon title''': The name of the article on the subject in the primary continuity. Do not encase in any link syntax. | * '''primecon title''': The name of the article on the subject in the primary continuity. Do not encase in any link syntax. | ||
** ''Note:'' Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example: <code>Adama (TOS)</code> will only print <code>Adama</code>. It will '''not affect''' the actual link itself, only the '''printed output''' in the template. | ** ''Note:'' Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example: <code>Adama (TOS)</code> will only print <code>Adama</code>. It will '''not affect''' the actual link itself, only the '''printed output''' in the template. | ||
* | |||
== Changes Made == | |||
This improved version includes: | |||
* **Fixed table structure** - Proper opening and closing tags | |||
* **Improved error handling** - Template existence checks with fallbacks | |||
* **Better accessibility** - Added alt attributes for images | |||
* **Cleaner conditional logic** - Simplified spoiler and collapsible handling | |||
* **Standardized parameters** - Consistent use of parameter defaults | |||
* **Enhanced documentation** - Clearer parameter descriptions and relationships | |||
* **Added CSS classes** - For better styling control | |||
* **Improved link generation** - Better handling of episode links with display names | |||
[[Category:Infobox|Character]] | [[Category:Infobox|Character]] | ||
| Line 207: | Line 348: | ||
[[de:Vorlage:Charakterdaten]] | [[de:Vorlage:Charakterdaten]] | ||
[[fr:Modèle:Infobox Personnage]] | [[fr:Modèle:Infobox Personnage]] | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"title": {}, | "title": { | ||
"description": "Character name if different from article name" | |||
}, | |||
"photo": { | "photo": { | ||
"type": "wiki-file-name" | "type": "wiki-file-name", | ||
"description": "Main character image filename" | |||
}, | |||
"caption": { | |||
"description": "Caption for main photo" | |||
}, | }, | ||
"photo 2": { | "photo 2": { | ||
"type": "wiki-file-name" | "type": "wiki-file-name", | ||
"description": "Secondary character image filename" | |||
}, | }, | ||
"caption 2": {}, | "caption 2": { | ||
" | "description": "Caption for secondary photo" | ||
"lastseen": {}, | }, | ||
"lastseenref": {}, | "name": { | ||
" | "description": "Human name if character is a Cylon" | ||
"spoilers": {} | }, | ||
"cylon": { | |||
"type": "boolean", | |||
"description": "Set to Y if character is a Cylon" | |||
}, | |||
"5cylon": { | |||
"type": "boolean", | |||
"description": "Set to Y if character is a Final Five Cylon" | |||
}, | |||
"hcylon": { | |||
"type": "boolean", | |||
"description": "Set to Y if character is a Human/Cylon Hybrid" | |||
}, | |||
"mcylon": { | |||
"type": "boolean", | |||
"description": "Set to Y if character is an Original Series Cylon" | |||
}, | |||
"age": { | |||
"description": "Character's age" | |||
}, | |||
"colony": { | |||
"description": "Home colony" | |||
}, | |||
"birthplace": { | |||
"description": "Birth location if not from the Twelve Colonies" | |||
}, | |||
"birthname": { | |||
"description": "Full birth name" | |||
}, | |||
"birthdate": { | |||
"description": "Date of birth" | |||
}, | |||
"callsign": { | |||
"description": "Pilot callsign" | |||
}, | |||
"nickname": { | |||
"description": "Character nickname" | |||
}, | |||
"seen": { | |||
"description": "First appearance episode" | |||
}, | |||
"pseen": { | |||
"description": "Display name for first appearance if different from episode title" | |||
}, | |||
"seenref": { | |||
"description": "Custom reference for first appearance (overrides seen/pseen)" | |||
}, | |||
"lastseen": { | |||
"description": "Last appearance episode" | |||
}, | |||
"plastseen": { | |||
"description": "Display name for last appearance if different from episode title" | |||
}, | |||
"lastseenref": { | |||
"description": "Custom reference for last appearance (overrides lastseen/plastseen)" | |||
}, | |||
"death": { | |||
"description": "Information about character's death" | |||
}, | |||
"parents": { | |||
"description": "Character's parents" | |||
}, | |||
"siblings": { | |||
"description": "Character's siblings" | |||
}, | |||
"children": { | |||
"description": "Character's children" | |||
}, | |||
"marital status": { | |||
"description": "Current marital status" | |||
}, | |||
"familytree": { | |||
"type": "boolean", | |||
"description": "Set to Y if article has a family tree section" | |||
}, | |||
"role": { | |||
"description": "Current job or position" | |||
}, | |||
"rank": { | |||
"description": "Military rank" | |||
}, | |||
"serial": { | |||
"description": "Military serial number" | |||
}, | |||
"actor": { | |||
"description": "Actor who portrays the character" | |||
}, | |||
"series": { | |||
"description": "Primary series (TOS, 1980, RDM)" | |||
}, | |||
"series 2": { | |||
"description": "Secondary series icon" | |||
}, | |||
"series 3": { | |||
"description": "Tertiary series icon" | |||
}, | |||
"archives": { | |||
"type": "boolean", | |||
"description": "Set to Y to show photo gallery link" | |||
}, | |||
"media": { | |||
"description": "Media identifier for BW Media link" | |||
}, | |||
"sepcon": { | |||
"type": "boolean", | |||
"description": "Set to Y if separate continuity article exists" | |||
}, | |||
"sepcon title": { | |||
"description": "Title of separate continuity article" | |||
}, | |||
"primecon": { | |||
"type": "boolean", | |||
"description": "Set to Y if primary continuity article exists" | |||
}, | |||
"primecon title": { | |||
"description": "Title of primary continuity article" | |||
}, | |||
"sortkey": { | |||
"description": "Category sort key (Last, First format)" | |||
}, | |||
"spoilers": { | |||
"type": "boolean", | |||
"description": "Set to Y to enable spoiler hiding functionality" | |||
} | |||
}, | }, | ||
"description": "Creates an infobox for characters.", | "description": "Creates an infobox for Battlestar Galactica characters with improved error handling and accessibility.", | ||
"paramOrder": [ | "paramOrder": [ | ||
"title", | "title", | ||
"photo", | "photo", | ||
"caption", | "caption", | ||
"photo 2", | |||
"caption 2", | |||
"name", | "name", | ||
"cylon", | "cylon", | ||
"5cylon", | |||
"hcylon", | |||
"mcylon", | |||
"age", | "age", | ||
"colony", | "colony", | ||
| Line 276: | Line 517: | ||
"nickname", | "nickname", | ||
"seen", | "seen", | ||
"pseen", | |||
"seenref", | "seenref", | ||
"lastseen", | "lastseen", | ||
"plastseen", | |||
"lastseenref", | "lastseenref", | ||
"death", | "death", | ||
"parents", | "parents", | ||
| Line 291: | Line 532: | ||
"serial", | "serial", | ||
"actor", | "actor", | ||
" | "series", | ||
" | "series 2", | ||
" | "series 3", | ||
"archives", | "archives", | ||
"media", | "media", | ||
"sepcon", | "sepcon", | ||
"sepcon title", | |||
"primecon", | "primecon", | ||
"primecon title", | "primecon title", | ||
"sortkey", | "sortkey", | ||
"spoilers" | "spoilers" | ||
] | ] | ||
} | } | ||
</templatedata></noinclude> | </templatedata> | ||
</noinclude> | |||
Revision as of 03:51, 24 August 2025
Documentation
This template is used to place character info on a Battlestar Wiki article. It provides lower case parameters only.
Usage
{{Character Data
| title=
| photo=
| photo 2=
| caption=
| caption 2=
| age=
| colony=
| birthplace=
| birthname=
| birthdate=
| callsign=
| nickname=
| seen=
| pseen=
| seenref=
| lastseen=
| plastseen=
| lastseenref=
| death=
| parents=
| siblings=
| children=
| marital status=
| familytree=
| role=
| rank=
| serial=
| actor=
| cylon=
| 5cylon=
| hcylon=
| mcylon=
| archives=
| media=
| sepcon=
| primecon=
| sepcon title=
| primecon title=
| series=
| series 2=
| series 3=
| name=
| sortkey=
| spoilers=
}}
Required parameters
None. All parameters are optional.
Optional parameters
- title: If different from the article name.
- photo: The filename of the photo (without File: prefix).
- photo 2: The file name for a second photo, which goes on the bottom of the infobox.
- caption: The caption of the first photo.
- caption 2: The caption of the second photo.
- age: The approximate age of the character.
- colony: The character's home colony.
- birthplace: If the character was not born on one of The Twelve Colonies, then use this parameter instead of "colony".
- birthname: The full birthname of the character.
- birthdate: The date of birth. Approximate. Link to a Timeline page if needed.
- callsign: The character's "callsign" if he or she is a pilot.
- nickname: The character's "nickname" if applicable.
- seen: The episode in which the character first appears. Do not wikify.
- pseen: If the episode name is different than the article name, this is what will displayed. Do not wikify.
- seenref: Custom reference for first appearance (overrides seen/pseen).
- lastseen: The episode in which the character last appears. Do not wikify.
- plastseen: If the last seen episode name is different than the article name, this is what will displayed. Do not wikify.
- lastseenref: Custom reference for last appearance (overrides lastseen/plastseen).
- death: When, Where, and How they died. Please wikify the episode.
- parents: Who are their parents.
- siblings: Who is related to them.
- children: How many children does this character have.
- marital status: What's their current marital status.
- familytree: Set this to Y if they have a family tree. The section in the article should be
Family tree. - role: Current job or position.
- rank: Current rank if in the military.
- serial: Serial number, if in the military.
- actor: Actor/actress who plays this character. Please wikify.
- name: If the character is a Cylon, this is their human name. For example, "Sharon Valerii" for Number Eight.
- sortkey: This tells the category system where this entry should go. (For William Adama, the sortkey would be "Adama, William"—without quotes—thus telling the software to alphabetize by his last name.)
- spoilers: Set to Y to enable spoiler mode for sensitive information.
Series Icons
- series: Insert the series acronym for the primary series. Values are TOS, 1980, and RDM.
- series 2: Insert the series acronym for a secondary series icon.
- series 3: Insert the series acronym for a tertiary series icon.
RDM
- cylon: Insert Y to indicate that this character is a Cylon.
- 5cylon: Insert Y to indicate that this character is a member of the Final Five.
- hcylon: Insert Y to indicate that this character is a Cylon Hybrid.
TOS
- mcylon: Insert Y to indicate that this character is a Cylon.
Media Parameters
- archives: Insert Y to show link to photo gallery.
- media: Insert media identifier to show link to BW Media.
Separate Continuity
- sepcon: Insert Y to indicate that a separate continuity article is available on the subject.
- sepcon title: The name of the article on the subject in the separate continuity. Do not encase in any link syntax.
- Note: Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example:
Vella (TOS alternate reality)will only printVella. It will not affect the actual link itself, only the printed output in the template.
- Note: Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example:
Primary Continuity
- This is meant for articles on separate continuity characters, i.e. Daniel Novacek.
- primecon: Insert Y to indicate that a primary continuity article is available on the subject.
- primecon title: The name of the article on the subject in the primary continuity. Do not encase in any link syntax.
- Note: Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example:
Adama (TOS)will only printAdama. It will not affect the actual link itself, only the printed output in the template.
- Note: Anything encased in parentheses will be "piped," thus anything including or after the "(" will be ignored when outputting a name, just like an automatically piped link. Example:
Changes Made
This improved version includes:
- **Fixed table structure** - Proper opening and closing tags
- **Improved error handling** - Template existence checks with fallbacks
- **Better accessibility** - Added alt attributes for images
- **Cleaner conditional logic** - Simplified spoiler and collapsible handling
- **Standardized parameters** - Consistent use of parameter defaults
- **Enhanced documentation** - Clearer parameter descriptions and relationships
- **Added CSS classes** - For better styling control
- **Improved link generation** - Better handling of episode links with display names
Creates an infobox for Battlestar Galactica characters with improved error handling and accessibility.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| title | title | Character name if different from article name | Unknown | optional |
| photo | photo | Main character image filename | File | optional |
| caption | caption | Caption for main photo | Unknown | optional |
| photo 2 | photo 2 | Secondary character image filename | File | optional |
| caption 2 | caption 2 | Caption for secondary photo | Unknown | optional |
| name | name | Human name if character is a Cylon | Unknown | optional |
| cylon | cylon | Set to Y if character is a Cylon | Boolean | optional |
| 5cylon | 5cylon | Set to Y if character is a Final Five Cylon | Boolean | optional |
| hcylon | hcylon | Set to Y if character is a Human/Cylon Hybrid | Boolean | optional |
| mcylon | mcylon | Set to Y if character is an Original Series Cylon | Boolean | optional |
| age | age | Character's age | Unknown | optional |
| colony | colony | Home colony | Unknown | optional |
| birthplace | birthplace | Birth location if not from the Twelve Colonies | Unknown | optional |
| birthname | birthname | Full birth name | Unknown | optional |
| birthdate | birthdate | Date of birth | Unknown | optional |
| callsign | callsign | Pilot callsign | Unknown | optional |
| nickname | nickname | Character nickname | Unknown | optional |
| seen | seen | First appearance episode | Unknown | optional |
| pseen | pseen | Display name for first appearance if different from episode title | Unknown | optional |
| seenref | seenref | Custom reference for first appearance (overrides seen/pseen) | Unknown | optional |
| lastseen | lastseen | Last appearance episode | Unknown | optional |
| plastseen | plastseen | Display name for last appearance if different from episode title | Unknown | optional |
| lastseenref | lastseenref | Custom reference for last appearance (overrides lastseen/plastseen) | Unknown | optional |
| death | death | Information about character's death | Unknown | optional |
| parents | parents | Character's parents | Unknown | optional |
| siblings | siblings | Character's siblings | Unknown | optional |
| children | children | Character's children | Unknown | optional |
| marital status | marital status | Current marital status | Unknown | optional |
| familytree | familytree | Set to Y if article has a family tree section | Boolean | optional |
| role | role | Current job or position | Unknown | optional |
| rank | rank | Military rank | Unknown | optional |
| serial | serial | Military serial number | Unknown | optional |
| actor | actor | Actor who portrays the character | Unknown | optional |
| series | series | Primary series (TOS, 1980, RDM) | Unknown | optional |
| series 2 | series 2 | Secondary series icon | Unknown | optional |
| series 3 | series 3 | Tertiary series icon | Unknown | optional |
| archives | archives | Set to Y to show photo gallery link | Boolean | optional |
| media | media | Media identifier for BW Media link | Unknown | optional |
| sepcon | sepcon | Set to Y if separate continuity article exists | Boolean | optional |
| sepcon title | sepcon title | Title of separate continuity article | Unknown | optional |
| primecon | primecon | Set to Y if primary continuity article exists | Boolean | optional |
| primecon title | primecon title | Title of primary continuity article | Unknown | optional |
| sortkey | sortkey | Category sort key (Last, First format) | Unknown | optional |
| spoilers | spoilers | Set to Y to enable spoiler hiding functionality | Boolean | optional |