Modul:Bild: Unterschied zwischen den Versionen

local smw = require("Modul:SMW")
(Abfrage(frame) selector1, selector2 com.isEmpty(pargs["attrvalx"]))
(local smw = require("Modul:SMW"))
Zeile 5: Zeile 5:
local str = require("Modul:String")
local str = require("Modul:String")
local wik = require("Modul:Wiki")
local wik = require("Modul:Wiki")
local que = require("Modul:Queries")
local smw = require("Modul:SMW")


local n_bilder_limit = 200
local n_bilder_limit = 200
Zeile 133: Zeile 133:
end
end
if not com.isEmpty(pargs["Erstellungsdatum bis"]) then
if not com.isEmpty(pargs["Erstellungsdatum bis"]) then
selector = selector .. "[[Erstellungsdatum::<=" .. que.dateLastDayCompleter(pargs["Erstellungsdatum bis"]) .. "]]"
selector = selector .. "[[Erstellungsdatum::<=" .. smw.dateLastDayCompleter(pargs["Erstellungsdatum bis"]) .. "]]"
end
end
if not com.isEmpty(pargs["Über Datum von"]) then
if not com.isEmpty(pargs["Über Datum von"]) then
Zeile 139: Zeile 139:
end
end
if not com.isEmpty(pargs["Über Datum bis"]) then
if not com.isEmpty(pargs["Über Datum bis"]) then
selector = selector .. "[[ÜberDatum::<=" .. que.dateLastDayCompleter(pargs["Über Datum bis"]) .. "]]"
selector = selector .. "[[ÜberDatum::<=" .. smw.dateLastDayCompleter(pargs["Über Datum bis"]) .. "]]"
end
end
if not com.isEmpty(pargs["Straße"]) then
if not com.isEmpty(pargs["Straße"]) then
selector = selector .. "[[Straße::" .. que.uniFilter(pargs["Straße"]) .. "]]"
selector = selector .. "[[Straße::" .. smw.uniFilter(pargs["Straße"]) .. "]]"
end
end
if not com.isEmpty(pargs["Ort"]) then
if not com.isEmpty(pargs["Ort"]) then
selector = selector .. "[[Ort::" .. que.uniFilter(pargs["Ort"]) .. "]]"
selector = selector .. "[[Ort::" .. smw.uniFilter(pargs["Ort"]) .. "]]"
end
end
if not com.isEmpty(pargs["Urheber"]) then
if not com.isEmpty(pargs["Urheber"]) then
selector = selector .. "[[Urheber::" .. que.uniFilter(pargs["Urheber"]) .. "]]"
selector = selector .. "[[Urheber::" .. smw.uniFilter(pargs["Urheber"]) .. "]]"
end
end
if not com.isEmpty(pargs["Quellangaben"]) then
if not com.isEmpty(pargs["Quellangaben"]) then
selector = selector .. "[[Quellangaben::" .. que.uniFilter(pargs["Quellangaben"]) .. "]]"
selector = selector .. "[[Quellangaben::" .. smw.uniFilter(pargs["Quellangaben"]) .. "]]"
end
end
if not com.isEmpty(pargs["Lizenz"]) then
if not com.isEmpty(pargs["Lizenz"]) then
selector = selector .. "[[Lizenz::" .. que.uniFilter(pargs["Lizenz"]) .. "]]"
selector = selector .. "[[Lizenz::" .. smw.uniFilter(pargs["Lizenz"]) .. "]]"
end
end
if not com.isEmpty(pargs["Signatur"]) then
if not com.isEmpty(pargs["Signatur"]) then
selector = selector .. "[[Signatur::" .. que.uniFilter(pargs["Signatur"]) .. "]]"
selector = selector .. "[[Signatur::" .. smw.uniFilter(pargs["Signatur"]) .. "]]"
end
end
local selector1, selector2 = "", ""
local selector1, selector2 = "", ""
if not com.isEmpty(pargs["attrname1"]) and not com.isEmpty(pargs["attrval1"]) then
if not com.isEmpty(pargs["attrname1"]) and not com.isEmpty(pargs["attrval1"]) then
selector1 = "[[" .. pargs["attrname1"] .. "::" .. que.uniFilter(pargs["attrval1"]) .. "]]"
selector1 = "[[" .. pargs["attrname1"] .. "::" .. smw.uniFilter(pargs["attrval1"]) .. "]]"
end
end
if not com.isEmpty(pargs["attrname2"]) and not com.isEmpty(pargs["attrval2"]) then
if not com.isEmpty(pargs["attrname2"]) and not com.isEmpty(pargs["attrval2"]) then
selector2 = "[[" .. pargs["attrname2"] .. "::" .. que.uniFilter(pargs["attrval2"]) .. "]]"
selector2 = "[[" .. pargs["attrname2"] .. "::" .. smw.uniFilter(pargs["attrval2"]) .. "]]"
end
end
if pargs["attr_op"] == "oder" and selector1 ~= "" and selector2 ~= "" then
if pargs["attr_op"] == "oder" and selector1 ~= "" and selector2 ~= "" then