Difference between revisions of "Template:CharacterInfo"

From Bearscape Wiki
Jump to: navigation, search
m (Added a player field to the character info template.)
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| class="wikitable" style="float: right; margin-left: 10px;"
+
{{#css:infobox.css}}
|+{{{name|Unknown}}}<br />
+
<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>
 
}}
 
}}
|'''Name'''||{{{name|Unknown}}}
+
{{#if: {{{aliases|}}}
|-
+
|<tr>
|'''Aliases'''||{{{aliases|N/A}}}
+
<td>'''Aliases'''</td><td>{{{aliases}}}</td>
|-
+
</tr>
|'''Occupation'''||{{{occupation|N/A}}}
+
}}
|-
+
{{#if: {{{campaign|}}}
|'''Age'''||{{{age|Unknown}}}
+
|<tr>
|-
+
<td>'''Campaign'''</td><td>{{{campaign}}}</td>
|'''Birthday'''||{{{birthday|Unknown}}}
+
</tr>
|-
+
}}
|'''Date of Death'''||{{{dateofdeath|N/A}}}
+
<tr>
|-
+
<td>'''Age'''</td><td>{{{age|Unknown}}}</td>
|'''Original World'''||{{{originalworld|???}}}
+
</tr>
|-
+
<tr>
|'''Current World'''||{{{currentworld|???}}}
+
<td>'''Birthday'''</td><td>{{{birthday|Unknown}}}</td>
|-
+
</tr>
|'''Race'''||{{{race|Unknown}}}
+
<tr>
|-
+
<td>'''Birthplace'''</td><td>{{{birthplace|{{{homeworld|{{{originalworld|???}}}}}}}}}</td>
|'''Gender'''||{{{gender|Unknown}}}
+
</tr>
|-
+
{{#if: {{{currentlocation|{{{currentworld|}}}}}}
|'''Height'''||{{{height|Unknown}}}
+
|<tr>
|-
+
<td>'''Current&nbsp;Location'''</td><td>{{{currentlocation|{{{currentworld}}}}}}</td>
|'''Weight'''||{{{weight|Unknown}}}
+
</tr>
|-
+
}}
|'''Hair Color'''||{{{haircolor|Unknown}}}
+
{{#if: {{{occupation|}}}
|-
+
|<tr>
|'''Eye Color'''||{{{eyecolor|Unknown}}}
+
<td>'''Occupation'''</td><td>{{{occupation}}}</td>
|-
+
</tr>
|'''Relatives'''||{{{relatives|None}}}
+
}}
|-
+
<tr>
|'''Player'''|{{{player|N/A}}}
+
<td>'''Race'''</td><td>{{{race|Unknown}}}</td>
|}
+
</tr>
<noinclude>
+
<tr>
This is a template for character information.
+
<td>'''Gender'''</td><td>{{{gender|Unknown}}}</td>
 
+
</tr>
To utilize it, add the following to a page:
+
<tr>
 +
<td>'''Height'''</td><td>{{{height|Unknown}}}</td>
 +
</tr>
 +
<tr>
 +
<td>'''Weight'''</td><td>{{{weight|Unknown}}}</td>
 +
</tr>
 +
<tr>
 +
<td>'''Hair&nbsp;Color'''</td><td>{{{haircolor|Unknown}}}</td>
 +
</tr>
 +
<tr>
 +
<td>'''Eye&nbsp;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 ==
 
<pre>{{CharacterInfo|PARAMETERS}}</pre>
 
<pre>{{CharacterInfo|PARAMETERS}}</pre>
  
Line 54: Line 81:
  
 
* name
 
* name
 +
* formerly
 
* aliases
 
* aliases
* occupation
+
* 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
Line 70: Line 99:
 
* player
 
* player
  
If any parameter is not included, then the default value will be used instead. The current defaults can be seen to the right.
+
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 &amp;#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 external image URL for the profile image.
+
* 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.
  
An example of how to use the template:
+
== Example ==
 
+
<div style="float: left;">
<pre>{{CharacterInfo|profileurl=http://bobandgeorge.com/images/George.png|profilesize=100|profilecaption=Ice Cream|name=George|aliases=Blitz|occupation=Superhero|currentworld=Mega Man's|race=Human|gender=Male|haircolor=Blonde|relatives=Bob (''brother'')}}</pre>
+
<pre>{{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'')
 +
}}</pre>
  
 
This renders as (see to the right):
 
This renders as (see to the right):
{{CharacterInfo|profileurl=http://bobandgeorge.com/images/George.png|profilesize=100|profilecaption=Ice Cream|name=George|aliases=Blitz|occupation=Superhero|currentworld=Mega Man's|race=Human|gender=Male|haircolor=Blonde|relatives=Bob (''brother'')}}
+
</div>
 +
{{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'')
 +
}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:45, 25 October 2018

Unknown
AgeUnknown
BirthdayUnknown
Birthplace???
RaceUnknown
GenderUnknown
HeightUnknown
WeightUnknown
Hair ColorUnknown
Eye ColorUnknown
RelativesNone

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 &#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:

  • 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):

George

Ice Cream
AliasesBlitz
CampaignBob and George
AgeUnknown
BirthdayUnknown
Birthplace???
Current LocationMega Man's
OccupationSuperhero
RaceHuman
GenderMale
HeightUnknown
WeightUnknown
Hair ColorBlonde
Eye ColorUnknown
RelativesBob (brother)