Test2: Unterschied zwischen den Versionen
Aus Bohnenwiki
(Die Seite wurde neu angelegt: „p = {} function p.Nr() local Nummer = frame.args.Nr local Nummer_Richtung = frame.args.Nr_Align local Nummer_Farbe = frame.args.Nr_Color local a = " "…“) |
KKeine Bearbeitungszusammenfassung |
||
(7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
p = {} | p = {} | ||
function p.Nr() | function p.Nr(frame) | ||
local Nummer = frame.args.Nr | local Nummer = frame.args.Nr | ||
local Nummer_Richtung = frame.args.Nr_Align | local Nummer_Richtung = frame.args.Nr_Align | ||
local Nummer_Farbe = frame.args.Nr_Color | local Nummer_Farbe = frame.args.Nr_Color | ||
local | local align = " " | ||
local | local bg_color = " " | ||
Nummer_Spalte = " " | Nummer_Spalte = " " | ||
if Nummer_Richtung == nil then | if Nummer_Richtung == nil then align = "| align=\"right\" " | ||
elseif Nummer_Richtung == "center" | elseif Nummer_Richtung == "center" | ||
then | then align = "| align=\"center\" " | ||
else | else | ||
align = "| align=\"right\" " | |||
end | end | ||
if Nummer_Farbe == | if Nummer_Farbe == "{{{Nr_Color}}}" | ||
then | then bg_color = "style=\"background: #ff4252 \"| " | ||
else | else | ||
bg_color = "style=\"background: " .. Nummer_Farbe .. " \"| " | |||
end | end | ||
if Nummer == | if Nummer == "{{{Nr}}}" | ||
then Nummer_Spalte = " " | then Nummer_Spalte = "|- \n " | ||
else | else | ||
Nummer_Spalte = | Nummer_Spalte = "|- \n" .. align .. bg_color .. Nummer | ||
end | end | ||
return Nummer_Spalte | return Nummer_Spalte | ||
end | end | ||
function p.Thema() | function p.Thema(frame) | ||
local Thema = frame.args.Thema | local Thema = frame.args.Thema | ||
local Thema_Richtung = frame.args.Thema_Align | local Thema_Richtung = frame.args.Thema_Align | ||
Zeile 46: | Zeile 46: | ||
then a = "| align=\"center\" " | then a = "| align=\"center\" " | ||
else | else | ||
a = "| align=\"right" | a = "| align=\"right\" " | ||
end | end | ||
Zeile 63: | Zeile 63: | ||
end | end | ||
function p.Moderator() | function p.Moderator(frame) | ||
local Moderator = frame.args.Moderator | local Moderator = frame.args.Moderator | ||
local Moderator_Richtung = frame.args.Moderator_Align | local Moderator_Richtung = frame.args.Moderator_Align | ||
Zeile 77: | Zeile 77: | ||
then a = "| align=\"center\" " | then a = "| align=\"center\" " | ||
else | else | ||
a = "| align=\"right" | a = "| align=\"right\" " | ||
end | end | ||
Zeile 94: | Zeile 94: | ||
end | end | ||
function p.Gaeste() | function p.Gaeste(frame) | ||
local Gaeste = frame.args.Gaeste | local Gaeste = frame.args.Gaeste | ||
local Gaeste_Richtung = frame.args.Gaeste_Align | local Gaeste_Richtung = frame.args.Gaeste_Align | ||
Zeile 108: | Zeile 108: | ||
then a = "| align=\"center\" " | then a = "| align=\"center\" " | ||
else | else | ||
a = "| align=\"right" | a = "| align=\"right\" " | ||
end | end | ||
Zeile 125: | Zeile 125: | ||
end | end | ||
function p.Zuschauer() | function p.Zuschauer(frame) | ||
local Zuschauer = frame.args.Zuschauer | local Zuschauer = frame.args.Zuschauer | ||
local Zuschauer_Richtung = frame.args.Zuschauer_Align | local Zuschauer_Richtung = frame.args.Zuschauer_Align | ||
Zeile 139: | Zeile 139: | ||
then a = "| align=\"center\" " | then a = "| align=\"center\" " | ||
else | else | ||
a = "| align=\"right" | a = "| align=\"right\" " | ||
end | end | ||
Zeile 156: | Zeile 156: | ||
end | end | ||
function p.VOD() | function p.VOD(frame) | ||
local VOD = frame.args.VOD | local VOD = frame.args.VOD | ||
local VOD_Richtung = frame.args.VOD_Align | local VOD_Richtung = frame.args.VOD_Align | ||
Zeile 170: | Zeile 170: | ||
then a = "| align=\"center\" " | then a = "| align=\"center\" " | ||
else | else | ||
a = "| align=\"right" | a = "| align=\"right\" " | ||
end | end | ||
Aktuelle Version vom 13. Juli 2015, 06:05 Uhr
Die Dokumentation für dieses Modul kann unter Modul:Test2/Doku erstellt werden
p = {}
function p.Nr(frame)
local Nummer = frame.args.Nr
local Nummer_Richtung = frame.args.Nr_Align
local Nummer_Farbe = frame.args.Nr_Color
local align = " "
local bg_color = " "
Nummer_Spalte = " "
if Nummer_Richtung == nil then align = "| align=\"right\" "
elseif Nummer_Richtung == "center"
then align = "| align=\"center\" "
else
align = "| align=\"right\" "
end
if Nummer_Farbe == "{{{Nr_Color}}}"
then bg_color = "style=\"background: #ff4252 \"| "
else
bg_color = "style=\"background: " .. Nummer_Farbe .. " \"| "
end
if Nummer == "{{{Nr}}}"
then Nummer_Spalte = "|- \n "
else
Nummer_Spalte = "|- \n" .. align .. bg_color .. Nummer
end
return Nummer_Spalte
end
function p.Thema(frame)
local Thema = frame.args.Thema
local Thema_Richtung = frame.args.Thema_Align
local Thema_Farbe = frame.args.Thema_Color
local a = " "
local b = " "
Thema_Spalte = " "
if Thema_Richtung == nil then a = "| align=\"right\" "
elseif Thema_Richtung == "center"
then a = "| align=\"center\" "
else
a = "| align=\"right\" "
end
if Thema_Farbe == nil
then b = "style=\"background: #ff4252\""
else
b = "style=\"background: " .. Thema_Farbe .. " \"| "
end
if Thema == nil
then Thema_Spalte = " "
else
Thema_Spalte = a .. b .. Thema
end
return Thema_Spalte
end
function p.Moderator(frame)
local Moderator = frame.args.Moderator
local Moderator_Richtung = frame.args.Moderator_Align
local Moderator_Farbe = frame.args.Moderator_Color
local a = " "
local b = " "
Moderator_Spalte = " "
if Moderator_Richtung == nil then a = "| align=\"right\" "
elseif Moderator_Richtung == "center"
then a = "| align=\"center\" "
else
a = "| align=\"right\" "
end
if Moderator_Farbe == nil
then b = "style=\"background: #ff4252\""
else
b = "style=\"background: " .. Moderator_Farbe .. " \"| "
end
if Moderator == nil
then Moderator_Spalte = " "
else
Moderator_Spalte = a .. b .. Moderator
end
return Moderator_Spalte
end
function p.Gaeste(frame)
local Gaeste = frame.args.Gaeste
local Gaeste_Richtung = frame.args.Gaeste_Align
local Gaeste_Farbe = frame.args.Gaeste_Color
local a = " "
local b = " "
Gaeste_Spalte = " "
if Gaeste_Richtung == nil then a = "| align=\"right\" "
elseif Gaeste_Richtung == "center"
then a = "| align=\"center\" "
else
a = "| align=\"right\" "
end
if Gaeste_Farbe == nil
then b = "style=\"background: #ff4252\""
else
b = "style=\"background: " .. Gaeste_Farbe .. " \"| "
end
if Gaeste == nil
then Gaeste_Spalte = " "
else
Gaeste_Spalte = a .. b .. Gaeste
end
return Gaeste_Spalte
end
function p.Zuschauer(frame)
local Zuschauer = frame.args.Zuschauer
local Zuschauer_Richtung = frame.args.Zuschauer_Align
local Zuschauer_Farbe = frame.args.Zuschauer_Color
local a = " "
local b = " "
Zuschauer_Spalte = " "
if Zuschauer_Richtung == nil then a = "| align=\"right\" "
elseif Zuschauer_Richtung == "center"
then a = "| align=\"center\" "
else
a = "| align=\"right\" "
end
if Zuschauer_Farbe == nil
then b = "style=\"background: #ff4252\""
else
b = "style=\"background: " .. Zuschauer_Farbe .. " \"| "
end
if Zuschauer == nil
then Zuschauer_Spalte = " "
else
Zuschauer_Spalte = a .. b .. Zuschauer
end
return Zuschauer_Spalte
end
function p.VOD(frame)
local VOD = frame.args.VOD
local VOD_Richtung = frame.args.VOD_Align
local VOD_Farbe = frame.args.VOD_Color
local a = " "
local b = " "
VOD_Spalte = " "
if VOD_Richtung == nil then a = "| align=\"right\" "
elseif VOD_Richtung == "center"
then a = "| align=\"center\" "
else
a = "| align=\"right\" "
end
if VOD_Farbe == nil
then b = "style=\"background: #ff4252\""
else
b = "style=\"background: " .. VOD_Farbe .. " \"| "
end
if VOD == nil
then VOD_Spalte = " "
else
VOD_Spalte = a .. b .. VOD
end
return VOD_Spalte
end
return p