Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
WikiFarms
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Userbox/doc
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{High-use|233415}} {{Lua|Module:Category handler|Module:Arguments|Module:Color contrast}} This module does the processing for three userbox templates, {{tl|userbox}}, {{tl|userbox-2}} and {{tl|userbox-r}}. {| class="wikitable" |- ! Template ! Description ! Examples |- | {{tl|userbox}} | Makes userboxes with an id on the left-hand side, or with no id. | {{userbox|id=id}} {{clear}} {{userbox}} |- | {{tl|userbox-2}} | Makes userboxes with an id on both the left- and right-hand sides. | {{userbox-2}} |- | {{tl|userbox-r}} | Makes userboxes with an id on the right-hand side. | {{userbox-r}} |} To use any of these templates from a wiki page, please see the individual template pages for documentation. To generate userboxes directly from Lua, read on. == Generating userboxes from Lua == To generate a userbox directly from Lua, first load the module. <syntaxhighlight lang="lua"> local userbox = require('Module:Userbox') </syntaxhighlight> You can then run any of the three templates with the code: <syntaxhighlight lang="lua"> userbox.main(functionName, args) </syntaxhighlight> For {{tl|userbox}} use the function name "<code>_userbox</code>"; for {{tl|userbox-2}} use the function name "<code>_userbox-2</code>"; and for {{tl|userbox-r}} use the function name "<code>_userbox-r</code>". The <code>args</code> parameter is a table of arguments to pass to the different userbox functions. To see a list of valid arguments, please consult the individual template pages. == Tracking categories == * {{clc|Userboxes with insufficient color contrast}} * {{clc|Pages with templates in the wrong namespace}}
Summary:
Please note that all contributions to WikiFarms may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WikiFarms:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Pages included on this page:
Template:Category link with count
(
edit
)
Template:Clc
(
edit
)
Template:Clear
(
edit
)
Template:High-use
(
edit
)
Template:Lua
(
edit
)
Template:Template link
(
edit
)
Template:Template other
(
edit
)
Template:Tl
(
edit
)
Template:Userbox
(
edit
)
Template:Userbox-2
(
edit
)
Template:Userbox-r
(
edit
)
Template:Userbox/styles.css
(
edit
)
Module:Arguments
(
edit
)
Module:Category handler
(
edit
)
Module:Category handler/blacklist
(
edit
)
Module:Category handler/config
(
edit
)
Module:Category handler/data
(
edit
)
Module:Category handler/shared
(
edit
)
Module:Color contrast
(
edit
)
Module:Color contrast/colors
(
edit
)
Module:High-use
(
edit
)
Module:List
(
edit
)
Module:Lua banner
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Namespace detect/config
(
edit
)
Module:Namespace detect/data
(
edit
)
Module:String
(
edit
)
Module:TableTools
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/U
(
edit
)
Module:Userbox
(
edit
)
Module:Yesno
(
edit
)
Search
Search
Editing
Module:Userbox/doc
Add topic