Das Modul dient zur Darstellung verschiedener Publikationstypen in einer einheitlichen Form. Es verwendet Submodule für spezifische Publikationstypen.
Verwendung
Das Modul wird über die Vorlage `Unbekannter Publikationstyp ` aufgerufen. Der Typ der Publikation wird durch den Parameter `Typ` definiert. Basierend auf diesem Parameter wird das entsprechende Submodul verwendet.
Syntax
{{Publikation | Typ = <Publikationstyp> | Titel = <Titel der Publikation> | Autor = <Autor(en)> | Weitere Parameter abhängig vom Publikationstyp... }}
Unterstützte Publikationstypen
Das Modul unterstützt die folgenden Publikationstypen:
Buch
Das Submodul `Modul:Publikation/Buch` wird verwendet, um Bücher darzustellen.
Parameter:
- `Titel`: Der Titel des Buches.
- `Autor`: Autor(en), kommasepariert bei mehreren.
- `Band`: Bandnummer, falls es Teil einer Serie ist.
- `SerienID`: Eine eindeutige ID für die Serie.
- `Verlag`: Der Verlag des Buches.
- `ISBN-10` / `ISBN-13`: ISBN-Nummern.
- `Sprache`: Sprache des Buches.
- `Standort`: Standort im Regal.
- `Umfang`: Seitenanzahl.
- `Inhaltszusammenfassung`: Eine kurze Beschreibung des Buchinhalts.
Manga
Das Submodul `Modul:Publikation/Manga` wird für Manga verwendet.
Parameter:
- `Titel`: Der Titel des Manga.
- `Mangaka`: Der/die Mangaka (Zeichner).
- `Band`: Bandnummer.
- `SerienID`: Eine eindeutige ID für die Serie.
- `Genre`: Genre(s), kommasepariert.
Artikel
Das Submodul `Modul:Publikation/Artikel` dient zur Darstellung von Artikeln aus anderen Werken.
Parameter:
- `Titel`: Titel des Artikels.
- `Autor`: Autor(en) des Artikels.
- `Publikationswerk`: Name des Werks, in dem der Artikel veröffentlicht wurde.
- `Seitenzahl`: Seitenanzahl des Artikels.
Zeitschrift
Das Submodul `Modul:Publikation/Zeitschrift` wird für Zeitschrifteneinträge genutzt.
Parameter:
- `Titel`: Titel der Zeitschrift.
- `Jahrgang`: Jahrgang der Zeitschrift.
- `Ausgabe`: Ausgabennummer.
- `ISSN`: ISSN-Nummer.
Erweiterbarkeit
Falls weitere Publikationstypen hinzugefügt werden sollen, kann dies durch ein neues Submodul erfolgen. Dieses Submodul sollte die Funktion `render(frame)` implementieren.
Beispiele
Buch
{{Publikation | Typ = Buch | Titel = Das Reich der Vampire: A Tale of Blood and Darkness | Autor = Jay Kristoff | Band = 1 | SerienID = 001 }}
Manga
{{Publikation | Typ = Manga | Titel = One Piece | Mangaka = Eiichiro Oda | Band = 101 | SerienID = 002 }}
Entwicklerhinweise
Das Modul verwendet die Submodule:
- `Modul:Publikation/Buch`
- `Modul:Publikation/Manga`
- `Modul:Publikation/Artikel`
- `Modul:Publikation/Zeitschrift`
- `Modul:Publikation/Helper` (gemeinsame Hilfsfunktionen)
- `Modul:Publikation/Related` (Verknüpfte Publikationen)
local p = {}
-- Hauptfunktion zum Generieren der Publikation
function p.generatePublication(frame)
local args = frame.args
local typ = args["Typ"] or "Buch" -- Standardtyp: Buch
local result = ""
-- Unterschiedliche Darstellungen je nach Publikationstyp
if typ == "Buch" then
result = result .. p.renderBook(args)
elseif typ == "Zeitschrift" then
result = result .. p.renderMagazine(args)
elseif typ == "Sammelband" then
result = result .. p.renderAnthology(args)
elseif typ == "Artikel" then
result = result .. p.renderArticle(args)
elseif typ == "Manga" then
result = result .. p.renderManga(args)
else
result = "Unbekannter Publikationstyp"
end
return result
end
-- Funktion zur Darstellung eines Buches
function p.renderBook(args)
local output = '<div class="publikation buch">'
output = output .. "<strong>Titel</strong>: " .. (args["Titel"] or "") .. "<br>"
output = output .. "<strong>Autor</strong>: [[" .. (args["Autor"] or "Unbekannt") .. "]]<br>"
output = output .. "<strong>Erscheinungsjahr</strong>: " .. (args["Erscheinungsjahr"] or "") .. "<br>"
output = output .. "<strong>Genre</strong>: " .. (args["Genre"] or "") .. "<br>"
output = output .. "<strong>Cover</strong>: [[File:" .. (args["Coverbild"] or "StandardCover.jpg") .. "|200px]]<br>"
output = output .. '</div>'
return output
end
-- Funktion zur Darstellung einer Zeitschrift
function p.renderMagazine(args)
local output = '<div class="publikation zeitschrift">'
output = output .. "<strong>Titel</strong>: " .. (args["Titel"] or "") .. "<br>"
output = output .. "<strong>Herausgeber</strong>: [[" .. (args["Herausgeber"] or "Unbekannt") .. "]]<br>"
output = output .. "<strong>Jahrgang</strong>: " .. (args["Jahrgang"] or "") .. "<br>"
output = output .. "<strong>ISSN</strong>: " .. (args["ISSN"] or "") .. "<br>"
output = output .. '</div>'
return output
end
-- Funktion zur Darstellung eines Sammelbandes
function p.renderAnthology(args)
local output = '<div class="publikation sammelband">'
output = output .. "<strong>Titel</strong>: " .. (args["Titel"] or "") .. "<br>"
output = output .. "<strong>Herausgeber</strong>: [[" .. (args["Herausgeber"] or "Unbekannt") .. "]]<br>"
output = output .. "<strong>Thema</strong>: " .. (args["Thema"] or "") .. "<br>"
output = output .. "<strong>Cover</strong>: [[File:" .. (args["Coverbild"] or "StandardCover.jpg") .. "|200px]]<br>"
output = output .. '</div>'
return output
end
-- Funktion zur Darstellung eines Artikels
function p.renderArticle(args)
local output = '<div class="publikation artikel">'
output = output .. "<strong>Titel</strong>: " .. (args["Titel"] or "") .. "<br>"
output = output .. "<strong>Autor</strong>: [[" .. (args["Autor"] or "Unbekannt") .. "]]<br>"
output = output .. "<strong>Publiziert in</strong>: [[" .. (args["Publikationswerk"] or "Unbekannt") .. "]]<br>"
output = output .. "<strong>Seitenzahl</strong>: " .. (args["Seitenzahl"] or "") .. "<br>"
output = output .. '</div>'
return output
end
-- Funktion zur Darstellung eines Mangas
function p.renderManga(args)
local output = '<div class="publikation manga">'
output = output .. "<strong>Titel</strong>: " .. (args["Titel"] or "") .. "<br>"
output = output .. "<strong>Autor</strong>: [[" .. (args["Mangaka"] or "Unbekannt") .. "]]<br>"
output = output .. "<strong>Verlag</strong>: " .. (args["Verlag"] or "") .. "<br>"
output = output .. "<strong>Bände</strong>: " .. (args["Bände"] or "") .. "<br>"
output = output .. "<strong>Cover</strong>: [[File:" .. (args["Coverbild"] or "StandardMangaCover.jpg") .. "|200px]]<br>"
output = output .. '</div>'
return output
end
return p