Tech, emailconfirmed, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Administrators
12,460
edits
Bongolium500 (talk | contribs) (Created page with "All modules invoked here will be subpages of Module:Bongolium500. {{#invoke:Bongolium500/learning|hello}} {{#invoke:Bongolium500/story cite|getinfo}}") |
Bongolium500 (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
{{#invoke:Bongolium500/story cite|getinfo}} | {{#invoke:Bongolium500/story cite|getinfo}} | ||
<pre> | |||
for n = 1, #queryResult do | |||
local current = queryResult[n] | |||
local output = "" | |||
local data = {["partOf"] = "", ["series"] = "", ["seriesNumber"] = "", ["season"] = "", ["Writer"] = "", ["publisher"] = ""} | |||
for i=1, #properties do | |||
if current["Writer"] ~= nil and type(current["Writer"]) ~= "table" then --]] | |||
data[properties[i]] = data[properties[i]] .. current["Writer"] | |||
elseif type(current["Writer"]) == "table" then | |||
for i = 1, #current["Writer"] do | |||
data[properties[i]] = data[properties[i]] .. current["Writer"][i] | |||
if i == #current["Writer"]-1 then | |||
data[properties[i]] = data[properties[i]] .. " and " | |||
elseif i == #current["Writer"] then | |||
data[properties[i]] = data[properties[i]] | |||
else | |||
data[properties[i]] = data[properties[i]] .. ", " | |||
end | |||
end | |||
end | |||
end | |||
output = output .. data["Writer"] | |||
util_vars.vardefine(current[1], output) | |||
end | |||
testtext = util_vars.var("Rose (TV story)") | |||
return testtext | |||
end | |||
end</pre> |
edits