User:Theki/sandbox/userboxes

Userbox Documentation
This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.

Nonfree images may not be displayed in userboxes, and are subject to summary removal by any editor without any notice being required.

Sandbox reminder

 * Always practice or experiment in the Template:Userbox/sandbox or Template:Userbox/testcases
 * Once you are satisfied: Copy your code!
 * In your Browser's address bar, change "sandbox" or "testcases" to the name of your new Userbox.
 * Example:
 * CHANGE [ http://en.wikipedia.org/wiki/Template:Userbox/sandbox]
 * TO [ https://en.wikipedia.org/wiki/Template:Userbox/WhateverYourNewBoxNameIs]
 * If the name of your new Userbox is taken, create a different name.
 * You will be prompted to Start or Create your new Template Userbox!
 * Paste your code into the space provided.

Usage



 * All parameters are optional.
 * Images should normally be scaled to x45px or less.

Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here:

Microformats

 * bodyclass : This parameter is inserted into the "class" attribute for the userbox as a whole.
 * info-class : This parameter is inserted into the "class" attribute for the info component.

This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a userbox as containing hCard information about a person, for example, add the following parameter:


 * bodyclass    = vcard

or


 * info-class   = vcard

then (for example):


 * title        = …the books of Iain Banks

...and so forth.

Examples include:


 * - person
 * - group (WikiProject Microformats)
 * - place (Birmingham)

See WikiProject Microformats for more information on adding microformat information to Wikipedia.

Template Data
{ "description": "This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.", "params": { "bodyclass": { "label": "bodyclass", "description": "Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.", "type": "string", "default": "", "required": false },"border-c": { "label": "border-c", "description": "border color", "type": "string", "default": "#999", "required": false },"border-s": { "label": "border-s", "description": "border width in pixels", "type": "string", "default": "1", "required": false },"float": { "label": "float", "description": "left|right|none", "type": "string", "default": "left", "required": false },"id": { "label": "id", "description": "id image or text", "type": "string", "default": "", "required": false },"id-a": { "label": "id-a", "description": "id horizontal alignment left/center/right/justify", "type": "string", "default": "center", "required": false },"id-c": { "label": "id-c", "description": "id background color", "type": "string", "default": "#d0d0d0", "required": false },"id-fc": { "label": "id-fc", "description": "id font color", "type": "string", "default": "black", "required": false },"id-h": { "label": "id-h", "description": "id box height in pixels", "type": "string", "default": "45", "required": false },"id-lh": { "label": "id-lh", "description": "id line height", "type": "string", "default": "1.25em", "required": false },"id-op": { "label": "id-op", "description": "id other CSS parameters", "type": "string", "default": "", "required": false },"id-p": { "label": "id-p", "description": "id cell padding", "type": "string", "default": "0 1px 0 0", "required": false },"id-s": { "label": "id-s", "description": "id text size in points", "type": "string", "default": "14", "required": false },"id-w": { "label": "id-w", "description": "id box width in pixels", "type": "string", "default": "45", "required": false },"info-class": { "label": "info-class", "description": "Adds an HTML class attribute to the \"info\" HTML table-row, to allow for styling, emission of microformats, etc.", "type": "string", "default": "", "required": false },"info": { "label": "info", "description": "info text or image", "type": "string", "default": "", "required": false },"info-a": { "label": "info-a", "description": "info horizontal alignment left/center/right/justify", "type": "string", "default": "left", "required": false },"info-c": { "label": "info-c", "description": "info background color", "type": "string", "default": "#e0e0e0", "required": false },"info-fc": { "label": "info-fc", "description": "info font color", "type": "string", "default": "black", "required": false },"info-lh": { "label": "info-lh", "description": "info line height", "type": "string", "default": "1.25em", "required": false },"info-op": { "label": "info-op", "description": "info other CSS parameters", "type": "string", "default": "", "required": false },"info-p": { "label": "info-p", "description": "info padding", "type": "string", "default": "0 4px 0 4px", "required": false },"info-s": { "label": "info-s", "description": "info text size in points", "type": "string", "default": "8", "required": false },"nocat": { "label": "nocat", "description": "block page category declarations (see WP:NOCAT)", "type": "string", "default": "false", "required": false },"usercategory": { "label": "usercategory", "description": "user category (optional)", "type": "string", "default": "", "required": false },"usercategory2": { "label": "usercategory2", "description": "user category (optional)", "type": "string", "default": "", "required": false },"usercategory3": { "label": "usercategory3", "description": "user category (optional)", "type": "string", "default": "", "required": false },"usercategory4": { "label": "usercategory4", "description": "user category (optional)", "type": "string", "default": "", "required": false },"usercategory5": { "label": "usercategory5", "description": "user category (optional)", "type": "string", "default": "", "required": false } }}

Userbox Gallery Documentation
This Yy series of templates can create a userbox table that displays a list of userboxes along with their Wikitext and the pages that invoke each userbox template. Templates also display boxes for WikiProjects, portals, and notice boards.

The yy template series comprises the following nine templates:

Template:Yytop
Template:Yytop always comes first to create the three column headings and to size the columns. Template:Yytop may also be used to create a centered table title.   where:
 *   is the optional table title.
 *   is the optional column headings switch.
 *   creates three column headings (default)
 *   creates no column headings.

Example   creates:

Template:Yytop is very similar to Template:Usbktop except:
 * 1) Template:Yytop default sizes the three columns to 390, 250, and 80 pixels respectively. Template:Usbktop does no default column sizing.
 * 2) Template:Yytop places the linked labels  Wiki markup ,  userbox , and  where used  centered at the top of each column. Template:Usbktop places the labels Code and Result left justified at the top of the first two columns only.
 * 3) Template:Yytop may be used to create a centered table title.

