This page documents an English Wikipediaproject content guideline. Editors should generally follow it, thoughexceptionsmay apply. Substantive edits to this page should reflectconsensus.When in doubt, discuss first onthis guideline's talk page. |
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. Such templates which fail to meet these guidelines may be subject to deletion. |
A guide to the userbox galleries |
An alphabetical list of all userbox galleries |
Auserbox(commonly abbreviated asUBX) is a small colored box (see examples to the right) designed to appear only on a Wikipedian'suser pageas a communicative notice about the user, in order to directly or indirectly help Wikipedians collaborate more effectively on articles.
The first userboxes were introduced to support theBabelinter-language effort by indicating the skills of users in other languages.
Be mindful that, like anything else you add to Wikipedia, userboxes you add will likely be public forever, even if you later have your user page deleted. (Like other Wikipedia pages, your user page will be regularly archived in the database dumps and may be archived by third parties, such as theInternet Archive.)
Using existing userboxes
Userboxes belong on their users' pages. In some cases, it may be considereduncivilto place userboxes on other users' pages without their permission (especiallyin a mean-spirited way—such as accusing a user ofracism,sexism,homophobia,transphobia,etc.). However, userboxes may be placed on non-mainspacetalk pages by anyone. (See alsoWikipedia:Talk page.)
The{{clear}}
template can be placed after the plain userbox if text is added on a new line immediately after it.
A gallery of existing userboxes can be found atWikipedia:Userboxes/Galleries.
Syntax
The standard syntax for adding a userbox to your user page (also known astransclusion) is:{{username_of_box}}
.
If you do not have any userboxes on your user page yet, you want to begin using them, and you want to add them down the right side of your user page starting at the top, then edit your user page and, at or near the top of the source for your user page, add{{Userboxtop |}}
,add the transclusion(s) for the userbox(es) you wish to include, and add{{userboxbottom}}
just after the last userbox transclusion. Please see the#Grouping_userboxessection for other ways of grouping and placing userboxes.
Optional substitution
You may decide tosubstitutethe template code onto your user page using the syntax{{subst:username_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.
Creating a new userbox
- If you wish to offer an idea for a userbox, do so on theideas page.
If you have designed a userbox that you would like to make available to others, you may wish to first display it on theNew Userboxes talk pagefor community comment.
Namespace
Thenamespaceyou place your userbox in matters. Userboxes mayonlybe created or displayed in theUser,Project(Wikipedia), orTemplatenamespaces.
So which prefix is best for your userbox:User:
,Wikipedia:
,orTemplate:
?
Since content inUser:
space represents individual editors more than the community, they are traditionally given more leeway than in other namespaces. Thus, userboxes inUser:
space may not be as directly collaborative in nature as those inTemplate:
orWikipedia:
namespaces, which are expected to adhere more tightly with certainpolicies and guidelines,especiallyNeutral point of viewandWhat Wikipedia is not.This should also be considered beforemovinga userbox from userspace to any other namespace.
User:
- To host a userbox in the user namespace, create asubpageof your own user page orUser:UBX.
Wikipedia:
- Userboxes in the project namespace are generally forWikiProjectortask forceusage. Simply create it as asubpageof the WikiProject (e.g.
Wikipedia:WikiProject Spaceflight/Userbox
). Template:
- In the template namespace, userbox names must begin with "
User
"(e.g.Template:User Brazil
orTemplate:User en
). - Please remember to add
nocat = true
and wrap the category inincludeonly
tags(seethis example diff) when using theTemplate
namespace. Otherwise, your userbox will automatically be categorized, causing inconvenience toWikiElves.
If you are uncertain if your userbox is in the correct namespace, consider presenting the userbox at theNew Userboxes talk pagefor community comment.
Userboxes and category use
A userbox can be coded to autocategorise any user pages whichtranscludethe userbox into one or moreuser categories.However,do notuse autocategorisation without good reason.
- Most userboxes refer to a single isolated characteristic of the user; unless the characteristic directly relates to the user'sability or willingness to collaborate on certain areas of or topics within Wikipedia,a user category should not exist for it and the userbox should not be used for categorisation.
- Users of the userbox can be located using theSpecial:WhatLinksHeretool from the userbox template. Networking between editors with similar interests or views is best done using aprojectspace essaywith a signup section for editors interested in networking.
- If there is a good reason for the user category, first create the category pages and include a description that explains its purpose and scope.
- User categories must besub-categoriesofCategory:Wikipedians.
- Names and descriptions of user categories are subject to the same rules and restrictions asuserbox content.
Userbox content
Content restrictions
- All userboxes are governed by thecivilitypolicy.
- Userboxesmust notincludeincivilityorpersonal attacks.
- Userboxesmust notbe inflammatory or substantially divisive.
- Wikipedia is notan appropriate place for:
- Propaganda, advocacy, or recruitment of any kind (commercial, political, religious, or otherwise)
- Opinion pieces, particularly on current affairs or politics
- Self-promotion or advertising
Simply:If content is not appropriate on other parts of auser page,it is not appropriate within userboxes.
Caution about image use
Wikimedia Commons has alarge range of iconsfor use within boxes. However, if you select an image from somewhere else, make certain the image has a free license. Templates (which includes userboxes and topicons) on user pages may not contain any copyrighted content not under free license; so, for example, "fair use"images are explicitly forbidden. This is interpreted strictly and without exception. SeeWikipedia's fair use policy guidelinesfor more details.
Caution about colours
Please be mindful of thecolour contrastguidelines atWP:COLOUR– low-contrast colours present accessibility barriers to people with colour-blindness or other visual disabilities.
Content examples
- The following section is not to be considered all-inclusive. As such, other word combinations (both appropriate and inappropriate) are obviously possible.
Typical userbox content:
- This user <verb phrase> <noun phrase>.
- This user <verb phrase> <noun phrase> <prepositional phrase>.
Typicalverbs:
- verbs of action: contributes (to), drives, eats, edits, plays, uses, watches
- verbs of comprehension: reads, speaks, understands
- verbs of preference: enjoys, likes, loves
Additional examples, using thelinkingverbis:
- This user is <noun phrase>.
- This user is a fan of <noun phrase>.
- This user is a member of <noun phrase>.
- This user is interested in <noun phrase>.
Another option is to allow changing the verb phrase usinga template parameter.This is especially useful in location userboxes:
- This user {{{1|lives in}}} <location>.
To avoid the awkward third-person phrasing ( "This user" ), you can use "{{#titleparts: {{PAGENAME}} | 1 | 1 }}
"(without the quotes) to insert the name of the user that includes it on their page (e.g."{{#titleparts: {{PAGENAME}} | 1 | 1 }} uses second-person phrasing
"produces" Userboxes uses second-person phrasing ").
Potentially divisive words
Avoid verbs (often followed by the word "that") which may be used to suggest negative comparison and would thus be potentially divisive, such as:
- believes, considers, finds, knows, prefers, thinks, 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 do like, rather than what you don't like. Express what you comprehend, rather than what you don't comprehend. Express what you do, rather than what you don't. Express who you are, rather than who you aren't.
Design: 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 label") and a larger rectangular space on the right ("info area").
For ease of use, userboxes are typically made using maker-templates that have a number of parameters.
Parameter | Applies to | Syntax and Comments on Value Types |
---|---|---|
border-c | Bordercolorfor the overall userbox. | CSS color stringas in#hexor a CSS named color. (E.g.#f00orredor#ff0000). |
border-s | Borderline thicknessfor the overall userbox. | Unit-less numerical value for border size/width,equivalentto pixels, but do not append 'px' to the number. E.g.border-s = 3. |
id-c | Backgroundcolorfor theidlabel area of the userbox.
|
CSS color string (hex or name) |
id-s | Textsizefor theidlabel area. | Unit-less numerical value for font-size(do not append 'px') |
id-fc | Textcolorfor theidlabel. | CSS color string (hex or name) |
id-p | Space/paddingBetween theidcontent and the userbox border. |
This cell padding uses a CSS length value. Unlike the other unit-less values, thismusthave aCSS length unitsuch aspxorpt.(E.g.id-p = 8px). |
id-lh | Vertical distance betweenidtext lines (line-height). | It is recommended to use unit-less numerical values for line-height. Optionally, CSS length unitscanbe used for this parameter. |
info-c | Background color for theinfoarea of the userbox.
|
CSS color string (hex or name) |
info-s | Textsizefor theinfoarea. | Unit-less numerical value for font-size(do not append 'px'). |
info-fc | Textcolorfor theinfoarea. | CSS color string (hex or name) |
info-a | ⇦Horizontal text alignment for info area only.⇨
|
A text string of, one of:left,right,orcenter. Do notenclose the key word in quotes. (E.g.info-a = center). |
info-lh | Vertical distance betweeninfotext lines (line-height). | It is recommended to use unit-less numerical values for line-height. Optionally, CSS length unitscanbe used for this parameter. |
id | Specifycontentfor the the id label. | Free-form text (E.g.id = Co) |
info | Specifycontentfor the info area. | Free-form text (E.g.info = Cobalt is Very Blue) |
Theidlabel andinfocontent area can include text, links, and/or images, using the usual Wikipedia syntax. Typically, theinfobox will contain a sentence with a link or two, while theidbox will contain a few letters, a symbol, or a 43px image.
Userbox types
Types of Userboxes | ||||
---|---|---|---|---|
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}} |
| |||
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}} |
| |||
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}}
|
| |||
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}} |
|
Userbox sampling templates
Thefactual accuracyof parts of this Wikipedia page (those related to{{Userbox sample compact}} )may be compromised due to out-of-date information.Please help update this Wikipedia page to reflect recent events or newly available information. Relevant discussion may be found onthe talk page. |
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 usesubst:,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 }} |
|
There are not yet any similar templates available for userboxes created by the templatesUserbox-r,Userbox-2andUserbox-m.
Grouping userboxes
Using the Userboxtop template
Example 1
|
As with theBabelbox, 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}} {{User WikiProject Userboxes}} {{User:UBX/Rome}} {{User:Nihiltres/Userboxes/Friendly}} {{Userboxbottom}}
Using collapsible tables
Example 2
|
If you wish to group your userboxes into expandable lists in the{{Userboxtop}}
template, one way of doing this is by using collapsible tables with certain classes. Wikipedia's Mediawiki configuration attempts to make this happen through a combination ofECMAScriptandCSS.This method is accessible to users with ECMAScript (jScript/JavaScript) disabled, and should work in most modern browsers (it is the method used by{{Navbox}}
).
- Using the codes inHelp:Collapsingworks much better and simpler using normal wiki table markup!
{{Userboxtop|Example 2}}
<tableclass="collapsible collapsed"style="width: 100%; background: transparent; color: inherit;">
<tr><thstyle="background:lavender;">(Caption)</th></tr>
<tr><td>
(Place your userboxes here...)
</td></tr>
</table>
{{Userboxbottom}}
Include 'collapsed
' if you want the box to start closed, omit it if you want the box to start open. You can also use multiple tables to get separate collapsible parts like in the example to the right.
You can now use{{Userboxgroup}}
to create this kind of box.
Using the Babel grouping system
The Babel grouping system can also be used, e.g.{{Babel|sv|no-4|in Rome}}
,which generates:
Wikipedia:Babel | ||||
---|---|---|---|---|
| ||||
Search user languages |
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}} or{{User Translator}}
) are difficult to use with the Babel system. They can be used by including parameters with magic word replacing the vertical bars and equals signs, e.g.{{Babel|fr-5|ja-2|Translator{{!}}fr{{!}}project{{=}}no}}
(result below), but this behavior is not officially supported by the template, and may not work in all contexts and break at some point in the future.
Wikipedia:Babel | ||||||
---|---|---|---|---|---|---|
| ||||||
Search user languages |
Using tables
Another alternative would be totableyour userboxes:
{| style= "margin: 1em auto;" |+ example 6 |- | {{User:AusTerrapin/Box:Jazz Fusion}} {{User_USAFo5}} |- | {{User helper}} {{User:The Raven's Apprentice/Userboxes/User Warm}} |}
would produce the following:
| ||||
|
To center one userbox use this coding:
{| style= "margin: 1em auto;" |+ example 7 |- | {{User:Saoshyant/Userboxes/User oops}} |}
which produces:
|