Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 23: | Zeile 23: | ||
end | end | ||
if args["Beschreibung"] then | if args["Beschreibung"] then | ||
helper.setProperty({args = {["LPON: | helper.setProperty({args = {["LPON:Beschreibung"] = args["Beschreibung"]}}) | ||
end | end | ||
if args["Projekt"] then | if args["Projekt"] then | ||
Zeile 37: | Zeile 37: | ||
-- EmbedVideo generieren | -- EmbedVideo generieren | ||
if args["Service"] and args["ID"] then | if args["Service"] and args["ID"] then | ||
output = output .. | output = output .. "{{#ev:" .. args["Service"] .. "|" .. args["ID"] .. "|640||center|" .. (args["Titel"] or "Video") .. "}}\n" | ||
else | else | ||
output = output .. "<p>Keine Video-ID oder Service angegeben.</p>" | output = output .. "<p>Keine Video-ID oder Service angegeben.</p>" | ||
Zeile 44: | Zeile 44: | ||
-- Ausgabe der Episodendetails | -- Ausgabe der Episodendetails | ||
output = output .. '<div class="lpnon-episode-details">' | output = output .. '<div class="lpnon-episode-details">' | ||
output = output .. string.format(' | output = output .. string.format("; '''Titel''': %s\n", args["Titel"] or "Unbekannt") | ||
output = output .. string.format(' | output = output .. string.format("; '''Episodennummer''': %s\n", args["Episodennummer"] or "Unbekannt") | ||
output = output .. string.format(' | output = output .. string.format("; '''Veröffentlichungsdatum''': %s\n", args["Veröffentlichungsdatum"] or "Unbekannt") | ||
output = output .. string.format(' | output = output .. string.format("; '''Spieler''': %s\n", args["Spieler"] or "Unbekannt") | ||
output = output .. string.format(' | output = output .. string.format("; '''Beschreibung''': %s\n", args["Beschreibung"] or "Keine Beschreibung verfügbar") | ||
output = output .. '</div>' | output = output .. '</div>' | ||
Version vom 15. Dezember 2024, 23:08 Uhr
Die Dokumentation für dieses Modul kann unter Modul:LPON/Episode/Doku erstellt werden
local episode = {}
local helper = require('Module:LPON/Helper')
function episode.render(frame)
local args = require('Module:Arguments').getArgs(frame)
local output = ""
-- DISPLAYTITLE setzen
if args["Titel"] then
helper.setDisplayTitle({title = args["Titel"]})
helper.setProperty({args = {["LPON:Episodentitel"] = args["Titel"]}})
end
-- Semantische Attribute setzen
if args["Episodennummer"] then
helper.setProperty({args = {["LPON:Episodennummer"] = args["Episodennummer"]}})
end
if args["Veröffentlichungsdatum"] then
helper.setProperty({args = {["LPON:Veröffentlichungsdatum"] = args["Veröffentlichungsdatum"]}})
end
if args["Spieler"] then
helper.setProperty({args = {["LPON:Spieler"] = args["Spieler"]}})
end
if args["Beschreibung"] then
helper.setProperty({args = {["LPON:Beschreibung"] = args["Beschreibung"]}})
end
if args["Projekt"] then
helper.setProperty({args = {["LPON:Projekt"] = args["Projekt"]}})
end
if args["Service"] then
helper.setProperty({args = {["LPON:Service"] = args["Service"]}})
end
if args["ID"] then
helper.setProperty({args = {["LPON:ID"] = args["ID"]}})
end
-- EmbedVideo generieren
if args["Service"] and args["ID"] then
output = output .. "{{#ev:" .. args["Service"] .. "|" .. args["ID"] .. "|640||center|" .. (args["Titel"] or "Video") .. "}}\n"
else
output = output .. "<p>Keine Video-ID oder Service angegeben.</p>"
end
-- Ausgabe der Episodendetails
output = output .. '<div class="lpnon-episode-details">'
output = output .. string.format("; '''Titel''': %s\n", args["Titel"] or "Unbekannt")
output = output .. string.format("; '''Episodennummer''': %s\n", args["Episodennummer"] or "Unbekannt")
output = output .. string.format("; '''Veröffentlichungsdatum''': %s\n", args["Veröffentlichungsdatum"] or "Unbekannt")
output = output .. string.format("; '''Spieler''': %s\n", args["Spieler"] or "Unbekannt")
output = output .. string.format("; '''Beschreibung''': %s\n", args["Beschreibung"] or "Keine Beschreibung verfügbar")
output = output .. '</div>'
return output
end
return episode