15.088
Bearbeitungen
(Die Seite wurde neu angelegt: „p = {} local com = require("Modul:Common") local dev = require("Modul:Development") local str = require("Modul:String") local wik = require("Modul:Wiki") function p.faktenboxSemantikBrowsen(fbdata) -- mw.log("faktenboxSemantikBrowsen(fbdata)") -- mw.logObject(fbdata) -- Konsolenzeile zum Debuggen: -- =p.faktenboxSemantikBrowsen{fullpagename="Rathaus"} local t = "" t = t .. "<dl class = 'dataTable'>" t = t .. "<dt>[[Bild:IconSearch.svg|16px|semantis…“) |
(Kategorie:Hat leere Faktenbox) |
||
| (12 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
p = {} | local p = {} | ||
local com = require("Modul:Common") | local com = require("Modul:Common") | ||
| Zeile 6: | Zeile 6: | ||
local wik = require("Modul:Wiki") | local wik = require("Modul:Wiki") | ||
function p. | function p.common_(fbdata) | ||
-- mw.log(" | -- mw.log("common_(fbdata)") | ||
-- mw.logObject(fbdata) | -- mw.logObject(fbdata) | ||
-- Konsolenzeile zum Debuggen: | -- Konsolenzeile zum Debuggen: | ||
-- =p. | -- =p.common_{formular="Gebäude/Work",klasse={"Gebäude","Kirche"},kategorie={"Gebäude","Kirchen"},strasse_hnr={suspekt=true},positionscheck=true,pargs={Bild="Angie Oeckl.JPG",Ehemals="Ja",DenkmalstatusBesteht="Ja",Stadtteil="Ronhof; Nordstadt ",location="bla"},pagename="Test/Test;Test"} | ||
local t = "" | local t = "" | ||
-- Klasse | -- Klasse | ||
| Zeile 53: | Zeile 39: | ||
end | end | ||
-- Wartungs-Kategorien | -- Wartungs-Kategorien | ||
if com.isEmpty(fbdata.pargs) then | |||
t = t .. "[[Kategorie:Hat leere Faktenbox]]" | |||
end | |||
if (fbdata.pargs["Bild"] or "") == "" then | if (fbdata.pargs["Bild"] or "") == "" then | ||
if fbdata.kategorie ~= nil then | if fbdata.kategorie ~= nil then | ||
| Zeile 59: | Zeile 48: | ||
t = t .. "[[Kategorie:Ohne Bild]]" | t = t .. "[[Kategorie:Ohne Bild]]" | ||
end | end | ||
elseif not wik. | elseif not wik.pageExists("Bild:" .. fbdata.pargs["Bild"]) then | ||
t = t .. "[[Kategorie:Bild nicht gefunden]]" | t = t .. "[[Kategorie:Bild nicht gefunden]]" | ||
end | end | ||
| Zeile 75: | Zeile 64: | ||
if fbdata.positionscheck and fbdata.kategorie ~= nil and | if fbdata.positionscheck and fbdata.kategorie ~= nil and | ||
not ((fbdata.pargs["lat"] or "") ~= "" or (fbdata.pargs["lon"] or "") ~= "" or | not ((fbdata.pargs["lat"] or "") ~= "" or (fbdata.pargs["lon"] or "") ~= "" or | ||
(fbdata.pargs["location"] or "") ~= "" or wik. | (fbdata.pargs["location"] or "") ~= "" or wik.pageExists("GeoJson:" .. (fbdata.pargs["geojson"] or fbdata.pagename))) then | ||
t = t .. "[[Kategorie:" .. fbdata.kategorie[1] .. ehemals_text .. " ohne Position]]" | t = t .. "[[Kategorie:" .. fbdata.kategorie[1] .. ehemals_text .. " ohne Position]]" | ||
end | end | ||
| Zeile 82: | Zeile 71: | ||
end | end | ||
function p. | function p.fbdata_(frame) | ||
-- mw.log(" | -- mw.log("fbdata_(frame)") | ||
-- mw.logObject(frame) | -- mw.logObject(frame) | ||
-- Konsolenzeile zum Debuggen: | -- Konsolenzeile zum Debuggen: | ||
-- =p. | -- =p.fbdata_{pargs={a=1}} | ||
local fbdata = {} | local fbdata = {} | ||
fbdata.frame, fbdata.pargs = dev.GetFrameAndParentArgs(frame) | fbdata.frame, fbdata.pargs = dev.GetFrameAndParentArgs(frame) | ||