Modul:MitarbeitAn: Unterschied zwischen den Versionen

Aus Splitterwiki
Zur Navigation springen Zur Suche springen
 
Zeile 3: Zeile 3:
 
function p.getMitarbeit( frame )
 
function p.getMitarbeit( frame )
 
local Name= frame.args['Name']
 
local Name= frame.args['Name']
local ReturnString = '<h1>' .. Name .. ' beteiligte sich an Folgenden Publikationen:</h1>'
+
local ReturnString = '<h2>' .. Name .. ' beteiligte sich an Folgenden Publikationen:</h2>'
 
-- Redakteuer
 
-- Redakteuer
 
local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::offiziell]][[Redaktion::'.. Name ..']]|limit=500')
 
local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::offiziell]][[Redaktion::'.. Name ..']]|limit=500')
 
n = 1
 
n = 1
 
if queryResult ~= nil then
 
if queryResult ~= nil then
ReturnString = ReturnString .. '<h2>Redakteur:in</h2><small>'
+
ReturnString = ReturnString .. '<h3>Redakteur:in</h3><small>'
 
while n <= table.getn(queryResult)
 
while n <= table.getn(queryResult)
 
do
 
do
Zeile 20: Zeile 20:
 
n = 1
 
n = 1
 
if queryResult ~= nil then
 
if queryResult ~= nil then
ReturnString = ReturnString .. '<h2>Autor:in</h2><small>'
+
ReturnString = ReturnString .. '<h3>Autor:in</h3><small>'
 
while n <= table.getn(queryResult)
 
while n <= table.getn(queryResult)
 
do
 
do
Zeile 32: Zeile 32:
 
n = 1
 
n = 1
 
if queryResult ~= nil then
 
if queryResult ~= nil then
ReturnString = ReturnString .. '<h2>Illustrator:in</h2><small>'
+
ReturnString = ReturnString .. '<h3>Illustrator:in</h3><small>'
 
while n <= table.getn(queryResult)
 
while n <= table.getn(queryResult)
 
do
 
do
Zeile 44: Zeile 44:
 
n = 1
 
n = 1
 
if queryResult ~= nil then
 
if queryResult ~= nil then
ReturnString = ReturnString .. '<h2>Fan Redakteur:in</h2><small>'
+
ReturnString = ReturnString .. '<h3>Fan Redakteur:in</h3><small>'
 
while n <= table.getn(queryResult)
 
while n <= table.getn(queryResult)
 
do
 
do
Zeile 56: Zeile 56:
 
n = 1
 
n = 1
 
if queryResult ~= nil then
 
if queryResult ~= nil then
ReturnString = ReturnString .. '<h2>Fan Autor:in</h2><small>'
+
ReturnString = ReturnString .. '<h3>Fan Autor:in</h3><small>'
 
while n <= table.getn(queryResult)
 
while n <= table.getn(queryResult)
 
do
 
do
Zeile 68: Zeile 68:
 
n = 1
 
n = 1
 
if queryResult ~= nil then
 
if queryResult ~= nil then
ReturnString = ReturnString .. '<h2>Fan Illustrator:in</h2><small>'
+
ReturnString = ReturnString .. '<h3>Fan Illustrator:in</h3><small>'
 
while n <= table.getn(queryResult)
 
while n <= table.getn(queryResult)
 
do
 
do

Aktuelle Version vom 25. Dezember 2021, 16:16 Uhr

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

local p = {} --local p = {} -- p steht für Paket (engl. package)

function p.getMitarbeit( frame )
	local Name= frame.args['Name']
	local ReturnString = '<h2>' .. Name .. ' beteiligte sich an Folgenden Publikationen:</h2>'
	-- Redakteuer
	local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::offiziell]][[Redaktion::'.. Name ..']]|limit=500')
	n = 1
	if queryResult ~= nil then
		ReturnString = ReturnString .. '<h3>Redakteur:in</h3><small>'
		while n <= table.getn(queryResult)
		do
				ReturnString = ReturnString .. queryResult[n][1] .. ', '
				n = n +1
		end
		ReturnString = ReturnString ..'</small>'
	end
	-- autorenschaft
	local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::offiziell]][[Autoren::'.. Name ..']]|limit=500')
	n = 1
	if queryResult ~= nil then
		ReturnString = ReturnString .. '<h3>Autor:in</h3><small>'
		while n <= table.getn(queryResult)
		do
				ReturnString = ReturnString .. queryResult[n][1] .. ', '
				n = n +1
		end
		ReturnString = ReturnString ..'</small>'
	end
	-- Illustration
	local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::offiziell]][[Illustratoren::'.. Name ..']]|limit=500')
	n = 1
	if queryResult ~= nil then
		ReturnString = ReturnString .. '<h3>Illustrator:in</h3><small>'
		while n <= table.getn(queryResult)
		do
				ReturnString = ReturnString .. queryResult[n][1] .. ', '
				n = n +1
		end
		ReturnString = ReturnString ..'</small>'
	end
	-- fan reaktion
	local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::nicht offiziell]][[Redaktion::'.. Name ..']]|limit=500')
	n = 1
	if queryResult ~= nil then
		ReturnString = ReturnString .. '<h3>Fan Redakteur:in</h3><small>'
		while n <= table.getn(queryResult)
		do
				ReturnString = ReturnString .. queryResult[n][1] .. ', '
				n = n +1
		end
		ReturnString = ReturnString ..'</small>'
	end
	-- fan autorenschaft
	local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::nicht offiziell]][[Autoren::'.. Name ..']]|limit=500')
	n = 1
	if queryResult ~= nil then
		ReturnString = ReturnString .. '<h3>Fan Autor:in</h3><small>'
		while n <= table.getn(queryResult)
		do
				ReturnString = ReturnString .. queryResult[n][1] .. ', '
				n = n +1
		end
		ReturnString = ReturnString ..'</small>'
	end
	-- Illustration
	local queryResult =  mw.smw.ask('[[Hauptkategorie::Publikation]][[Kanon::nicht offiziell]][[Illustratoren::'.. Name ..']]|limit=500')
	n = 1
	if queryResult ~= nil then
		ReturnString = ReturnString .. '<h3>Fan Illustrator:in</h3><small>'
		while n <= table.getn(queryResult)
		do
				ReturnString = ReturnString .. queryResult[n][1] .. ', '
				n = n +1
		end
		ReturnString = ReturnString ..'</small>'
	end
    return ReturnString
end

return p