Jump to content

Mòideal:Userbox/doc

O Wiktionary

This is the documentation page for Mòideal:Userbox

(deasbaireachd⧼tpt-languages-separator⧽deasaich⧼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 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.
id{{{info}}}
{{{info}}}
{{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.

Roinnean-seòrsa tracaidh - Tracking categories