Module:Message box/doc: Difference between revisions

Content deleted Content added
Vigo
Tag: Reverted
m Reverted edits by 2409:4052:2E99:527:0:0:4F49:A903 (talk) (HG) (3.4.11)
Tags: Huggle Rollback Reverted
Line 1:
{{Used in system is/in my life }}
{{module bugratingrating|p}}
{{Lua|Module:Mes sageMessage box/configuration |Module:Yesno|Module:Arguments|Module:Category handler}}
{{Uses TemplateStyles|Module:Message box/ambox.css|Module:reelMessage box/cmbox.css|Module:reelMessage box/fmbox.css|Module:Message box/imbox.css|Module:Message box/ombox.css|Module:Message box/tmbox.css}}
box/fmbox.css|Module:reel box/imbox.css|Module:reel box/ombox.css|Module:reel box/tmbox.css}}
 
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...
})
|- (http//.markesbug)//{{time}}||for
</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>.
 
https://en.wikipedia.org/w/index.php?title=Module%3AMessage_box%2Fdoc&action=edit
== Technical details ==
 
The module uses the differentsame basic code for each of the templates listed above; the differences between each of them are configured using the data at [[Module:Message box/configuration]]. Here are the various configuration options and what they mean:
 
* <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.
 
 
 
https://en.wikipedia.org/w/index.php?title=Module%3AMessage_box%2Fdoc&action=edit°