Template:Metabox

From K6ka's Wiki
Jump to navigation Jump to search
{{{text}}}
Template documentation (View · Edit · History · Purge)

Description

Metabox is so-named because it is intended to be the foundation of all "message box" templates on K6ka's Wiki. The goal of this template is to create a "versatile" message box that can be used anywhere, whether it be cleanup tags in articles, warning messages, notices, and more.

Parameters

The template has the following parameters:

text - This is the main text inside of the template. It is a mandatory parameter.

text-color - This is for the color of the text inside the template. If it is left empty, the text will default to white text. You can either type in an HTML color name, or type in an HTML color code (without the #)

title - This parameter adds a line of bolded text at the top of the template.

title-color - This changes the color of the title. The parameter title must be defined for this parameter to do anything. If it is left empty, the title will default to white text. You can either type in an HTML color name, or type in an HTML color code (without the #)

bordercolor - The color of the border surrounding the template. If it is left empty, the border will default to a white color. You can either type in an HTML color name, or type in an HTML color code (without the #)

backgroundcolor - The color of the background of the template. If left empty, it will default to a transparent background (usually matches the wiki background color). You can either type in an HTML color name, or type in an HTML color code (without the #)

width - The width of the entire template, measured in percentage. Type in a number (without the % sign). If left blank, it will default to 65%.

size - Only one recognized argument - "small". If defined, the template will display as a smaller, left-aligned box instead of the default center-aligned position.

image - Add the image name into this parameter to display the image. For example, Example.jpg. Do not include the [[File: and ]] (the "File:" prefix and the square brackets); otherwise you will break the image.

imagewidth - Changes the width of the column where the image resides in. Leave blank for the default value. The parameter image must be defined in order for this parameter to work.

imagesize - Changes the size of the image in the template, measured in pixels. The parameter image must be defined in order for this parameter to work.

imagelink - If defined, the image will link to the name of the page you put into this parameter (e.g. adding Foo to this parameter will create a link to Foo). The parameter image must be defined in order for this parameter to work.

Full syntax

{{Metabox
|text             = 
|text-color       = 
|title            = 
|title-color      = 
|bordercolor      = 
|backgroundcolor  = 
|width            = 
|size             = 
|image            = 
|imagewidth       = 
|imagesize        = 
|imagelink        = 
}}

Credits

The template was developed by K6ka, using code borrowed from The Sims Wiki's Metabox and Parthenon templates.

The code for this template, viewable at https://k6ka.miraheze.org/w/index.php?title=Template:Metabox&action=raw&ctype=text/css, is licensed under the CC-BY-SA license. You are free to copy and reuse the text, as long as you give credit to the original authors. You can provide a link to https://k6ka.miraheze.org/wiki/Template:Metabox/doc#Credits in your edit summary or template documentation if you want to export the template to another MediaWiki installation, or you can use Special:Export and have the revisions in the page history copied for you. Always make sure you link back to this page.

Please note that {{Metabox}} also uses Template:Metabox/color, which you will need to export as well.

This template uses Parser Functions, which are included in MediaWiki 1.18 and up. If you don't have MediaWiki 1.18 or later, you should update to a newer version of MediaWiki, or if that's not possible, you should install the Parser Function extension before using this template.


Visit Template:Metabox/doc to edit this text! (How does this work?) (Refresh this text - why?)