Template:Yy
Template:Yy creates a single table row with the template Wiki markup, the template box, and a link to the list of pages that link to the called template.   where: A zero-width space may be used to represent a missing parameter.
 *   is the required template name.
 *   are up to 12 optional template parameters.

Examples   creates:

  creates:

Template:Yy is similar to Template:Usbk except:
 * 1) Template:Yy will pass up to 12 parameters to the called template. Template:Usbk will pass no more than three parameters to the called template.
 * 2) Template:Yy forces all cells to align to the left. Template:Usbk uses the default object alignment.
 * 3) Template:Yy uses the same category suppression as Template:Usbk.

Template:Yycat
Template:Yycat creates a reference to a category.   where:
 *   is the required category name.
 *   is the optional link to the category. (default=no)

Example   creates:

Template:Yytxt
Template:Yytxt creates a row of text in the table.   where: If all three optional text parameters are blank or missing, a blank row will be inserted.
 *   is the optional text for the table or first column.
 *   is the optional text for the second column
 *   is the optional text for the third column
 *   is the optional format parameter:
 *   creates a line of left-justified text (default)
 *   creates a line of table-centered text
 *   creates a line of right-justified text
 *   creates a line of left-justified text for each column
 *   creates a line of column-centered text for each column
 *   creates a line of right-justified text for each column
 *   recreates the column headings of Template:Yytop

Example   creates:

Template:Usbkbreak centers text on only the first two columns and has no other options.

Template:Yytab

 * See also Template:yytabcities—a shortcut for for location related userboxes.

Template:Yytab creates a pointer to another table. Template:Yytab may be used to break an overly large table into subtables.   where:
 *   (first positional argument) is the required name of a region, portal, noticeboard, WikiProject. (See Module:Portal/images)
 *   (second positional argument)is the optional address of the subtable. (default=Wikipedia:Userboxes/Location/ )
 *   is the optional description of the subtable. (default=  userbox templates)
 *   is the optional image file. (default image file from Module:Portal/images)
 *   is the optional image size. (default= )
 *   is the optional font size. (default= )
 *   is the optional stand alone switch.
 *   pointer is part of a table. (default)
 *   pointer in its own table.

Example   creates:

  creates:

Template:Yytab is somewhat similar to Template:usee.

Template:Yywp
Template:Yywp creates a WikiProject box.   where:
 *   is the required WikiProject base name.
 *   an optional project group base name if any.
 *   an optional project group type if any.
 *   an optional WikiProject box label. (default=WikiProject   or    )
 *   is an optional WikiProject folder name.
 *   is the optional image size. (default= )

Examples   creates:

and   creates:

Template:WikiProject box creates a smaller standalone WikiProject box.

Template:Yyp
Template:Yyp creates a portal box.   where:
 *   is the required portal name.
 *   is the optional image size. (default= )

Example   creates:

Template:Portal creates a smaller standalone portal box.

Template:Yynb
Template:Yynb creates a noticeboard box.   where:
 *   is the required noticeboard base name.
 *   is the optional image size. (default= )

Example   creates:

Template:Noticeboard box creates a smaller standalone notice board box.

Template:Yybottom
Template:Yybottom always comes last and completes the table.   where:
 *   is an optional comment to appear at the bottom right of the table.

Template:Usbkbottom is similar to Template:Yybottom but does not permit a comment line.

Table example
The following Wiki markup:

creates the following table: