Mòideal:Userbox/doc
This is the documentation page for Mòideal:Userbox
Uses Lua: |
Related pages |
---|
(deasbaireachd⧼tpt-languages-separator⧽ ⧼tpt-languages-separator⧽eachdraidh⧼tpt-languages-separator⧽ceanglaichean⧼tpt-languages-separator⧽doc⧼tpt-languages-separator⧽bogsa-gainmhich⧼tpt-languages-separator⧽cùisean deuchainn)
This module is currently protected from editing. See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
This Lua module is used on many pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages. Consider discussing changes on the talk page before implementing them. |
This module does the processing for three Userbox templates, {{Userbox}}, {{Userbox-2}} and {{Userbox-r}}.
Template | Description | Examples | |||
---|---|---|---|---|---|
{{Userbox}} | Makes Userboxes with an id on the left-hand side, or with no id. |
| |||
{{Userbox-2}} | Makes Userboxes with an id on both the left- and right-hand sides. | Teamplaid:Userbox-2 | |||
{{Userbox-r}} | Makes Userboxes with an id on the right-hand side. | Teamplaid: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.
Ùsaid bho Lua - Usage from Lua
To generate a Userbox directly from Lua, first load the module.
local userbox = require('Mòideal:Userbox')
You can then run any of the three templates with the code:
userbox.main(functionName, args)
For {{Userbox}} use the function name "_userbox
"; for {{Userbox-2}} use the function name "_userbox-2
"; and for {{Userbox-r}} use the function name "_userbox-r
". The args
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.