Folge: Unterschied zwischen den Versionen
Aus Bohnenwiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 322: | Zeile 322: | ||
end | end | ||
function Folge.Inhalt(frame) | |||
local Inhalt = frame.args.Inhalt | |||
local Inhalt_Richtung = frame.args.Inhalt_Align | |||
local Inhalt_Farbe = frame.args.Inhalt_Color | |||
local span_Nr = frame.args.Nr | |||
local span_Thema = frame.args.Thema | |||
local span_Moderator = frame.args.Moderator | |||
local span_Gaeste = frame.args.Gaeste | |||
local span_Zuschauer = frame.args.Zuschauer | |||
local span_VOD = frame.args.VOD | |||
local span_Datum = frame.args.Datum | |||
local align = " " | |||
local bg_color = " " | |||
local span_zahl = " " | |||
local span = " " | |||
if span_Nr ~= nil or "{{{Nr}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Thema ~= nil or "{{{Thema}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Moderator ~= nil or "{{{Moderator}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Gaeste ~= nil or "{{{Gaeste}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Zuschauer ~= nil or "{{{Zuschauer}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_VOD ~= nil or "{{{VOD}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Datum ~= nil or "{{{Datum}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
Inhalt_Spalte = " " | |||
if Inhalt_Richtung == "{{{Inhalt_Richtung}}}" then align = "| align=\"left\" " | |||
elseif Inhalt_Richtung == "center" | |||
then align = "| align=\"center\" " | |||
elseif Inhalt_Richtung == "right" | |||
then align = "| align=\"right\" " | |||
elseif Inhalt_Richtung == "left" | |||
then align = "| align=\"left\" " | |||
else | |||
align = "| align=\"left\" " | |||
end | |||
if Inhalt_Farbe == "{{{Inhalt_Color}}}" | |||
then bg_color = "style=\"background: #ececec \"| " | |||
elseif Inhalt_Farbe == nil | |||
then bg_color = "style=\"background: #ececec \"| " | |||
else | |||
bg_color = "style=\"background: " .. Inhalt_Farbe .. " \"| " | |||
end | |||
span = "\" colspan=\"" .. span_zahl .. "\" " | |||
if Inhalt == "{{{Inhalt}}}" | |||
then Inhalt_Spalte = " " | |||
else | |||
InhaltSpalte = "|-\n" .. align .. span .. bg_color .. Inhalt | |||
end | |||
return Inhalt_Spalte | |||
end | |||
function Folge.Linie(frame) | |||
local Linie_Farbe = frame.args.Linie_Color | |||
local span_Nr = frame.args.Nr | |||
local span_Thema = frame.args.Thema | |||
local span_Moderator = frame.args.Moderator | |||
local span_Gaeste = frame.args.Gaeste | |||
local span_Zuschauer = frame.args.Zuschauer | |||
local span_VOD = frame.args.VOD | |||
local span_Datum = frame.args.Datum | |||
local align = " " | |||
local bg_color = " " | |||
local span_zahl = " " | |||
local span = " " | |||
if span_Nr ~= nil or "{{{Nr}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Thema ~= nil or "{{{Thema}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Moderator ~= nil or "{{{Moderator}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Gaeste ~= nil or "{{{Gaeste}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Zuschauer ~= nil or "{{{Zuschauer}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_VOD ~= nil or "{{{VOD}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
if span_Datum ~= nil or "{{{Datum}}}" | |||
then span_zahl = span_zahl + 1 | |||
end | |||
Linie_Spalte = " " | |||
if Linie_Farbe == "{{{Linie_Color}}}" | |||
then bg_color = "style=\"background: #ececec \"| " | |||
elseif Linie_Farbe == nil | |||
then bg_color = "style=\"background: #ececec \"| " | |||
else | |||
bg_color = "style=\"background: " .. Linie_Farbe .. " \"| " | |||
end | |||
span = "\" colspan=\"" .. span_zahl .. "\" " | |||
if Linie_Farbe == "{{{Linie_Color}}}" | |||
then Linie_Spalte = " " | |||
else | |||
LinieSpalte = "|-\n" .. span .. bg_color .. " " | |||
end | |||
return Linie_Spalte | |||
end | |||
return Folge | return Folge |
Version vom 14. Juli 2015, 09:42 Uhr
LUA-Modul für die Vorlage:Folge/LUA
Folge = {}
function Folge.Nr(frame)
local Nummer = frame.args.Nr
local Nummer_Richtung = frame.args.Nr_Align
local Nummer_Farbe = frame.args.Nr_Color
local Nummer_Colspan = frame.args.Nr_Colspan
local align = " "
local bg_color = " "
local span = " "
Nummer_Spalte = " "
if Nummer_Richtung == "{{{Nr_Richtung}}}" then align = "| align=\"left\" "
elseif Nummer_Richtung == "center"
then align = "| align=\"center\" "
elseif Nummer_Richtung == "right"
then align = "| align=\"right\" "
elseif Nummer_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"center\" "
end
if Nummer_Farbe == "{{{Nr_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Nummer_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Nummer_Farbe .. " \"| "
end
if Nummer_Colspan == "{{{Nr_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. Nummer_Colspan .. "\" "
end
if Nummer == "{{{Nr}}}"
then Nummer_Spalte = " "
else
Nummer_Spalte = align .. span .. bg_color .. Nummer
end
return Nummer_Spalte
end
function Folge.Thema(frame)
local Thema = frame.args.Thema
local Thema_Richtung = frame.args.Thema_Align
local Thema_Farbe = frame.args.Thema_Color
local Thema_Colspan = frame.args.Thema_Colspan
local align = " "
local bg_color = " "
local span = " "
Thema_Spalte = " "
if Thema_Richtung == "{{{Thema_Richtung}}}" then align = "| align=\"left\" "
elseif Thema_Richtung == "center"
then align = "| align=\"center\" "
elseif Thema_Richtung == "right"
then align = "| align=\"right\" "
elseif Thema_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"left\" "
end
if Thema_Farbe == "{{{Thema_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Thema_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Thema_Farbe .. " \"| "
end
if Thema_Colspan == "{{{Nr_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. Thema_Colspan .. "\" "
end
if Thema == "{{{Thema}}}"
then Thema_Spalte = " "
else
Thema_Spalte = align .. span .. bg_color .. Thema
end
return Thema_Spalte
end
function Folge.Moderator(frame)
local Moderator = frame.args.Moderator
local Moderator_Richtung = frame.args.Moderator_Align
local Moderator_Farbe = frame.args.Moderator_Color
local Moderator_Colspan = frame.args.Moderator_Colspan
local align = " "
local bg_color = " "
local span = " "
Moderator_Spalte = " "
if Moderator_Richtung == "{{{Moderator_Richtung}}}" then align = "| align=\"left\" "
elseif Moderator_Richtung == "center"
then align = "| align=\"center\" "
elseif Moderator_Richtung == "right"
then align = "| align=\"right\" "
elseif Moderator_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"left\" "
end
if Moderator_Farbe == "{{{Moderator_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Moderator_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Moderator_Farbe .. " \"| "
end
if Moderator_Colspan == "{{{Moderator_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. Moderator_Colspan .. "\" "
end
if Moderator == "{{{Moderator}}}"
then Moderator_Spalte = " "
else
Moderator_Spalte = align .. span .. bg_color .. Moderator
end
return Moderator_Spalte
end
function Folge.Gaeste(frame)
local Gaeste = frame.args.Gaeste
local Gaeste_Richtung = frame.args.Gaeste_Align
local Gaeste_Farbe = frame.args.Gaeste_Color
local Gaeste_Colspan = frame.args.Gaeste_Colspan
local align = " "
local bg_color = " "
local span = " "
Gaeste_Spalte = " "
if Gaeste_Richtung == "{{{Gaeste_Richtung}}}" then align = "| align=\"left\" "
elseif Gaeste_Richtung == "center"
then align = "| align=\"center\" "
elseif Gaeste_Richtung == "right"
then align = "| align=\"right\" "
elseif Gaeste_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"left\" "
end
if Gaeste_Farbe == "{{{Gaeste_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Gaeste_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Gaeste_Farbe .. " \"| "
end
if Gaeste_Colspan == "{{{Gaeste_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. Gaeste_Colspan .. "\" "
end
if Gaeste == "{{{Gaeste}}}"
then Gaeste_Spalte = " "
else
Gaeste_Spalte = align .. span .. bg_color .. Gaeste
end
return Gaeste_Spalte
end
function Folge.Zuschauer(frame)
local Zuschauer = frame.args.Zuschauer
local Zuschauer_Richtung = frame.args.Zuschauer_Align
local Zuschauer_Farbe = frame.args.Zuschauer_Color
local Zuschauer_Colspan = frame.args.Zuschauer_Colspan
local align = " "
local bg_color = " "
local span = " "
Zuschauer_Spalte = " "
if Zuschauer_Richtung == "{{{Zuschauer_Richtung}}}" then align = "| align=\"left\" "
elseif Zuschauer_Richtung == "center"
then align = "| align=\"center\" "
elseif Zuschauer_Richtung == "right"
then align = "| align=\"right\" "
elseif Zuschauer_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"right\" "
end
if Zuschauer_Farbe == "{{{Zuschauer_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Zuschauer_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Zuschauer_Farbe .. " \"| "
end
if Zuschauer_Colspan == "{{{Zuschauer_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. Zuschauer_Colspan .. "\" "
end
if Zuschauer == "{{{Zuschauer}}}"
then Zuschauer_Spalte = " "
else
Zuschauer_Spalte = align .. span .. bg_color .. Zuschauer
end
return Zuschauer_Spalte
end
function Folge.VOD(frame)
local VOD = frame.args.VOD
local VOD_Richtung = frame.args.VOD_Align
local VOD_Farbe = frame.args.VOD_Color
local VOD_Colspan = frame.args.VOD_Colspan
local align = " "
local bg_color = " "
local span = " "
VOD_Spalte = " "
if VOD_Richtung == "{{{VOD_Richtung}}}" then align = "| align=\"left\" "
elseif VOD_Richtung == "center"
then align = "| align=\"center\" "
elseif VOD_Richtung == "right"
then align = "| align=\"right\" "
elseif VOD_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"center\" "
end
if VOD_Farbe == "{{{VOD_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif VOD_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. VOD_Farbe .. " \"| "
end
if VOD_Colspan == "{{{VOD_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. VOD_Colspan .. "\" "
end
if VOD == "{{{VOD}}}"
then VOD_Spalte = " "
else
VOD_Spalte = align .. span .. bg_color .. VOD
end
return VOD_Spalte
end
function Folge.Datum(frame)
local Datum = frame.args.Datum
local Datum_Richtung = frame.args.Datum_Align
local Datum_Farbe = frame.args.Datum_Color
local Datum_Colspan = frame.args.Datum_Colspan
local align = " "
local bg_color = " "
local span = " "
Datum_Spalte = " "
if Datum_Richtung == "{{{Datum_Richtung}}}" then align = "| align=\"left\" "
elseif Datum_Richtung == "center"
then align = "| align=\"center\" "
elseif Datum_Richtung == "right"
then align = "| align=\"right\" "
elseif Datum_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"center\" "
end
if Datum_Farbe == "{{{Datum_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Datum_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Datum_Farbe .. " \"| "
end
if Datum_Colspan == "{{{Datum_Colspan}}}"
then span = " colspan=\"1\" "
else
span = "\" colspan=\"" .. Datum_Colspan .. "\" "
end
if Datum == "{{{Datum}}}"
then Datum_Spalte = " "
else
Datum_Spalte = align .. span .. bg_color .. Datum
end
return Datum_Spalte
end
function Folge.Inhalt(frame)
local Inhalt = frame.args.Inhalt
local Inhalt_Richtung = frame.args.Inhalt_Align
local Inhalt_Farbe = frame.args.Inhalt_Color
local span_Nr = frame.args.Nr
local span_Thema = frame.args.Thema
local span_Moderator = frame.args.Moderator
local span_Gaeste = frame.args.Gaeste
local span_Zuschauer = frame.args.Zuschauer
local span_VOD = frame.args.VOD
local span_Datum = frame.args.Datum
local align = " "
local bg_color = " "
local span_zahl = " "
local span = " "
if span_Nr ~= nil or "{{{Nr}}}"
then span_zahl = span_zahl + 1
end
if span_Thema ~= nil or "{{{Thema}}}"
then span_zahl = span_zahl + 1
end
if span_Moderator ~= nil or "{{{Moderator}}}"
then span_zahl = span_zahl + 1
end
if span_Gaeste ~= nil or "{{{Gaeste}}}"
then span_zahl = span_zahl + 1
end
if span_Zuschauer ~= nil or "{{{Zuschauer}}}"
then span_zahl = span_zahl + 1
end
if span_VOD ~= nil or "{{{VOD}}}"
then span_zahl = span_zahl + 1
end
if span_Datum ~= nil or "{{{Datum}}}"
then span_zahl = span_zahl + 1
end
Inhalt_Spalte = " "
if Inhalt_Richtung == "{{{Inhalt_Richtung}}}" then align = "| align=\"left\" "
elseif Inhalt_Richtung == "center"
then align = "| align=\"center\" "
elseif Inhalt_Richtung == "right"
then align = "| align=\"right\" "
elseif Inhalt_Richtung == "left"
then align = "| align=\"left\" "
else
align = "| align=\"left\" "
end
if Inhalt_Farbe == "{{{Inhalt_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Inhalt_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Inhalt_Farbe .. " \"| "
end
span = "\" colspan=\"" .. span_zahl .. "\" "
if Inhalt == "{{{Inhalt}}}"
then Inhalt_Spalte = " "
else
InhaltSpalte = "|-\n" .. align .. span .. bg_color .. Inhalt
end
return Inhalt_Spalte
end
function Folge.Linie(frame)
local Linie_Farbe = frame.args.Linie_Color
local span_Nr = frame.args.Nr
local span_Thema = frame.args.Thema
local span_Moderator = frame.args.Moderator
local span_Gaeste = frame.args.Gaeste
local span_Zuschauer = frame.args.Zuschauer
local span_VOD = frame.args.VOD
local span_Datum = frame.args.Datum
local align = " "
local bg_color = " "
local span_zahl = " "
local span = " "
if span_Nr ~= nil or "{{{Nr}}}"
then span_zahl = span_zahl + 1
end
if span_Thema ~= nil or "{{{Thema}}}"
then span_zahl = span_zahl + 1
end
if span_Moderator ~= nil or "{{{Moderator}}}"
then span_zahl = span_zahl + 1
end
if span_Gaeste ~= nil or "{{{Gaeste}}}"
then span_zahl = span_zahl + 1
end
if span_Zuschauer ~= nil or "{{{Zuschauer}}}"
then span_zahl = span_zahl + 1
end
if span_VOD ~= nil or "{{{VOD}}}"
then span_zahl = span_zahl + 1
end
if span_Datum ~= nil or "{{{Datum}}}"
then span_zahl = span_zahl + 1
end
Linie_Spalte = " "
if Linie_Farbe == "{{{Linie_Color}}}"
then bg_color = "style=\"background: #ececec \"| "
elseif Linie_Farbe == nil
then bg_color = "style=\"background: #ececec \"| "
else
bg_color = "style=\"background: " .. Linie_Farbe .. " \"| "
end
span = "\" colspan=\"" .. span_zahl .. "\" "
if Linie_Farbe == "{{{Linie_Color}}}"
then Linie_Spalte = " "
else
LinieSpalte = "|-\n" .. span .. bg_color .. " "
end
return Linie_Spalte
end
return Folge