Module:ScribuntoTest
De Semantic MediaWiki - Sandbox
La documentation pour ce module peut être créée à Module:ScribuntoTest/doc
-- Module:ScribuntoTest
local p = {}
function p.asktype()
if not mw.ext.smw then
return "mw.ext.smw module not found"
end
queryResult = mw.ext.smw.getQueryResult('[[Modification date::+]]|?Modification date|sort=Modification date|order=desc')
if queryResult == nil then
return "(no values)"
end
if type(queryResult) == "table" then
myResult = ""
for k,v in pairs(queryResult.query.results) do
myResult = myResult .. k .. " | " .. v.fulltext .. " " .. v.fullurl .. " | " .. v.printouts["Modification date"][0].timestamp .. "<br/>"
end
return myResult
end
return queryResult
end
return p