Infogalactic:Userboxes

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Infogalactic logo 003 125.png A userbox is a small rectangular box that looks like this. More examples below.
Userboxes can come in many different styles and colors. Infogalactic logo 003 125.png
Infogalactic logo 003 125.png Userboxes can have one or two sideboxes. Infogalactic logo 003 125.png

A userbox is a small colored box (see examples to the right) designed to appear only on an Infogalaxian's user page as a communicative notice about the user, in order to directly or indirectly help Infogalaxians collaborate more effectively on articles.

Galleries

For lists of userboxes which are readily-available, please see the galleries:

Adding a userbox to your user page

The standard syntax for adding a userbox to your user page is: {{user name_of_box}}.


Caution about image use

Make sure the image you select has a free license. Templates (which includes userboxes) on user pages may not contain any copyrighted content not under free license; so, for example, "fair use" images are forbidden.

Constructing a userbox

Namespace

Template:
To create a userbox in the template namespace, simply create the name of the userbox page beginning with the template prefix above.
User:
To host a userbox in the user namespace, simply create a subpage of your own user page.

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 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-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 Infogalactic syntax. Generally, the id box will contain a sentence with a link or two, while the info box will contain a few letters or a 43px image.

Userbox types

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 '''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 = ''info'' | 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.

Grouping userboxes

Using the Userboxtop template

Example 1
Infogalactic logo 003 125.png Sample userbox #1.
Infogalactic logo 003 125.png Sample userbox #2.
Infogalactic logo 003 125.png Sample userbox #3.

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}}
{{Userbox|orange|yellow|[[File:Infogalactic_logo_003_125.png|40px]]|Sample userbox #1.}}       
{{Userbox|orange|yellow|[[File:Infogalactic_logo_003_125.png|40px]]|Sample userbox #2.}}
{{Userbox|orange|yellow|[[File:Infogalactic_logo_003_125.png|40px]]|Sample userbox #3.}}
{{Userboxbottom}}

Using collapsible tables

Example 2
My yellow userboxes
Infogalactic logo 003 125.png Sample userbox #1.
Infogalactic logo 003 125.png Sample userbox #2.
Infogalactic logo 003 125.png Sample userbox #3.
My purple userboxes
Infogalactic logo 003 125.png Sample userbox #4.
Infogalactic logo 003 125.png Sample userbox #5.
Infogalactic logo 003 125.png Sample userbox #6.

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.

 {{Userboxtop|Example 2}}
 <table class="collapsible collapsed" style="width: 100%; background: transparent; color: inherit;">
   <tr><th class="navbox-title">(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.