Aktionen

Modul

Modul:FolgeTest

Aus Bohnenwiki

Version vom 17. Juli 2015, 19:43 Uhr von Taedison (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Die Dokumentation für dieses Modul kann unter Modul:FolgeTest/Doku erstellt werden

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 align = " "
	local bg_color = " "
	local span = " colspan=\"1\" "
	
	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 == "{{{Nr}}}"
			then Nummer_Spalte = " "
		elseif Nummer == nil
			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 = " colspan=\"1\" "
	
	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 == "{{{Thema}}}"
			then Thema_Spalte = " " 
		elseif Thema == nil
			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 = " colspan=\"1\" "
	
	Moderator_Spalte = " "
	
	if Moderator_Richtung == "{{{Moderatoren_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 == "{{{Moderatoren_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 == "{{{Moderatoren}}}"
			then Moderator_Spalte = " "
		elseif Moderator == nil
			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 = " colspan=\"1\" "
	
	Gaeste_Spalte = " "
	
	if Gaeste_Richtung == "nein" 
                        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 == "nein"
			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 == "nein"
			then Gaeste_Spalte = " "
		elseif Gaeste == nil
			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 = " colspan=\"1\" "
	
	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 == "{{{Zuschauer}}}"
			then Zuschauer_Spalte = " "
		elseif Zuschauer == nil
			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 = " colspan=\"1\" "
	
	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 == "{{{VOD}}}"
			then VOD_Spalte = " "
		elseif VOD == nil
			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 = " colspan=\"1\" "
	
	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 == "{{{Datum}}}"
			then Datum_Spalte = " "
		elseif Datum == nil
			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 = tonumber(frame.args.Nr)
	local span_Thema = tonumber(frame.args.Thema)
	local span_Moderator = tonumber(frame.args.Moderator)
	local span_Gaeste = tonumber(frame.args.Gaeste)
	local span_Zuschauer = tonumber(frame.args.Zuschauer)
	local span_VOD = tonumber(frame.args.VOD)
	local span_Datum = tonumber(frame.args.Datum)
	
	local align = " "
	local bg_color = " "
	local span_zahl = span_Nr + span_Thema + span_Moderator + span_Gaeste + span_Zuschauer + span_VOD + span_Datum
	local span = " "

	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 = " "
		elseif Inhalt == nil
			then Inhalt_Spalte = " "
		else 
			Inhalt_Spalte = "|-\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 = tonumber(frame.args.Nr)
	local span_Thema = tonumber(frame.args.Thema)
	local span_Moderator = tonumber(frame.args.Moderator)
	local span_Gaeste = tonumber(frame.args.Gaeste)
	local span_Zuschauer = tonumber(frame.args.Zuschauer)
	local span_VOD = tonumber(frame.args.VOD)
	local span_Datum = tonumber(frame.args.Datum)
	
	local align = " "
	local bg_color = " "
	local span_zahl = span_Nr + span_Thema + span_Moderator + span_Gaeste + span_Zuschauer + span_VOD + span_Datum
	local span = " "

	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 = " "
		elseif Linie_Farbe == nil
			then Linie_Spalte = " "
		else 
			Linie_Spalte = "|-\n" .. span .. bg_color .. " "
	end
        return Linie_Spalte

end

return Folge
Cookies helfen uns bei der Bereitstellung von Bohnenwiki. Durch die Nutzung von Bohnenwiki erklärst du dich damit einverstanden, dass wir Cookies speichern.