Difference between revisions of "BattleTechWiki:Userboxes"

m (Updating)
m (removing "Template:Short description" as it is not working as needed)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{WIP}}
 
{{WIP}}
{{Short description|Ways for users to describe themselves}}
+
 
 
{{about||the WikiProject collaboration on userboxes|BattleTechWiki:Project Userboxes|userbox-like recognitions given by users to other users|BattleTechWiki:Awards}}
 
{{about||the WikiProject collaboration on userboxes|BattleTechWiki:Project Userboxes|userbox-like recognitions given by users to other users|BattleTechWiki:Awards}}
 
   
 
   
Line 63: Line 63:
  
 
=== Content restrictions ===
 
=== Content restrictions ===
{{shortcut|WP:UBCR}}
+
{{shortcut|BTW:UBCR}}
*All userboxes are governed by the [[Wikipedia:Civility|civility]] policy.
+
*All userboxes are subject to the same rules and restrictions as {{cl|Policies|our polices}}.
**Userboxes '''must not''' include [[Wikipedia:Civility|incivility]] or [[WP:NPA|personal attacks]].
+
**Userboxes '''must not''' include incivility or personal attacks.
 
**Userboxes '''must not''' be inflammatory or substantially divisive.  
 
**Userboxes '''must not''' be inflammatory or substantially divisive.  
*[[WP:NOT#Wikipedia_is_not_a_soapbox|Wikipedia is not]] an appropriate place for:
+
*The BTW is not an appropriate place for:
 
** Propaganda, advocacy, or recruitment of any kind (commercial, political, religious, or otherwise)
 
** Propaganda, advocacy, or recruitment of any kind (commercial, political, religious, or otherwise)
 
** Opinion pieces, particularly on current affairs or politics
 
** Opinion pieces, particularly on current affairs or politics
 
** Self-promotion or advertising
 
** Self-promotion or advertising
  
'''Simply:''' If content is not appropriate on other parts of a [[Wikipedia:User page|user page]], it is not appropriate within userboxes.
+
'''Simply:''' If content is not appropriate on other parts of BTW, it is not appropriate within userboxes.
  
 
=== Caution about image use ===
 
=== Caution about image use ===
Wikimedia Commons has a [[:commons:Category:Icons|large range of icons]] for 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. See [[Wikipedia:Non-free content criteria#Policy|Wikipedia's fair use policy guidelines]] for more details.
+
* Wikimedia Commons has a [[:commons:Category:Icons|large range of icons]] for use within boxes. However, if you select an image from somewhere else, make certain the image has a free license.  
 +
* Currently BTW uses both [https://icon-sets.iconify.design/ooui/ OOUI] and [https://icon-sets.iconify.design/mdi/ Material Design Icons] (Where OOUI will be replaced by MDI in time)
 +
* Templates on BTW may not contain any copyrighted content not under free license. This is interpreted strictly and without exception.
  
 
=== Caution about colours ===
 
=== Caution about colours ===
Please be mindful of the [[WP:Colour contrast|colour contrast]] guidelines at [[WP:COLOUR]] – low-contrast colours present accessibility barriers to people with colour-blindness or other visual disabilities.
+
Please be mindful of the color contrast guidelines at [[Help:Color]] – low-contrast colours present accessibility barriers to people with colour-blindness or other visual disabilities.
 
{{clear}}
 
{{clear}}
  
Line 84: Line 86:
 
:''The following section is not to be considered all-inclusive. As such, other word combinations (both appropriate and inappropriate) are obviously possible.''
 
:''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:
 
Typical userbox content:
* This user <[[verb phrase]]> <[[noun phrase]]>.
+
* This user <[[wikt:verb phrase|verb phrase]]> <[[wikt:noun phrase|noun phrase]]>.
* This user <[[verb phrase]]> <[[noun phrase]]> <[[prepositional phrase]]>.
+
* This user <[[wikt:verb phrase|verb phrase]]> <[[wikt:noun phrase|noun phrase]]> <[[wikt:prepositional phrase|prepositional phrase]]>.
  
Typical [[verb]]s:
+
Typical [[wikt:verb|verb]]s:
 
* verbs of action: contributes (to), drives, eats, edits, plays, uses, watches
 
* verbs of action: contributes (to), drives, eats, edits, plays, uses, watches
 
* verbs of comprehension: reads, speaks, understands
 
* verbs of comprehension: reads, speaks, understands
 
* verbs of preference: enjoys, likes, loves
 
* verbs of preference: enjoys, likes, loves
  
Additional examples, using the [[Copula (linguistics)|linking]] verb [[wikt:is#English|is]]:
+
Additional examples, using the linking verb [[wikt:is#English|is]]:
 
* This user is <noun phrase>.
 
* This user is <noun phrase>.
 
* This user is a fan of <noun phrase>.
 
* This user is a fan of <noun phrase>.
Line 98: Line 100:
 
* This user is interested in <noun phrase>.
 
* This user is interested in <noun phrase>.
  
Another option is to allow changing the verb phrase using [[WP:PARAMETER|a template parameter]]. This is especially useful in location userboxes:
+
Another option is to allow changing the verb phrase using a template parameter. This is especially useful in location userboxes:
 
* This user {{(((}}1{{!}}lives in{{)))}} <location>.
 
* This user {{(((}}1{{!}}lives in{{)))}} <location>.
  
Line 116: Line 118:
  
 
=== Design: How to construct the box ===
 
=== Design: How to construct the box ===
{{anchor|Constructing a userbox|reason=Help:Userbox_Maker refers links to this title; others might also.}}
 
 
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''").
 
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''").
  
Line 127: Line 128:
 
|border-c
 
|border-c
 
|<span style="border:1px solid #333;">The '''border color''' of the userbox.</span>
 
|<span style="border:1px solid #333;">The '''border color''' of the userbox.</span>
|[[Web colors|CSS color value]] ([[hexadecimal|#hex]] or color name)
+
|[[w:Web colors|CSS color value]] ([[w:hexadecimal|#hex]] or color name)
 
|-
 
|-
 
|border-s
 
|border-s
Line 139: Line 140:
 
|id-s
 
|id-s
 
|The font <span style="font-size:150%">'''size'''</span> of the id box.
 
|The font <span style="font-size:150%">'''size'''</span> of the id box.
|Size in [[Point (typography)|PostScript points]]
+
|Size in [[w:Point (typography)|PostScript points]]
 
|-
 
|-
 
|id-fc
 
|id-fc
Line 147: Line 148:
 
|id-p
 
|id-p
 
|The distance between border and content of id box.
 
|The distance between border and content of id box.
|CSS padding width value. [[Pixel|px]], [[Point (typography)|pt]]
+
|CSS padding width value. [[w:Pixel|px]], [[w:Point (typography)|pt]]
 
|-
 
|-
 
|id-lh
 
|id-lh
 
|The distance between text lines of id box.
 
|The distance between text lines of id box.
|CSS relative line height/length value. [[Em (typography)|em]]
+
|CSS relative line height/length value. [[w:Em (typography)|em]]
 
|-
 
|-
 
|info-c
 
|info-c
Line 159: Line 160:
 
|info-s
 
|info-s
 
|The font <span style="font-size:150%">'''size'''</span> of info box.
 
|The font <span style="font-size:150%">'''size'''</span> of info box.
|Size in [[Point (typography)|PostScript points]]
+
|Size in [[w:Point (typography)|PostScript points]]
 
|-
 
|-
 
|info-fc
 
|info-fc
Line 182: Line 183:
 
|}
 
|}
  
The '''id''' and '''info''' boxes can include text, links, and images using the usual Wikipedia syntax. Generally, the '''info''' box will contain a sentence with a link or two, while the '''id''' box will contain a few letters or a 43px image.
+
The '''id''' and '''info''' boxes can include text, links, and images using the usual MediaWiki syntax. Generally, the '''info''' box will contain a sentence with a link or two, while the '''id''' box will contain a few letters or a 43px image.
  
 
===== Userbox types =====
 
===== Userbox types =====
Line 215: Line 216:
 
''or'' <kbd><nowiki>{{Userbox-m |box colour |box content}}</nowiki></kbd>
 
''or'' <kbd><nowiki>{{Userbox-m |box colour |box content}}</nowiki></kbd>
 
| style="width:243px; background: #FFF;"|{{Userbox-m |border-c=#000 |border-s=1 |id-c=#FFF |id-s=12 |id-fc=#000 |id=ID}}
 
| style="width:243px; background: #FFF;"|{{Userbox-m |border-c=#000 |border-s=1 |id-c=#FFF |id-s=12 |id-fc=#000 |id=ID}}
|}
 
 
===== Userbox sampling templates =====
 
To make it easier to quote the generation code for a userbox in a uniform format, a template {{tl|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 {{tl|Userbox}} template. You must use '''subst:''', or the template will not work properly. An example is shown below:
 
:<nowiki>{{subst:Userbox sample compact|id=UBX|id-c=red|info=This is a '''[[WP:UBX|Userbox]]'''.}}</nowiki>
 
Produces:
 
 
{| style="padding: 2px; border-spacing: 0px;" border="1"
 
|-
 
| style="width: 350px; text-align: left; font-size: 8pt; color: black;  font-family: Arial; " | {{Userbox &#124; border-c = #999 &#124; border-s = 1 &#124; id-c = red &#124; id-s = 14 &#124; id-fc = black &#124; info-c = #EEE &#124; info-s = 8 &#124; info-fc = black &#124; id = {{#switch:UBX
 
|{{{logo}}} = <nowiki>{{{logo}}}</nowiki>
 
|{{{3}}} = <nowiki>{{{3}}}</nowiki>
 
|UBX = <nowiki>UBX</nowiki>
 
|id}} &#124; info = {{#switch:This is a '''[[WP:UBX|Userbox]]'''.
 
|This is a '''[[WP:UBX|Userbox]]'''. = <nowiki>This is a '''[[WP:UBX|Userbox]]'''.</nowiki>
 
|{{{4}}} = <nowiki>{{{4}}}</nowiki>
 
|<nowiki>''info''</nowiki>}} &#124; float = left }}
 
 
| <div style="float: left; border: 1px solid red; margin: 1px;">
 
{| style="width: 238px; background: #EEE;"
 
| style="width: 45px; height: 45px; background: red; text-align: center; font-size: 14pt; color: #000;" | '''UBX'''
 
| style="font-size: 8pt; padding: 4pt; line-height: 1.25em; color: #000;" | This is a '''[[WP:UBX|Userbox]]'''.
 
|}</div>
 
 
|}
 
 
There are not yet any similar templates available for userboxes created by the templates ''Userbox-r'', ''Userbox-2'' and ''Userbox-m''.
 
 
== Grouping userboxes ==
 
=== Using the Userboxtop template ===
 
{{Userboxtop|Example 1}}
 
  {{User WikiProject Userboxes}}
 
  {{User:UBX/Rome}}
 
  {{User:Nihiltres/Userboxes/Friendly}}
 
{{Userboxbottom}}
 
 
As with the [[Wikipedia:babel|Babel]] box, there is a box to group userboxes together. Just make a list of userboxes with {{[[Template:Userboxtop|Userboxtop]]|box-name}} at the top, followed by your list of userboxes, and {{Tl|Userboxbottom}} at the bottom. For example, the box to the right is created using the following list:
 
 
{{Tl|Userboxtop|Example 1}}
 
{{Tl|User WikiProject Userboxes}}
 
{{Tlu|User:UBX/Rome}}
 
{{Tlu|User:Nihiltres/Userboxes/Friendly}}
 
{{Tl|Userboxbottom}}
 
 
==== Using collapsible tables ====
 
{{Userboxtop|Example 2}}
 
  <!--Begin of first userboxes group-->
 
  <table class="collapsible autocollapse" style="width: 100%; background: transparent; color: inherit; border-spacing: 0px;">
 
    <tr><th style="background:yellow;">My yellow userboxes</th></tr>
 
    <tr><td>
 
      {{Userbox|orange|yellow|[[File:Crystal kthememgr.png|40px]]|Sample userbox #1.}}
 
      {{Userbox|orange|yellow|[[File:Crystal kthememgr.png|40px]]|Sample userbox #2.}}
 
      {{Userbox|orange|yellow|[[File:Crystal kthememgr.png|40px]]|Sample userbox #3.}}
 
    </td></tr>
 
  </table>
 
  <!--Begin of second userboxes group-->
 
  <table class="collapsible autocollapse" style="width: 100%; background: transparent; color: inherit; border-spacing: 0px;">
 
    <tr><th style="background:purple;color:white;">My purple userboxes</th></tr>
 
    <tr><td>
 
      {{Userbox|info-c=purple |info-fc=white |id=[[File:Crystal kthememgr.png|40px]]|info=Sample userbox #4.}}
 
      {{Userbox|info-c=purple |info-fc=white |id=[[File:Crystal kthememgr.png|40px]]|info=Sample userbox #5.}}
 
      {{Userbox|info-c=purple |info-fc=white |id=[[File:Crystal kthememgr.png|40px]]|info=Sample userbox #6.}}
 
    </td></tr>
 
  </table>
 
{{Userboxbottom}}
 
 
If you wish to group your userboxes into expandable lists in the {{Tlx|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 of [[ECMAScript]] and [[Cascading Style Sheets|CSS]]. This method is accessible to users with ECMAScript (jScript/JavaScript) disabled, and should work in most modern browsers (it is the method used by {{Tlx|Navbox}}).
 
:Using the codes in [[Help:Collapsing]] works much better and simpler using normal wiki table markup!
 
 
<syntaxhighlight lang="HTML5">
 
{{Userboxtop|Example 2}}
 
<table class="collapsible collapsed" style="width: 100%; background: transparent; color: inherit;">
 
  <tr><th style="background:lavender;">(Caption)</th></tr>
 
  <tr><td>
 
    (Place your userboxes here...)
 
  </td></tr>
 
</table>
 
{{Userboxbottom}}
 
</syntaxhighlight>
 
 
Include '<code>collapsed</code>' 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 {{tlx|Userboxgroup}} to create this kind of box.
 
 
=== Using the Babel grouping system ===
 
The Babel grouping system can also be used, e.g. {{Tlx|Babel|sv|no-4|in Rome}}, which generates:
 
 
{{Babel|sv|no-4|in 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 {{Tlu|User:UBX/Monty Python}}) cannot be used with the Babel system.
 
 
=== Using tables ===
 
Another alternative would be to [[Wikipedia:How_to_use_tables|table]] your userboxes:
 
 
<pre>
 
{| style="margin: 1em auto;"
 
|+ example 6
 
|-
 
| {{User:AusTerrapin/Box:Jazz Fusion}} {{User_USAFo5}}
 
|-
 
| {{User helper}} {{User:The Raven's Apprentice/Userboxes/User Warm}}
 
|}
 
</pre>
 
 
would produce the following:
 
 
{| style="margin: 1em auto;"
 
|+ example 6
 
|-
 
| {{User:AusTerrapin/Box:Jazz Fusion}} {{User_USAFo5}}
 
|-
 
| {{User helper}} {{User:The Raven's Apprentice/Userboxes/User Warm}}
 
|}
 
 
To center one userbox use this coding:
 
 
<pre>
 
{| style="margin: 1em auto;"
 
|+ example 7
 
|-
 
| {{User:Deadfire/Userboxes/User oops}}
 
|}
 
</pre>
 
 
which produces:
 
 
{| style="margin: 1em auto;"
 
|+ example 7
 
|-
 
| {{User:Deadfire/Userboxes/User oops}}
 
 
|}
 
|}
  
Line 354: Line 225:
 
<noinclude>
 
<noinclude>
 
[[Category:Userboxes|Userboxes]]
 
[[Category:Userboxes|Userboxes]]
[[Category:WikiProject Userboxes|Wikipedia]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 16:59, 30 August 2023

Crystal kthememgr.svgA userbox is a small rectangular box that looks like this. More examples below.
Userboxes can come in many different styles and colors.Crystal package-plain.svg
Userbox love.svgUserboxes can have one or two sideboxes.Ark-icon.svg

A userbox (commonly abbreviated as UBX) is a small colored box (see examples to the right) display on a user's "user" page. As a communicative notice about the user, in order to directly or indirectly help other editors collaborate more effectively on articles.

Be mindful that like anything else you add to BTW, userboxes you add will likely be public forever, even if you later have your user page deleted. (Like other MediaWiki pages, your user page will be regularly archived in the database dumps and may be archived by third parties such as the Internet Archive.)

Using existing userboxes[edit]

Userboxes belong on their users' pages, however they may be placed on non-mainspace talk pages by anyone. In some cases, it may be considered uncivil to place userboxes on other users' pages without their permission (especially in a mean-spirited way that would go against our policies

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 at BattleTechWiki:Userboxes/Galleries.

Syntax[edit]

The standard syntax for adding a userbox to your user page (also known as transclusion) is: {{user name_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.

Optional substitution[edit]

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.

Creating a new userbox[edit]

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 Project Userboxes' talk page for community comment.

Namespace[edit]

The namespace you place your userbox in matters. Userboxes may only be created or displayed in the User, Project (BattleTechWiki), or Template namespaces.

How do I create a userbox in which prefix?[edit]

User:
To host a userbox in the user namespace, simply create a subpage of your own user page.
BattleTechWiki:
Userboxes in the project namespace are generally for projects. Simply create it as a [subpage of the Project (e.g. BattleTechWiki:Project Factions/Userbox).
Template:
In the template namespace, userbox names must begin with "User " (e.g. Template:User en)

If you are uncertain if your userbox is in the correct namespace, consider presenting the userbox at the Project Userboxes' talk page for community comment.

Userboxes and category use[edit]

  • A userbox can be coded to autocategorise any user pages which transclude the userbox into one or more user categories. However, do not use autocategorisation without good reason.
  • Most userboxes refer to a single isolated characteristic of the user; unless the characteristic directly relates to the user's ability or willingness to collaborate on certain areas of or topics, 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 the Special:WhatLinksHere tool from the userbox template. Networking between editors with similar interests or views is best done using our Discord community.
  • 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.
  • Names and descriptions of user categories are subject to the same rules and restrictions as our polices.

Userbox content[edit]

Content restrictions[edit]

  • All userboxes are subject to the same rules and restrictions as our polices.
    • Userboxes must not include incivility or personal attacks.
    • Userboxes must not be inflammatory or substantially divisive.
  • The BTW is not an 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 BTW, it is not appropriate within userboxes.

Caution about image use[edit]

  • 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 has a free license.
  • Currently BTW uses both OOUI and Material Design Icons (Where OOUI will be replaced by MDI in time)
  • Templates on BTW may not contain any copyrighted content not under free license. This is interpreted strictly and without exception.

Caution about colours[edit]

Please be mindful of the color contrast guidelines at Help:Color – low-contrast colours present accessibility barriers to people with colour-blindness or other visual disabilities.

Content examples[edit]

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:

Typical verbs:

  • 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 the linking verb is:

  • 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 using a 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[edit]

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[edit]

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 typically made using maker-templates that have a number of parameters.

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-a The horizontal alignment of text in info box. left/right/center/justify
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 MediaWiki syntax. Generally, the info box will contain a sentence with a link or two, while the id box will contain a few letters or a 43px image.

Userbox types[edit]

See also[edit]