Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Userbox/doc
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 Stockhub 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
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Clc
(
edit
)
Template:Clear
(
edit
)
Template:High-use
(
edit
)
Template:Lua
(
edit
)
Template:Tl
(
edit
)
Template:Userbox
(
edit
)
Template:Userbox-2
(
edit
)
Template:Userbox-r
(
edit
)