Wikipedia:Userboxes

From Wikipedia, the free encyclopedia

✔ This page documents an English Wikipedia guideline. It is a generally accepted standard that editors should follow, though it should be treated with common sense and the occasional exception. When editing this page, please ensure that your revision reflects consensus. When in doubt, discuss your idea on the talk page.
Shortcuts:
WP:UBX
WP:USERBOX
The following guidelines apply equally to all user templates (including any userbox or userbox-like markup), regardless of where the code resides; and regardless of whether they have been transcluded, substituted, or written from scratch. Userboxes that fail to meet these guidelines may be subject to deletion.
This page gives information about the design, construction, and usage of userboxes, which are intended to be used only on userpages, and only for communication purposes, such as for helping Wikipedians collaborate more effectively on articles. Wikipedia is first and foremost an online encyclopedia, and its online community is a means to that end.
Skip to Userbox gallery
For the WikiProject collaboration on userboxes, see Wikipedia:WikiProject Userboxes.
A userbox is a small box that looks like this. Below are more examples.
Userboxes can come in many different styles and colors.
Userboxes can have one or two sideboxes.

A userbox (commonly abbreviated as UBX) is a small colored box designed to appear on a Wikipedian's user page as a notice about the user. Userboxes generally include one or two small graphics and a few short lines of text. Sometimes they also include wiki markup that places the user in a category. Userboxes are generally created as templates and transcluded onto userpages, although their markup may be substituted directly onto userpages instead. Userboxes should not be used in articles.

The first userboxes were introduced to support the Babel inter-language effort, to indicate users' skills in other languages.

Optional alternative: To use userboxes is a personal option but not the only one. An alternative to userboxes, for those who prefer to have user pages with a simpler layout, is found at WikiProject Keep It Simple.

Contents

[edit] Using existing userboxes

Userboxes are for the use of users on their own user pages. It may be considered uncivil to place any userboxes on any other user's page(s) without their permission. However, userboxes may be placed on non-mainspace talk/discussion pages by anyone. (See also Wikipedia:Talk page.)

[edit] Syntax

The standard syntax for adding a userbox to your user page (also known as transclusion) is: {{user name_of_box}}.

[edit] Optional substitution

You may decide to substitute the template code onto your user page using the syntax {{subst:user name_of_box}}. The use of "subst:" will ensure that the template is always displayed in its form when you add it to your user page, i.e. it will not reflect subsequent edits to the template. This method will lead to large amounts of code on your user page.

[edit] Creating a new userbox

For help with these instructions, ask a question at Wikipedia:Requested templates.
If you wish to offer an idea for a userbox, do so on the ideas page.

If you have designed a userbox that you would like to make available to others, you may wish to first display it on the New Userboxes talk page for community comment.

[edit] Which namespace?

Should your userbox be prefixed with Template:, User:, or Wikipedia:?

Userboxes may only be created or displayed in the Template, User, or Project Namespaces. Userboxes in the Template and Project namespaces are expected to adhere more tightly with policies and guidelines, such as neutral point of view and what Wikipedia is. Traditionally, content in User: space is given more leeway than in other namespaces, so userboxes in User: space might not be as encyclopedic in nature as those in Template: or Wikipedia: namespaces.

Template:
In the template namespace, userbox names must begin with "User " (e.g. Template:User Brazil)
User:
In the user namespace, you may create a subpage of your own user page or User:UBX.
Wikipedia:
Userboxes in the project namespace are generally for WikiProject or task force membership. Create it as a subpage to the WikiProject.

[edit] Caution about image use

The Wikimedia Commons has a large range of icons for use within boxes. However, if you select an image from somewhere else, make certain the image license is free. Wikipedia policy does not allow templates (which includes userboxes) or user pages to contain any copyrighted content not under free license; so, for example, "fair use" images are explicitly forbidden. This clause is to be interpreted strictly and without exception. See Wikipedia's fair use policy guidelines for more details.

[edit] Caution about user categories

[edit] Content restrictions

  • All userboxes are governed by the civility policy.
    • Userboxes must not include incivility or personal attacks.
    • Userboxes must not be inflammatory or divisive.
    • Wikipedia is not an appropriate place for propaganda, advocacy, or recruitment of any kind, commercial, political, religious, or otherwise, opinion pieces on current affairs or politics, self-promotion, or advertising.

Simply: If content is not appropriate on a user page, it is not appropriate within userboxes.

