Content deleted Content added
Vigo Tag: Reverted |
m Reverted edits by 2409:4052:2E99:527:0:0:4F49:A903 (talk) (HG) (3.4.11) |
||
Line 1:
{{Used in system
{{module
{{Lua|Module:
{{Uses TemplateStyles|Module:Message box/ambox.css|Module:
This is a meta-module that implements the message box templates {{tl|mbox}}, {{tl|ambox}}, {{tl|cmbox}}, {{tl|fmbox}}, {{tl|imbox}}, {{tl|ombox}}, and {{tl|tmbox}}. It is intended to be used from Lua modules, and should not be used directly from wiki pages. If you want to use this module's functionality from a wiki page, please use the individual message box templates instead.
Line 22 ⟶ 21:
param2 = param2,
-- More parameters...
})
</syntaxhighlight>
Line 50 ⟶ 49:
As well as the <code>main</code> function, this module has separate functions for each box type. They are accessed using the code <code><nowiki>{{#invoke:Message box|mbox|...}}</nowiki></code>, <code><nowiki>{{#invoke:Message box|ambox|...}}</nowiki></code>, etc. These will work when called from other modules, but they access code used to process arguments passed from #invoke, and so calling them will be less efficient than calling <code>main</code>.
== Technical details ==
The module uses the
* <code>types</code> – a table containing data used by the type parameter of the message box. The table keys are the values that can be passed to the type parameter, and the table values are tables containing the class and the image used by that type.
Line 77 ⟶ 76:
* <code>templateErrorCategory</code> – the name of the error category to be used on the template page.
* <code>templateErrorParamsToCheck</code> – an array of parameter names to check. If any are absent, the <code>templateErrorCategory</code> is applied to the template page.
|