Wikipedia:Userboxes/Design and construct
From Wikipedia, the free encyclopedia
Contents |
[edit] Designing a userbox
The following userbox design and creation guidelines apply equally to all user templates (including any userbox or userbox-like markup), regardless of whether they have been transcluded, substituted, or written from scratch. Userboxes that fail to meet these guidelines may be subject to deletion.
[edit] Content
Typical userbox content examples:
- This user <verb phrase> <noun phrase>
- 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>
Other combinations are obviously possible.
Other typical verbs (again, others are possible): drives, eats, edits, enjoys, favors, likes, loves, plays, prefers, reads, speaks, understands, uses, and watches.
Avoid the following verbs: considers, finds, knows, and thinks.
Also avoid compound sentences which are positive and negative, such as:
- This user likes <noun phrase>, but does not like <another noun phrase>.
[edit] Content restrictions
- All items in template and user space are governed by the civility policy.
- Userboxes must not include blatant incivility or personal attacks.
- Userboxes must not be intentionally inflammatory or divisive.
- Wikipedia is not an appropriate place for political campaigning.
Simply: If content is not appropriate on a user page, it is not appropriate within userboxes.
[edit] Caution about image use
- The Wikimedia Commons has a large range of icons for use within boxes. However, if you wish to select a different image to put in a userbox, 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, for legal reasons. See Wikipedia's fair use policy guidelines for more details.
[edit] Category inclusion
- Userboxes that include Category markup which adds the bearing userpage to a category must only categorize within subcategories of Category:Wikipedians.
- Names and descriptions of subcategories are subject to the same rules and restrictions as userbox content.
- Userboxes should not automatically include categories by default. Consider how useful the category would be to other editors before adding it to your userbox.
- Do not create categories which could potentially include all Wikipedians. For example, userboxes such as: "This user is a Wikipedian."; "This user is human."; "This user uses the internet"; etc., should not include category markup based on such criteria.
- Avoid categorizing "not"-based userboxes. For example: "This user does not like <noun phrase>."
[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 colour of the userbox. | CSS colour value (#hex or colour name) |
border-s | The border size of the userbox. | Width in pixels |
id-c | The background colour of the id box. | CSS colour value |
id-s | The font size of the id box. | Size in PostScript points |
id-fc | The font colour of the id box text. | CSS colour 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 colour of info box. | CSS colour value |
info-s | The font size of info box. | Size in PostScript points |
info-fc | The font colour of info box. | CSS colour 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. | Text |
info | This is the content of info box. | Text |
[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}} |
|
|||
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}} |
|
[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 }} |
|
There are not yet any similar templates available for userboxes created by the templates Userbox-r, Userbox-2 and Userbox-m.