20.643
Bearbeitungen
(bild = fbdata.pargs["Bild"]) |
(+ t = str.strip(t) intable_header_footer() und factbox_header_footer()) |
||
| (9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 27: | Zeile 27: | ||
end | end | ||
end | end | ||
t = p. | if t ~= "" then | ||
t = p.table_header_footer_(t) | |||
t = t .. fab_zeilen.zeileSemantikBrowsenAbfrage_(fbdata) | |||
end | |||
-- Tab draus machen | -- Tab draus machen | ||
| Zeile 36: | Zeile 38: | ||
end | end | ||
function p.bildTab_(fbdata | function p.bildTab_(fbdata) | ||
-- mw.log("bildTab_(fbdata | -- 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 44: | Zeile 46: | ||
local bild = fbdata.pargs["Bild"] | local bild = fbdata.pargs["Bild"] | ||
if bild ~= nil then | if bild ~= nil then | ||
if wik.pageExists(" | local bildlink = "" | ||
if fbdata.bildlink ~= nil then | |||
bildlink = "|link=" .. fbdata.bildlink | |||
end | |||
if wik.pageExists("Datei:" .. bild) then | |||
local beschreibung = smw.getValues("Datei:" .. bild, "Beschreibung") | local beschreibung = smw.getValues("Datei:" .. bild, "Beschreibung") | ||
t = t .. | t = t .. "{| class = \"factbox_imagetable\" border = \"0\" cellpadding = \"0\" cellspacing = \"0\" width = \"100%\"\n" | ||
t = t .. | t = t .. "|-\n" | ||
t = t .. | t = t .. "|[[Datei:" .. bild .. "|768px" .. bildlink .. "]]\n" | ||
if beschreibung[1] ~= nil then | if beschreibung[1] ~= nil then | ||
t = t .. | t = t .. "|-\n" | ||
t = t .. | t = t .. "|" .. beschreibung[1] .. "\n" | ||
end | end | ||
t = t .. | t = t .. "|}" | ||
end | end | ||
smw.addAttrToList(fbdata.attr.list, "Bild", "Datei:" .. bild) | smw.addAttrToList(fbdata.attr.list, "Bild", "Datei:" .. bild) | ||
| Zeile 59: | Zeile 65: | ||
-- Tab draus machen | -- Tab draus machen | ||
t = p.tab_(t, "Bild") | t = p.tab_(t, "Bild") | ||
-- mw. | -- mw.logObject(t, "t") | ||
return t | return t | ||
end | end | ||
| Zeile 115: | Zeile 121: | ||
function p.tab_(t, name) | function p.tab_(t, name) | ||
t = str.strip(t) | t = str.strip(t) | ||
if t ~= "" then | if t ~= "" then | ||
t = "<tab name = ".. name .. ">" .. t .. "</tab>" | t = "<tab name = ".. name .. ">" .. t .. "</tab>" | ||
end | end | ||
return t | return t | ||
end | end | ||
function p. | function p.table_header_footer_(t) | ||
t = str.strip(t) | |||
if t ~= "" then | |||
t = "<dl class = \"dataTable\">" .. t .. "</dl>" | |||
end | |||
return t | |||
end | end | ||
function p. | function p.factbox_header_footer_(t) | ||
t = str.strip(t) | |||
if t ~= "" then | |||
t = "<div class = \"factbox\"><tabs>" .. t .. "</tabs></div>" | |||
end | |||
return t | |||
end | end | ||
return p | return p | ||