Munurin millum rættingarnar hjá "Module:Userbox/doc"

36 bytes løgd afturat ,  7 mánaðir síðan
s
Bot: Erstatt forældet <source> -tag og parameteren "enclose" [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html]
(Stovnaði síðu við "{{high-risk|nógvum}} This module does the processing for three userbox templates, {{tl|userbox}}, {{tl|userbox-2}} and {{tl|userbox-r}}. {| class="wikitable" |- ! Templ...")
 
s (Bot: Erstatt forældet <source> -tag og parameteren "enclose" [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html])
 
To generate a userbox directly from Lua, first load the module.
 
<sourcesyntaxhighlight lang="lua">
local userbox = require('Module:Userbox')
</syntaxhighlight>
</source>
 
You can then run any of the three templates with the code:
 
<sourcesyntaxhighlight lang="lua">
userbox.main(functionName, args)
</syntaxhighlight>
</source>
 
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.
14.816

rættingar