Help:Userbox

From the Super Mario Wiki, the Mario encyclopedia
(Redirected from MarioWiki:USERBOX)
Jump to navigationJump to search
"SMW:USERBOX" redirects here. For listing of userboxes, see MarioWiki:Userboxes.

This page explains what a userbox is and how to use, alter and create one.

What is a userbox?

A userbox is a box that describes you, a user. It can represent a multitude of things:

  • Favorite game
  • Favorite series
  • Favorite characters
  • Favorite consoles
  • Stuff about you on and/or off the wiki

Many userboxes make up a userbox tower, a bunch of organized userboxes lined up vertically. There are quite a few available already at MarioWiki:Userboxes, but to really express yourself, you may wish to make your own.

Contents of a userbox

Userbox example.svg
  1. The border color sets what it says.
  2. Mainbkgd stands for main background, where the message (6) text is set at.
  3. Codebkgd likewise stands for the code background, where the left-handed box text or image is set at.
  4. Codecolor changes the text color in the left-hand box. If an image is used instead, this still has to be filled in, but it will be ineffective.
  5. Code is what is filled in the left-hand box, either text or an image. An image should not be more than 40 X 40 pixels (see below).
  6. Msg, likewise, is what is filled in on the right-hand side. Wiki code can be used.

The four six-alphanumeric codes above are hex decimal colors. The maincolor is automatically black, but can be changed using <span> tags.

Code of a userbox

Note: Please know what a hex color is before reading this section. Also see a list of hex colors.

The code of the vg-5 userbox above is

{{userbox|border=#FF0000|mainbkgd=#FF5555|codebkgd=#FF0000|codecolor=#000000|code=vg-5|msg=This user is a professional gamer.}}.
As revealed by the two squiggly brackets, the code is a template. There is also a top and a bottom template to add in-between the userboxes, completing the userbox tower. The code of these templates, one at a time:

Userboxtop

{| name="userboxes" id="userboxes" style="float: right; margin-left: 1em; margin-bottom: 1ex; width: 242px; border: 1px solid #99B3FF; clear: right" |- | style="text-align: center" | '''[[MarioWiki:Userboxes|Userbox tower]]''' |- |

This part opens up a table, aligned to the right, with the header "Userbox Tower" (linking to the userbox page). It sets up the main code...

Userbox

|- |<div style="float: left; border:solid {{{border}}} 1px; margin: 1px;"> {| cellspacing="0" style="width: 238px; background: {{{mainbkgd}}};" | style="width: 45px; height: 45px; background: {{{codebkgd}}}; text-align: center; font-size: 14pt; font-family: Arial; color: {{{codecolor}}}" | {{{code}}} | style="font-size:8pt;font-family:Arial;padding:4pt;line-height:1.25em;" class="plainlinks" | {{{msg}}} |} </div>

If you've been reading this tutorial, the words in between the three squiggly brackets (not two), you should be understanding how it works now. Those six IDs are variables that can be changed for each userbox, by specificing ID=_____ each time, inbetween |s. The hex colors require a # before the six characters. There can be as many userboxes as you want, and they will be "stacked" on top of one another in the right-hand table going down, hence where the name Userbox Tower came from. Each userbox is an individual table inside of a whole tower table.

Userboxbottom

|}

Yes, you're reading everything right. Though you can just as easily type |}, using {{userboxbottom}} denotes the end of the userbox on your user page, making it easier to navigate when editing. The sole purpose of the code itself is to close the Tower table from {{userboxtop}}.

Userboxp

Added on 15 October 2006, {{userboxp}} is the same as {{userbox}}, without the |- and | at the beginning. Thus, the box can stand on its own (no need of a top/bottom template) and boxes can be grouped accordingly. Because of varying heights of userboxes, however, it's highly suggested you group all userboxp userboxes in a table.

Advanced techniques

There are a few steps beyond the normal {{userbox}} style to make your userboxes look unique:

  1. Make the border and codebkgd colors the same. This makes the border look like it's coming out of the left side for a cool effect.
  2. Make the codebkgd and mainbkgd color the same for a uniform background color throughout the whole userbox.
  3. In the code (left-hand) text, images are allowed. Be sure that they are only 40 X 40 max in pixels, or resize it in the code. code=[[File:formyuserbox.png|40px]]
  4. Change the color of text (default black) by using {{color|text|#RRGGBB. Other span changes include:
    1. text-decoration: underline, or
    2. line-through, for a strikeout effect