<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3AProtection_banner%2Fdocumentation</id>
	<title>Modul:Protection banner/documentation - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3AProtection_banner%2Fdocumentation"/>
	<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=Modul:Protection_banner/documentation&amp;action=history"/>
	<updated>2026-04-06T02:13:53Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Verzauberte Welten e.V.</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.verzauberte-welten.de/index.php?title=Modul:Protection_banner/documentation&amp;diff=450&amp;oldid=prev</id>
		<title>mw&gt;Oetterer: Schützte „Modul:Protection banner/documentation“: Häufig eingebundenes Modul ([Bearbeiten=Nur Administratoren erlauben] (unbeschränkt) [Verschieben=Nur Administratoren erlauben] (unbeschränkt))</title>
		<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=Modul:Protection_banner/documentation&amp;diff=450&amp;oldid=prev"/>
		<updated>2014-10-07T09:50:08Z</updated>

		<summary type="html">&lt;p&gt;Schützte „&lt;a href=&quot;/Modul:Protection_banner/documentation&quot; title=&quot;Modul:Protection banner/documentation&quot;&gt;Modul:Protection banner/documentation&lt;/a&gt;“: Häufig eingebundenes Modul ([Bearbeiten=Nur Administratoren erlauben] (unbeschränkt) [Verschieben=Nur Administratoren erlauben] (unbeschränkt))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module generates documentation for [[Module:Protection banner]].&lt;br /&gt;
&lt;br /&gt;
local class = require('Module:Middleclass').class&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Documentation class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Documentation = class('Documentation')&lt;br /&gt;
&lt;br /&gt;
function Documentation:initialize(mainCfg, docCfg)&lt;br /&gt;
	self._mainCfg = mainCfg&lt;br /&gt;
	self._docCfg = docCfg&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Documentation:makeReasonTable()&lt;br /&gt;
	-- Get the data from the cfg.banners table.&lt;br /&gt;
	local rowData = {}&lt;br /&gt;
	for action, reasonTables in pairs(self._mainCfg.banners) do&lt;br /&gt;
		for reason, t in pairs(reasonTables) do&lt;br /&gt;
			rowData[#rowData + 1] = {&lt;br /&gt;
				reason = reason,&lt;br /&gt;
				action = action,&lt;br /&gt;
				description = t.description&lt;br /&gt;
			}&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Sort the table into alphabetical order, first by action and then by&lt;br /&gt;
	-- reason.&lt;br /&gt;
	table.sort(rowData, function (t1, t2)&lt;br /&gt;
		if t1.action == t2.action then&lt;br /&gt;
			return t1.reason &amp;lt; t2.reason&lt;br /&gt;
		else&lt;br /&gt;
			return t1.action &amp;lt; t2.action&lt;br /&gt;
		end&lt;br /&gt;
	end)&lt;br /&gt;
	&lt;br /&gt;
	-- Assemble a wikitable of the data.&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	ret[#ret + 1] = '{| class=&amp;quot;wikitable&amp;quot;'&lt;br /&gt;
	if #rowData &amp;lt; 1 then&lt;br /&gt;
		ret[#ret + 1] = '|-'&lt;br /&gt;
		ret[#ret + 1] = string.format(&lt;br /&gt;
			'| colspan=&amp;quot;3&amp;quot; | %s',&lt;br /&gt;
			self._docCfg['documentation-blurb-noreasons']&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		-- Header&lt;br /&gt;
		ret[#ret + 1] = '|-'&lt;br /&gt;
		ret[#ret + 1] = string.format(&lt;br /&gt;
			'! %s\n! %s\n! %s',&lt;br /&gt;
			self._docCfg['documentation-heading-reason'],&lt;br /&gt;
			self._docCfg['documentation-heading-action'],&lt;br /&gt;
			self._docCfg['documentation-heading-description']&lt;br /&gt;
		)&lt;br /&gt;
		-- Rows&lt;br /&gt;
		for _, t in ipairs(rowData) do&lt;br /&gt;
			ret[#ret + 1] = '|-'&lt;br /&gt;
			ret[#ret + 1] = string.format(&lt;br /&gt;
				'| %s\n| %s\n| %s',&lt;br /&gt;
				t.reason,&lt;br /&gt;
				t.action,&lt;br /&gt;
				t.description or ''&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	ret[#ret + 1] = '|}'&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(ret, '\n')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.reasonTable()&lt;br /&gt;
	local mainCfg = require('Module:Protection banner/config')&lt;br /&gt;
	local docCfg = require('Module:Protection banner/documentation/config')&lt;br /&gt;
	local documentationObj = Documentation:new(mainCfg, docCfg)&lt;br /&gt;
	return documentationObj:makeReasonTable()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>mw&gt;Oetterer</name></author>
	</entry>
</feed>