[edit] Content examples

Typical userbox content:

Typical verbs (others are possible):

  • drives, eats, edits, enjoys, likes, loves, plays, reads, speaks, understands, uses, and watches.

Some alternate combinations (other combinations are possible):

  • This user is <noun phrase>
  • This user is a member of <noun phrase>
  • This user is a fan of <noun phrase>
  • This user supports <noun phrase>
  • This user contributes to <noun phrase>
  • This user is interested in <noun phrase>
  • This user is fascinated by <noun phrase>
Potentially divisive words

Avoid verbs which may be used to suggest negative comparison, and would thus be potentially divisive, such as:

  • believes, considers, favors, finds, knows, prefers, thinks and wishes.

Avoid negative verb phrases which can be potentially divisive, such as:

  • dislikes, despises, hates, loathes

Also avoid compound sentences which are positive and negative, such as:

  • This user likes <noun phrase>, but does not like <another noun phrase>.

Essentially: Express what you like, rather than what you don't like. Express who you are, rather than who you aren't. Express what you do, rather than what you don't.

[edit] Constructing a userbox

[edit] How to construct the box

There are a number of box types to select from when deciding to make a userbox. The most commonly used design is the "Standard box". It has one square shaped area on the left ("id") and a rectangular area on the right ("info").

For ease of use, userboxes are made using maker-templates that have a number of parameters. Once the maker-template is saved, it is automatically transformed to HTML.

