Difference between revisions of "Template:CharacterInfo"
m (Moving campaign above name without fixing the table is a bad idea. >.>) |
|||
| (14 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | { | + | {{#css:infobox.css}} |
| − | + | <table class="infobox"> | |
| + | <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">{{#ifeq: {{#sub: {{{profileurl}}}|0|4}} | http | [{{{profileurl}}} <img src="{{{profileurl}}}" style="max-width: 100%; max-height: {{{profilesize|150}}}px">] | [[File:{{{profileurl}}}|{{{profilesize|150}}}x{{{profilesize|150}}}px]]}}</span> |
</p> | </p> | ||
{{#if: {{{profilecaption|}}} | {{#if: {{{profilecaption|}}} | ||
| Line 11: | Line 12: | ||
}} | }} | ||
</div> | </div> | ||
| + | }}</caption> | ||
| + | {{#if: {{{formerly|}}} | ||
| + | |<tr> | ||
| + | <td>'''Formerly'''</td><td>{{{formerly}}}</td> | ||
| + | </tr> | ||
}} | }} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
{{#if: {{{aliases|}}} | {{#if: {{{aliases|}}} | ||
| − | | | + | |<tr> |
| − | + | <td>'''Aliases'''</td><td>{{{aliases}}}</td> | |
| − | + | </tr> | |
}} | }} | ||
| − | + | {{#if: {{{campaign|}}} | |
| − | + | |<tr> | |
| − | + | <td>'''Campaign'''</td><td>{{{campaign}}}</td> | |
| − | + | </tr> | |
| − | {{#if: {{{ | ||
| − | | | ||
| − | |||
| − | |||
}} | }} | ||
| − | | | + | <tr> |
| − | |''' | + | <td>'''Age'''</td><td>{{{age|Unknown}}}</td> |
| − | {{#if: {{{currentworld|}}} | + | </tr> |
| − | | | + | <tr> |
| − | + | <td>'''Birthday'''</td><td>{{{birthday|Unknown}}}</td> | |
| − | + | </tr> | |
| + | <tr> | ||
| + | <td>'''Birthplace'''</td><td>{{{birthplace|{{{homeworld|{{{originalworld|???}}}}}}}}}</td> | ||
| + | </tr> | ||
| + | {{#if: {{{currentlocation|{{{currentworld|}}}}}} | ||
| + | |<tr> | ||
| + | <td>'''Current Location'''</td><td>{{{currentlocation|{{{currentworld}}}}}}</td> | ||
| + | </tr> | ||
}} | }} | ||
| − | |||
| − | |||
| − | |||
| − | |||
{{#if: {{{occupation|}}} | {{#if: {{{occupation|}}} | ||
| − | | | + | |<tr> |
| − | + | <td>'''Occupation'''</td><td>{{{occupation}}}</td> | |
| − | + | </tr> | |
}} | }} | ||
| − | | | + | <tr> |
| − | |'''Height''' | + | <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|}}} | {{#if: {{{player|}}} | ||
| − | | | + | |<tr> |
| − | + | <td>'''Player'''</td><td>{{{player}}}</td> | |
| − | + | </tr> | |
}} | }} | ||
| − | + | </table><noinclude>This is a template for character information. | |
| − | <noinclude>This is a template for character information. | ||
| − | |||
| − | |||
| + | == Usage == | ||
<pre>{{CharacterInfo|PARAMETERS}}</pre> | <pre>{{CharacterInfo|PARAMETERS}}</pre> | ||
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: | 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 | * name | ||
| + | * formerly | ||
* aliases | * aliases | ||
| + | * campaign | ||
* age | * age | ||
* birthday | * birthday | ||
* dateofdeath | * dateofdeath | ||
| − | * originalworld | + | * birthplace (or homeworld or originalworld for backwards compatibility) |
| − | * currentworld | + | * currentlocation (or currentworld for backwards compatiblity) |
| + | * occupation | ||
* race | * race | ||
* gender | * gender | ||
| − | |||
* height | * height | ||
* weight | * weight | ||
| Line 91: | Line 99: | ||
* player | * 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 &#124; instead. The current defaults can be seen to the right, with the exceptions of Aliases, Campaign, | + | 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 &#124; instead. The current defaults can be seen to the right, with the exceptions of Aliases, Campaign, Date of Death, Current Location, Occupation 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: | 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 | + | * profileurl: This is an image URL for the profile image. If the URL starts with http or https, it'll be assumed to be external, otherwise it'll be assumed to be local to the wiki (and must be uploaded to the wiki). |
* 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. | * 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. | * profilecaption: If given, it will add a caption under the profile image. | ||
| − | + | == Example == | |
| − | + | <div style="float: left;"> | |
| − | {{CharacterInfo | + | <pre>{{CharacterInfo |
|profileurl=http://bobandgeorge.com/images/George.png | |profileurl=http://bobandgeorge.com/images/George.png | ||
|profilesize=100 | |profilesize=100 | ||
| Line 109: | Line 117: | ||
|campaign=Bob and George | |campaign=Bob and George | ||
|occupation=Superhero | |occupation=Superhero | ||
| − | | | + | |currentlocation=Mega Man's |
|race=Human | |race=Human | ||
|gender=Male | |gender=Male | ||
|haircolor=Blonde | |haircolor=Blonde | ||
|relatives=Bob (''brother'') | |relatives=Bob (''brother'') | ||
| − | }} | + | }}</pre> |
| − | < | ||
| − | |||
| − | < | + | 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 126: | Line 134: | ||
|campaign=Bob and George | |campaign=Bob and George | ||
|occupation=Superhero | |occupation=Superhero | ||
| − | | | + | |currentlocation=Mega Man's |
|race=Human | |race=Human | ||
|gender=Male | |gender=Male | ||
|haircolor=Blonde | |haircolor=Blonde | ||
|relatives=Bob (''brother'') | |relatives=Bob (''brother'') | ||
| − | }} | + | }} |
| − | + | </noinclude> | |
| − | |||
| − | |||
Latest revision as of 17:45, 25 October 2018
| Age | Unknown |
| Birthday | Unknown |
| Birthplace | ??? |
| Race | Unknown |
| Gender | Unknown |
| Height | Unknown |
| Weight | Unknown |
| Hair Color | Unknown |
| Eye Color | Unknown |
| Relatives | None |
This is a template for character information.
Usage[edit]
{{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
- formerly
- aliases
- campaign
- age
- birthday
- dateofdeath
- birthplace (or homeworld or originalworld for backwards compatibility)
- currentlocation (or currentworld for backwards compatiblity)
- 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, Date of Death, Current Location, Occupation 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 image URL for the profile image. If the URL starts with http or https, it'll be assumed to be external, otherwise it'll be assumed to be local to the wiki (and must be uploaded to the wiki).
- 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[edit]
{{CharacterInfo
|profileurl=http://bobandgeorge.com/images/George.png
|profilesize=100
|profilecaption=Ice Cream
|name=George
|aliases=Blitz
|campaign=Bob and George
|occupation=Superhero
|currentlocation=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) |
