67 271
contributi
(More compact external links) |
(Gallery for linked images) |
||
Riga 488: | Riga 488: | ||
if type(QueryResult) == "table" then | if type(QueryResult) == "table" then | ||
local Row = "" | local Row = "" | ||
local ImagesList = "" | |||
local ResultText = "" | |||
for k, v in pairs(QueryResult.results) do | for k, v in pairs(QueryResult.results) do | ||
--[=[if v.fulltext and v.fullurl then | --[=[if v.fulltext and v.fullurl then | ||
Riga 496: | Riga 498: | ||
if string.sub(v.fulltext, 1, 5) == "File:" then | if string.sub(v.fulltext, 1, 5) == "File:" then | ||
Row = "[[:" .. v.fulltext .. "]]" --string.sub(v.fulltext, 3) | Row = "[[:" .. v.fulltext .. "]]" --string.sub(v.fulltext, 3) | ||
ImagesList = ImagesList .. v.fulltext .. string.char(10) | |||
else | else | ||
Row = "[[" .. v.fulltext .. "]]" | Row = "[[" .. v.fulltext .. "]]" | ||
Riga 505: | Riga 508: | ||
AllBackReferences[#AllBackReferences + 1] = "*" .. Row | AllBackReferences[#AllBackReferences + 1] = "*" .. Row | ||
end | end | ||
return table.concat(AllBackReferences, string.char(10)) | ResultText = table.concat(AllBackReferences, string.char(10)) | ||
if ImagesList ~= nil and Imageslist ~= "" then | |||
ResultText = ResultText .. string.char(10) .. "=== Immagini collegate ===" .. string.char(10) .. "<gallery>" .. string.char(10) .. ImagesList .. string.char(10) .. "</gallery>" | |||
end | |||
return ResultText --table.concat(AllBackReferences, string.char(10)) | |||
else | else | ||
return "''No table''" | return "''No table''" | ||
end | end | ||
return | return QueryResult | ||
end | end | ||
--- Writes a gneric UL list from property, adding SMW link if specified | --- Writes a gneric UL list from property, adding SMW link if specified |