Difference between revisions of "Module:Sandbox"
Jump to navigation
Jump to search
blackwiki>BigGreenCahuna (Undid revision 620692108 by BigGreenCahuna (talk)) |
blackwiki>BigGreenCahuna |
||
| Line 1: | Line 1: | ||
-- Placeholder only! Do not add code. | -- Placeholder only! Do not add code. | ||
| + | -- Reviving the evil Banana test | ||
| + | local p = {} | ||
| + | |||
| + | function p.hello( frame ) | ||
| + | local args=frame.args | ||
| + | local Message = "Minions love bananas!" | ||
| + | |||
| + | if args[1] == "1" | ||
| + | then | ||
| + | Message = "Cahuna" | ||
| + | else | ||
| + | Message = args[1] | ||
| + | end | ||
| + | return '<div style="position:absolute;top:0px;left:0px;"><table border=0 cellspacing=0 cellpadding=0 width=100% style="background-color:#FFFFFF;"><tr><td width=100%><div id="siteSub">Bob</div><div id="contentSub"> Color <font style=color:#0000FF;">Blue</font>)</div>'..Message..'</div>' | ||
| + | end | ||
| + | |||
| + | return p | ||
Revision as of 22:40, 10 August 2014
Scribunto Testing Area
This is not an actual Lua module. It exists to provide a convenient pseudo-namespace for code testing, hopefully preventing the main Module: namespace from becoming littered with experiments, as Lua modules cannot exist as subpages in the User: namespace.
Please name your experimental modules in the following format to help keep things tidy:
Module:Sandbox/Your User Name/Module name
You can use Special:PrefixIndex/Module:Sandbox to list modules in this area.
-- Placeholder only! Do not add code.
-- Reviving the evil Banana test
local p = {}
function p.hello( frame )
local args=frame.args
local Message = "Minions love bananas!"
if args[1] == "1"
then
Message = "Cahuna"
else
Message = args[1]
end
return '<div style="position:absolute;top:0px;left:0px;"><table border=0 cellspacing=0 cellpadding=0 width=100% style="background-color:#FFFFFF;"><tr><td width=100%><div id="siteSub">Bob</div><div id="contentSub"> Color <font style=color:#0000FF;">Blue</font>)</div>'..Message..'</div>'
end
return p