Template:Userbox

Template page
Revision as of 18:32, 24 December 2023 by Kenopsia (talk | contribs) (Usage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usage

{{Userbox
| bodyclass     = <!--Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.-->
| border-c      = <!--border color (default=id-c)-->
| border-s      = <!--border width in pixels (default=1)-->
| float         = <!--left|right|none (default=left)-->
| id            = <!--id image or text (standard height=x45px)-->
| id-class      = <!--Adds an HTML class attribute to the "id" HTML table cell, to allow for styling, emission of microformats, etc.-->
| id-a          = <!--id horizontal alignment left/center/right/justify (default=center)-->
| id-c          = <!--id background color (default=#d0d0d0)-->
| id-fc         = <!--id font color (default=black)-->
| id-h          = <!--id box height in pixels (default=45)-->
| id-lh         = <!--id line height (default=1.25em)-->
| id-op         = <!--id other CSS parameters-->
| id-p          = <!--id cell padding (default=0 1px 0 0)-->
| id-s          = <!--id text size in points (default=14)-->
| id-w          = <!--id box width in pixels (default=45)-->
| info-class    = <!--Adds an HTML class attribute to the "info" HTML table cell, to allow for styling, emission of microformats, etc.-->
| info          = <!--info text or image-->
| info-a        = <!--info horizontal alignment left/center/right/justify (default=left)-->
| info-c        = <!--info background color (default=#e0e0e0)-->
| info-fc       = <!--info font color (default=black)-->
| info-lh       = <!--info line height (default=1.25em)-->
| info-op       = <!--info other CSS parameters-->
| info-p        = <!--info padding (default=0 4px 0 4px)-->
| info-s        = <!--info text size in points (default=8)-->
| usercategory  = <!--user category (optional)-->
| usercategory2 = <!--user category (optional)-->
| usercategory3 = <!--user category (optional)-->
| nocat         = <!--block page category declarations; see [[w:WP:NOCAT]] (default=false)-->
}}
  • All parameters are optional
  • Images should normally be scaled to x45px or less.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Template:Template parameter usage

TemplateData for Userbox

<TemplateData> { "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.", "format": "block", "params": { "bodyclass": { "label": "Body – Class Attribute", "description": "Adds an HTML class attribute to the entire template’s HTML table, to allow for styling, emission of microformats, etc.", "type": "string" }, "border-c": { "label": "Body – Border Color", "description": "border color", "default": "#999", "type": "string" }, "border-s": { "label": "Body – Border Width", "description": "border width in pixels", "default": "1", "type": "number" }, "float": { "label": "Body – Float", "description": "left|right|none", "suggestedvalues": [ "left", "right", "none" ], "default": "left", "type": "string" }, "id": { "label": "ID", "description": "id image or text", "suggested": true, "type": "line" }, "id-class": { "label": "ID – Class Attribute", "description": "Adds an HTML class attribute to the “id” HTML table cell, to allow for styling, emission of microformats, etc.", "type": "string" }, "id-c": { "label": "ID – Background Color", "description": "id background color", "default": "#D0D0D0", "type": "string" }, "id-fc": { "label": "ID – Text Color", "description": "id font color", "default": "black", "type": "string" }, "id-h": { "label": "ID – Box Height", "description": "id box height in pixels", "default": "45", "type": "number" }, "id-w": { "label": "ID – Box Width", "description": "id box width in pixels", "default": "45", "type": "number" }, "id-p": { "label": "ID – Padding", "description": "id cell padding", "type": "string", "default": "0 1px 0 0", "required": false }, "id-s": { "label": "ID – Text Size", "description": "id text size in points", "type": "number", "default": "14", "required": false }, "id-lh": { "label": "ID – CSS line-height", "description": "id line height", "type": "string", "default": "1.25em", "required": false }, "id-a": { "label": "ID – Horizontal Alignment", "description": "id horizontal alignment left/center/right/justify", "type": "string", "default": "center", "required": false }, "id-op": { "label": "ID – Other CSS Parameters", "description": "id other CSS parameters", "type": "string", "required": false }, "info": { "label": "Info", "description": "info text or image", "required": true, "type": "content" }, "info-class": { "label": "Info – Class Attribute", "description": "Adds an HTML class attribute to the “info” HTML table cell, to allow for styling, emission of microformats, etc.", "type": "string" }, "info-c": { "label": "Info – Background Color", "description": "info background color", "default": "#E0E0E0", "type": "string" }, "info-fc": { "label": "Info – Text Color", "description": "info font color", "default": "black", "type": "string" }, "info-p": { "label": "Info – Padding", "description": "info padding", "default": "0 4px 0 4px", "type": "string" }, "info-s": { "label": "Info – Text Size", "description": "info text size in points", "default": "8", "type": "number" }, "info-lh": { "label": "Info – CSS line-height", "description": "info line height", "default": "1.25em", "type": "string" }, "info-a": { "label": "Info – Horizontal Alignment", "description": "info horizontal alignment left/center/right/justify", "suggestedvalues": [ "left", "center", "right", "justify" ], "default": "left", "type": "string" }, "info-op": { "label": "Info – Other CSS Parameters", "description": "info other CSS parameters", "type": "string" }, "usercategory": { "label": "User Category 1", "description": "user category (optional)", "type": "string" }, "usercategory2": { "label": "User Category 2", "description": "user category (optional)", "type": "string" }, "usercategory3": { "label": "User Category 3", "description": "user category (optional)", "type": "string" }, "nocat": { "label": "No Category?", "description": "block page category declarations (see WP:NOCAT)", "type": "boolean" } } }