Template:Userbox: Difference between revisions

From PZwiki
m (update doc)
m (add category)
Line 70: Line 70:
}}
}}
{{ll|Category:Userbox}}
{{ll|Category:Userbox}}
{{ll|Category:Metatemplates}}
</noinclude><includeonly>{| style="clear: right; float: right; border: {{{border-width|1px}}} solid {{{border-color|#000000}}}; margin-left: .5em; margin-bottom: 2px; width: 250px; background: {{{info-background|#f6f6f6}}}; vertical-align: middle;" cellspacing=0
</noinclude><includeonly>{| style="clear: right; float: right; border: {{{border-width|1px}}} solid {{{border-color|#000000}}}; margin-left: .5em; margin-bottom: 2px; width: 250px; background: {{{info-background|#f6f6f6}}}; vertical-align: middle;" cellspacing=0
! style="width: {{{logo-width|60px}}}; height: {{{logo-height|60px}}}; background: {{{logo-background|#ffffff}}}; text-align: center; font-size: {{{logo-size|14pt}}}; color: {{{logo-color|black}}}; padding: {{{logo-padding|1px}}};" | {{{logo|logo}}}
! style="width: {{{logo-width|60px}}}; height: {{{logo-height|60px}}}; background: {{{logo-background|#ffffff}}}; text-align: center; font-size: {{{logo-size|14pt}}}; color: {{{logo-color|black}}}; padding: {{{logo-padding|1px}}};" | {{{logo|logo}}}
| style="font-size: {{{info-size|8pt}}}; padding: {{{info-padding|4px}}}; color: {{{info-color|black}}};" | {{{info|''info''}}}
| style="font-size: {{{info-size|8pt}}}; padding: {{{info-padding|4px}}}; color: {{{info-color|black}}};" | {{{info|''info''}}}
|}{{#if:{{{cat|}}}|[[Category:{{{cat}}}]]}}</includeonly>
|}{{#if:{{{cat|}}}|[[Category:{{{cat}}}]]}}</includeonly>

Revision as of 17:26, 30 December 2023

Notebook.pngTemplate 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.

Usage

This template is used to create a new userbox. If you want to add an existing userbox to your user page, please check templates in PZwiki:Userboxes.

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:

{{Userbox
| border-color = 
| border-width = 
| logo = 
| logo-width = 
| logo-height = 
| logo-color = 
| logo-background = 
| logo-size = 
| logo-padding = 
| info = 
| info-color = 
| info-background = 
| info-size = 
| info-padding = 
| cat = 
}}

Parameters

border-color
border color, default to #000000.
border-width
border width, default to 1px.
logo
logo image and/or text, default to logo text.
logo-width
logo box width, default to 60px.
logo-height
logo box height, default to 60px.
Images should normally be scaled to 60px or less.
logo-color
logo font color, default to #000000.
logo-background
logo background color, default to #ffffff.
logo-size
logo text size, default to 14pt.
logo-padding
logo cell padding, default to 1px.
info
info text and/or image, default to info text.
info-color
info font color, default to #000000.
info-background
info background color, default to #f6f6f6.
info-size
info text size, default to 8pt.
info-padding
info padding, default to 4px.
cat
user category, default to empty.

Examples

logo info
  • {{Userbox}} will produce as shown right.

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.