Template Parameters Meaning Value type
border-c The border color of the userbox. CSS color value (#hex or color name)
border-s The border size of the userbox. Width in pixels
id-c The background color of the id box. CSS color value
id-s The font size of the id box. Size in PostScript points
id-fc The font color of the id box text. CSS color value
id-p The distance between border and content of id box. CSS padding width value. px, pt
id-lh The distance between text lines of id box. CSS relative line height/length value. em
info-c The background color of info box. CSS color value
info-s The font size of info box. Size in PostScript points
info-fc The font color of info box. CSS color value
info-p The distance between border and content of info box. CSS padding width value. px, pt
info-lh The distance between text lines of info box. CSS relative line height/length value. em
id This is the content of the id box. Free-form
info This is the content of info box. Free-form

The id and info boxes can include text, links, and images using the usual Wikipedia syntax. Generally, the id box will contain a few letters or a 43px image, while the info box will contain a sentence with a link or two.

[edit] Userbox types
Code Appearance
Standard box
{{Userbox |border-c=#000 |border-s=1 |id-c=#fff |id-s=12 |id-fc=#000 |info-c=#039 |info-s=8 |info-fc=#fff |id=ID |info=Content}}

or {{Userbox |side-box colour |main box colour |side-box content |main box content}}

ID Content
Reverse box
{{Userbox-r |border-c=#000 |border-s=1 |id-c=#fff |id-s=12 |id-fc=#000 |info-c=#039 |info-s=8 |info-fc=#fff |id=ID |info=Content}}

or {{Userbox-r |side-box colour |main box colour |side-box content |main box content}}

Content ID
Double box
{{Userbox-2 |border-c=#000 |border-s=1 |id1-c=#fff |id1-s=12 |id1-fc=#000 |id2-c=#000 |id2-s=12 |id2-fc=#fff |info-c=#039 |info-s=8 |info-fc=#fff |id1=ID 1 |id2=ID 2 |info=Content}}

or {{Userbox-2 |side-box 1 colour |main box colour |side-box 1 content |message |side-box 2 content |border colour |side-box 2 colour |main box font-colour |box border thickness}}
Note: If omitted, border colour and side-box 2 colour default to the same colour as side-box 1, and font colour is black. Default border thickness is 1.

ID 1 Content ID 2
Mini box
{{Userbox-m |border-c=#000 |border-s=1 |id-c=#fff |id-s=12 |id-fc=#000 |id=ID}}

or {{Userbox-m |box colour |box content}}

ID

[edit] Userbox sampling templates

To make it easier to quote the generation code for a userbox in a uniform format, a template {{Userbox sample compact}} has been made available, which produces a picture of the userbox along with the code necessary to create it. To use it, just give it exactly the same parameters you would give the {{Userbox}} template. You must use subst:, or the template will not work properly. An example is shown below:

{{subst:Userbox sample compact|id=UBX|id-c=red|info=This is a '''[[WP:UBX|Userbox]]'''.}}

Produces:

{{Userbox | border-c = #999 | border-s = 1 | id-c = red | id-s = 14 | id-fc = black | info-c = #EEE | info-s = 8 | info-fc = black | id = UBX | info = This is a '''[[WP:UBX|Userbox]]'''. | float = left }}
UBX This is a Userbox.

There are not yet any similar templates available for userboxes created by the templates Userbox-r, Userbox-2 and Userbox-m.

[edit] Grouping userboxes

[edit] Using the Userboxtop template

Example 1
This user is a member of WikiProject Userboxes.
This user is interested in ancient Rome.
This user wants to be your friend.

As with the Babel box, there is a box to group userboxes together. Just make a list of userboxes with {{Userboxtop|box-name}} at the top, followed by your list of userboxes, and {{Userboxbottom}} at the bottom. For example, the box to the right is created using the following list:

{{Userboxtop |Example 1}}
{{Wikipedia:WikiProject Userboxes/Userbox}}
{{User:UBX/Rome}}
{{User:Nihiltres/Userboxes/Friendly}}
{{Userboxbottom}}

[edit] Using the boxboxtop template

If you wish an expandable list of userboxes you may try:

{{boxboxtop|Example2}} <BR> <div class="NavFrame" style="padding:0;border-style:none;"><br /> <div class="NavFrame" style="border-style:none;padding:0;"><br /> <div class="NavHead" style="background:#EDF1F1;text-align:left;text-style:normal"><br /> Caption</div><div class="NavContent" style="display:none;"><br /> </tt><i>Place your userboxes here...</i><tt><br /> </div></div></div><br /> {{boxboxbottom}}

(Of course you can put more than one such section inside a userbox, see Example 2 at right.)

Example2

You may also change the alignment by using 'right' or 'left' as the second parameter, or explicitly using parameter align. Thus, it is possible to create the same box on the right, but positioned on the left side of the page, by changing the first line from {{Userboxtop |Example 1}} to {{Userboxtop |Example 1|left}}.

[edit] Using the Babel grouping system

Similar results can be achieved with either of the following:

{{Babel-X |header=Example 1 |footer= |align=left |Wikipedia:WikiProject Userboxes/Userbox |Rome |:Nihiltres/Userboxes/Friendly}}

{{UBX-X |header=Example 1 |Wikipedia:WikiProject Userboxes/Userbox |Rome |:Nihiltres/Userboxes/Friendly}}

The older Babel grouping system can also be used, e.g. {{Babel-3|sv|no-4|rome}}. However, it only works for user boxes with the "User" prefix, which must then be dropped for the arguments. Also, boxes that need arguments of their own (such as {{User:UBX/Monty Python}}) cannot be used with Babel.

[edit] Using tables

A fourth alternative would be to table your userboxes. For example:

{| style="margin: 1em auto 1em auto"
| {{User:AusTerrapin/Box:Jazz Fusion}} {{User_USAFo5}}
|-
| {{user helper}} {{User:The Raven's Apprentice/Userboxes/User Warm}}
|}


would produce the following:

This user enjoys jazz-rock fusion.
This user helps out newcomers.
This user prefers warm weather.

[edit] Combining tables and the boxboxtop template

A fifth method of grouping boxes is done by combining Examples 2 and 4 together. Example 2 breaks DHTML interoperability. It works as intended on Internet Explorer; however, it does not work well with Firefox and Opera when additional hide/show sections are added. This solution provides proper rendering on all three web browsers and scales much better when it comes to the number of groups you want to have. The table property can be adjusted by adding width="100%" (adjusting its percentage or by using a pixel width multiple of the userbox) to add more than one column. Another property align="right" can be changed to place the userboxes left, right, or center of the page.

{|align="right" width="160px" style="background-color: transparent;"
|-
|<div>
{{boxboxtop| }}
<div class="NavFrame" style="padding: 0; border-style: none;">
<div class="NavFrame" style="border-style: none; padding: 0;">
<div class="NavHead" style="background: #edf1f1; text-align: left; text-style: normal;">
Caption</div><div class="NavContent" style="display: none;">
Place your userboxes here...
</div></div></div>
{{boxboxbottom}}
Place additional userbox groups here...
</div>
|}

[edit] Gallery

[edit] Languages

[edit] Interests and tastes

[edit] Life, status, and situation

[edit] Wikipedia-related

[edit] See also

[edit] External links