Template:Char Box/doc

Char Box is the main infobox used for characters. It has been around for a number of years, and retains much of its original functionality. However, it was reshaped by code of a more portable nature in March 2016, when a few changes were made. The following documentation tells you about the current functionality of the template.

One of the biggest changes is that there is that the  has been wholly removed from the code, after a long period of time where it was deprecated, anyway. This template has been, for a number of years, automatically selecting its images (based on their name). In most situations, this automatic selection was overriding any manual usage of the  variable.

Nevertheless, here on the instruction page, the result of removing the  variable is profound. It looks like the template isn't working.

But it is.

To verify that this template is still working properly, go to the Monkey D. Luffy page and take a look. Or go to any page that uses the CharBox template.

Basics
The basic code to bring it up is this.

Parameters
See /preload for the preloaded syntax.

Example
You can create a simple info box by doing something like this.

Color
You can use a predefined colorscheme. However none have been set up in MediaWiki:Themes.css as of 18:35, March 16, 2016 (UTC). Until color schemes like "ArlongPiratesColors" are defined there, adding the colorscheme variable will have no effect.

Images and Switch

 * There is no "image" variable anymore. Standard pic names are automatically used: "XXX Infobox.png", "XXX Manga Infobox.png", "XXX Anime Infobox.png", etc. "XXX" is the title of the page, or the value of imagename if specified. Whether anime/manga, pre/post-timeskip pics should be used is controlled by the switch parameter.
 * If it is omitted, the default is to have a simple manga/anime switch.
 * If set to switch=none, the standard pic name "XXX Infobox.png" is used (useful for game characters, for example).
 * If there is no image available, use switch=no image.
 * To use only a manga pic or only an anime pic, put switch=manga or switch=anime, respectively.
 * To use a full-fledged timeskip+manga/anime switch, put switch=timeskip.
 * To use a manga-only or anime-only timeskip switch, put switch=manga timeskip or switch=anime timeskip, respectively.
 * Last, if you want a timeskip switch, but there is not yet a post-timeskip anime pic, put switch=manga post (meaning "the post-TS pic is manga-only"). Similarly, there are switch=manga pre, switch=anime pre, and switch=anime post. Moreover, switch=manga post, anime pre and switch=manga pre, anime post also work.

The following table sums this up:

Extra Parameters
These values here are for categories that might be unique to certain characters only such as height and birthdays. Here is an example of how they can used.

Devil Fruit
There are also "df2name", "df2ename", "df2colorscheme" etc. for special characters having two devil fruits somehow.

Variables that no longer work
The following variables have been retired.


 * image            =
 * backcolor        =
 * textcolor        =

Note that  has effectively been deprecated for several years, whereas   and   never had a period of deprecation. All three were wholly removed from the code on 18:21, March 16, 2016 (UTC).

Template dependencies
This template requires Switch infobox to function properly. It drives the ability to flip through different images in the unique way that happens here at One Piece.