Navigation menu

Module:Message box/doc: Difference between revisions

From The Kodiak Republic Wiki

m
change source to syntaxhighlight
(Undid revision 952939340 by Ahmad252 (talk) Premature)
m (change source to syntaxhighlight)
Line 9:
To use this module from another Lua module, first you need to load it.
 
<sourcesyntaxhighlight lang="lua">
local messageBox = require('Module:Message box')
</syntaxhighlight>
</source>
 
To create a message box, use the <code>main</code> function. It takes two parameters: the first is the box type (as a string), and the second is a table containing the message box parameters.
 
<sourcesyntaxhighlight lang="lua">
local box = messageBox.main( boxType, {
param1 = param1,
Line 21:
-- More parameters...
})
</syntaxhighlight>
</source>
 
There are seven available box types:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.