Changes

Jump to navigation Jump to search

Module:Infobox

234 bytes added, 15:46, 3 June 2013
custom step degree for touchParameters
end
-- This function parses the parameters with the given prefixes, in order, in batches of the step size specified.-- If the step size is not given, the default is 20.local function touchParameters(prefixTable, origArgs, step)
if type(prefixTable) ~= 'table' or type(origArgs) ~= 'table' then
error("Invalid input to the touchParameters function detected. Both parameters must be tables.", 2)
end
if step and type(step) ~= 'number' then
error("Non-numerical step value detected.", 2)
end
step = step or 20
local temp
local a = 1
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a+19 step - 1 do
for j,v in ipairs(prefixTable) do
temp = origArgs[v .. tostring(i)]
end
end
a = a + 20step
end
end
temp = origArgs.title
temp = origArgs.above
touchParameters({'subheader'}, origArgs, 5) touchParameters({'image', 'caption'}, origArgs, 5) touchParameters({'header', 'label', 'data'}, origArgs, 20)
temp = origArgs.below
Anonymous user

Navigation menu