Modul:Faktenbox/Tabs: Unterschied zwischen den Versionen

- Bild link=
(universalDatenTab() + Leer-Handling)
(- Bild link=)
Zeile 38: Zeile 38:
end
end


function p.bildTab_(fbdata, seite)
function p.bildTab_(fbdata)
-- mw.log("bildTab_(fbdata, " .. (seite or "nil") .. ")")
-- mw.log("bildTab_(fbdata)")
-- mw.logObject(fbdata.pargs)
-- mw.logObject(fbdata.pargs, "fbdata.pargs")
-- Konsolenzeile zum Debuggen:
-- Konsolenzeile zum Debuggen:
-- =p.bildTab_{pargs={Bild="Erloeserkirche.jpg"}}
-- =p.bildTab_{pargs={Bild="Erloeserkirche.jpg"}}
Zeile 46: Zeile 46:
local bild = fbdata.pargs["Bild"]
local bild = fbdata.pargs["Bild"]
if bild ~= nil then
if bild ~= nil then
if wik.pageExists("Bild:" .. bild) then
if wik.pageExists("Datei:" .. bild) then
local beschreibung = smw.getValues("Datei:" .. bild, "Beschreibung")
local beschreibung = smw.getValues("Datei:" .. bild, "Beschreibung")
t = t .. '{| class = "factbox_imagetable" border = "0" cellpadding = "0" cellspacing = "0" width = "100%"\n'
t = t .. '{| class = "factbox_imagetable" border = "0" cellpadding = "0" cellspacing = "0" width = "100%"\n'
t = t .. '|-\n'
t = t .. '|-\n'
t = t .. '|[[Datei:' .. bild .. '|768px|link=' .. (seite or ('Datei:' .. bild)) .. ']]\n'
t = t .. '|[[Datei:' .. bild .. '|768px]]\n'
if beschreibung[1] ~= nil then
if beschreibung[1] ~= nil then
t = t .. '|-\n'
t = t .. '|-\n'
Zeile 61: Zeile 61:
-- Tab draus machen
-- Tab draus machen
t = p.tab_(t, "Bild")
t = p.tab_(t, "Bild")
-- mw.log("t = " .. t)
-- mw.logObject(t, "t")
return t
return t
end
end