Difference between revisions of "Template:CharacterInfo"
m (More minor cleanup.) |
(I got annoyed with the way wikitable markup works, so I replaced this whole thing with normal HTML tables. MediaWiki normalizes the sucker anyways. And it means no hidden rows on the actual returned markup.) |
||
| Line 1: | Line 1: | ||
| − | + | <table class="wikitable" style="float: right; margin-left: 10px;"> | |
| − | + | <caption>{{{name|Unknown}}}<br /> | |
{{#if: {{{profileurl|}}} | {{#if: {{{profileurl|}}} | ||
| − | |<div class="thumbinner" style="width: {{#expr: {{{profilesize|150}}} + 2}}px; margin: 0 auto"> | + | |<div class="thumbinner" style="width: {{#expr: {{{profilesize|150}}} + 2}}px; margin: 0 auto 10px"> |
<p style="margin: 0"> | <p style="margin: 0"> | ||
<span class="plainlinks" style="display: block; width: {{{profilesize|150}}}px; margin: 1px">[{{{profileurl}}} <img src="{{{profileurl}}}" style="max-width: 100%; max-height: {{{profilesize|150}}}px">]</span> | <span class="plainlinks" style="display: block; width: {{{profilesize|150}}}px; margin: 1px">[{{{profileurl}}} <img src="{{{profileurl}}}" style="max-width: 100%; max-height: {{{profilesize|150}}}px">]</span> | ||
| Line 11: | Line 11: | ||
}} | }} | ||
</div> | </div> | ||
| + | }}</caption> | ||
| + | {{#if: {{{aliases|}}} | ||
| + | |<tr> | ||
| + | <td>'''Aliases'''</td><td>{{{aliases}}}</td> | ||
| + | </tr> | ||
}} | }} | ||
| − | + | {{#if: {{{campaign|}}} | |
| − | + | |<tr> | |
| − | + | <td>'''Campaign'''</td><td>{{{campaign}}}</td> | |
| − | + | </tr> | |
| − | + | }} | |
| − | + | <tr> | |
| − | + | <td>'''Age'''</td><td>{{{age|Unknown}}}</td> | |
| − | + | </tr> | |
| − | + | <tr> | |
| − | + | <td>'''Birthday'''</td><td>{{{birthday|Unknown}}}</td> | |
| − | + | </tr> | |
| − | + | <tr> | |
| − | + | <td>'''Home World'''</td><td>{{{homeworld|{{{originalworld|???}}}}}}</td> | |
| − | + | </tr> | |
| − | + | {{#if: {{{currentworld|}}} | |
| − | + | |<tr> | |
| − | + | <td>'''Current World'''</td><td>{{{currentworld}}}</td> | |
| − | + | </tr> | |
| − | + | }} | |
| − | + | {{#if: {{{occupation|}}} | |
| − | + | |<tr> | |
| − | + | <td>'''Occupation'''</td><td>{{{occupation}}}</td> | |
| − | + | </tr> | |
| − | + | }} | |
| − | + | <tr> | |
| − | + | <td>'''Race'''</td><td>{{{race|Unknown}}}</td> | |
| − | + | </tr> | |
| − | + | <tr> | |
| − | + | <td>'''Gender'''</td><td>{{{gender|Unknown}}}</td> | |
| − | + | </tr> | |
| − | + | <tr> | |
| − | + | <td>'''Height'''</td><td>{{{height|Unknown}}}</td> | |
| − | + | </tr> | |
| + | <tr> | ||
| + | <td>'''Weight'''</td><td>{{{weight|Unknown}}}</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>'''Hair Color'''</td><td>{{{haircolor|Unknown}}}</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>'''Eye Color'''</td><td>{{{eyecolor|Unknown}}}</td> | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <td>'''Relatives'''</td><td>{{{relatives|None}}}</td> | ||
| + | </tr> | ||
| + | {{#if: {{{player|}}} | ||
| + | |<tr> | ||
| + | <td>'''Player'''</td><td>{{{player}}}</td> | ||
| + | </tr> | ||
| + | }} | ||
| + | </table><noinclude>This is a template for character information. | ||
== Usage == | == Usage == | ||
| Line 78: | Line 101: | ||
== Example == | == Example == | ||
| − | {{CharacterInfo | + | <div style="float: left;"> |
| + | <pre>{{CharacterInfo | ||
|profileurl=http://bobandgeorge.com/images/George.png | |profileurl=http://bobandgeorge.com/images/George.png | ||
|profilesize=100 | |profilesize=100 | ||
| Line 91: | Line 115: | ||
|haircolor=Blonde | |haircolor=Blonde | ||
|relatives=Bob (''brother'') | |relatives=Bob (''brother'') | ||
| − | }} | + | }}</pre> |
| − | <div | + | |
| − | + | This renders as (see to the right): | |
| + | </div> | ||
| + | {{CharacterInfo | ||
|profileurl=http://bobandgeorge.com/images/George.png | |profileurl=http://bobandgeorge.com/images/George.png | ||
|profilesize=100 | |profilesize=100 | ||
| Line 106: | Line 132: | ||
|haircolor=Blonde | |haircolor=Blonde | ||
|relatives=Bob (''brother'') | |relatives=Bob (''brother'') | ||
| − | }} | + | }} |
| − | + | </noinclude> | |
| − | |||
| − | |||
Revision as of 19:08, 19 January 2016
| Age | Unknown |
| Birthday | Unknown |
| Home World | ??? |
| Race | Unknown |
| Gender | Unknown |
| Height | Unknown |
| Weight | Unknown |
| Hair Color | Unknown |
| Eye Color | Unknown |
| Relatives | None |
This is a template for character information.
Usage
{{CharacterInfo|PARAMETERS}}
PARAMETERS is a list of items separated by the pipe symbol, |. Each parameter in the list is in the format of NAME=VALUE. The following is a list of acceptable parameters:
- name
- aliases
- campaign
- age
- birthday
- dateofdeath
- homeworld (or originalworld for backwards compatibility)
- currentworld
- occupation
- race
- gender
- height
- weight
- haircolor
- eyecolor
- relatives
- player
If any parameter is not included, then the default value will be used instead. Because the pipe symbol is used to separate items, if you wish to include the pipe symbol as a value, use | instead. The current defaults can be seen to the right, with the exceptions of Aliases, Campaign, Occupation, Current World, Date of Death and Player, which only show up if given.
In addition to the above, there are 3 additional parameters that are fields but control adding a profile image to the character information. They are as follows:
- profileurl: This is an external image URL for the profile image.
- profilesize: If given, the profile image will be locked into a maximum square of the size given (for example, 100 will max out at 100x100). If not given, it defaults to 150.
- profilecaption: If given, it will add a caption under the profile image.
Example
{{CharacterInfo
|profileurl=http://bobandgeorge.com/images/George.png
|profilesize=100
|profilecaption=Ice Cream
|name=George
|aliases=Blitz
|campaign=Bob and George
|occupation=Superhero
|currentworld=Mega Man's
|race=Human
|gender=Male
|haircolor=Blonde
|relatives=Bob (''brother'')
}}
This renders as (see to the right):
| Aliases | Blitz |
| Campaign | Bob and George |
| Age | Unknown |
| Birthday | Unknown |
| Birthplace | ??? |
| Current Location | Mega Man's |
| Occupation | Superhero |
| Race | Human |
| Gender | Male |
| Height | Unknown |
| Weight | Unknown |
| Hair Color | Blonde |
| Eye Color | Unknown |
| Relatives | Bob (brother) |
