Module:RfD close: Difference between revisions

Content deleted Content added
does tostring fix it?
edit module based on help given on mw:Extension talk:Scribunto/Lua reference manual
Line 2:
 
function rfd.rfdt_collapsebox(frame) --this bit creates the "closed discussion" notice
--define function to check whether arguments are defined
local args = frame.args
 
local function argIsSet(key)
if args[key] and args[key]:find('%S') then
return true
else
return false
end
end
local message_string1 = '<includeonly>[[File:Symbol move vote.svg|16px|link=|alt=]] '
.. "'''Closed discussion''', click "
Line 12 ⟶ 23:
local result_string = ''
if (frame.args[1]) then
if (argIsSet('result')) then
result_string = ' Result was: ' .. frame.args[1'result']
end