<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="it">
	<id>https://gears.worldongames.it/quattrogatti/index.php?action=history&amp;feed=atom&amp;title=Modulo%3AProtezione</id>
	<title>Modulo:Protezione - Cronologia</title>
	<link rel="self" type="application/atom+xml" href="https://gears.worldongames.it/quattrogatti/index.php?action=history&amp;feed=atom&amp;title=Modulo%3AProtezione"/>
	<link rel="alternate" type="text/html" href="https://gears.worldongames.it/quattrogatti/index.php?title=Modulo:Protezione&amp;action=history"/>
	<updated>2026-05-19T06:36:45Z</updated>
	<subtitle>Cronologia della pagina su questo sito</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://gears.worldongames.it/quattrogatti/index.php?title=Modulo:Protezione&amp;diff=52&amp;oldid=prev</id>
		<title>GughyXIV: una versione importata</title>
		<link rel="alternate" type="text/html" href="https://gears.worldongames.it/quattrogatti/index.php?title=Modulo:Protezione&amp;diff=52&amp;oldid=prev"/>
		<updated>2022-10-04T12:56:55Z</updated>

		<summary type="html">&lt;p&gt;una versione importata&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;it&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Versione meno recente&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versione delle 14:56, 4 ott 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;it&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Nessuna differenza)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>GughyXIV</name></author>
	</entry>
	<entry>
		<id>https://gears.worldongames.it/quattrogatti/index.php?title=Modulo:Protezione&amp;diff=51&amp;oldid=prev</id>
		<title>wikipedia&gt;Rotpunkt: aggiornato stile documentazione a quello usato in Mediawiki per Lua</title>
		<link rel="alternate" type="text/html" href="https://gears.worldongames.it/quattrogatti/index.php?title=Modulo:Protezione&amp;diff=51&amp;oldid=prev"/>
		<updated>2018-02-14T19:16:18Z</updated>

		<summary type="html">&lt;p&gt;aggiornato stile documentazione a quello usato in Mediawiki per Lua&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nuova pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
* Modulo che implementa il template Protetta.&lt;br /&gt;
]]--&lt;br /&gt;
&lt;br /&gt;
require('Modulo:No globals')&lt;br /&gt;
&lt;br /&gt;
local getArgs = require('Modulo:Arguments').getArgs&lt;br /&gt;
local cfg = mw.loadData('Modulo:Protezione/Configurazione')&lt;br /&gt;
&lt;br /&gt;
-- Restituisce la protezione della pagina per l'azione richiesta o nil se non protetta.&lt;br /&gt;
--&lt;br /&gt;
-- @param {table} title&lt;br /&gt;
-- @param {string} action&lt;br /&gt;
-- @return {string}&lt;br /&gt;
local function getProtection(title, action)&lt;br /&gt;
	return title.protectionLevels[action] and title.protectionLevels[action][1]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Aggiunge l'icona per l'azione e la protezione specificate.&lt;br /&gt;
--&lt;br /&gt;
-- @param {string} action&lt;br /&gt;
-- @param {string} prot&lt;br /&gt;
local function addIcon(action, prot)&lt;br /&gt;
	-- l'underscore di move serve per cambiare l'ordine di visualizzazione delle icone&lt;br /&gt;
	local icon = string.format('&amp;lt;indicator name=&amp;quot;prot%s&amp;quot;&amp;gt;%s&amp;lt;/indicator&amp;gt;',&lt;br /&gt;
							   action == 'move' and '_move' or action, cfg.icone[action][prot])&lt;br /&gt;
	mw.getCurrentFrame():preprocess(icon)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Restituisce il messaggio configurato per il tipo di azione e protezione sulla pagina specificata.&lt;br /&gt;
--&lt;br /&gt;
-- @param {table} title&lt;br /&gt;
-- @param {string} action&lt;br /&gt;
-- @param {string} prot&lt;br /&gt;
-- @return {string}&lt;br /&gt;
local function getMsg(title, action, prot)&lt;br /&gt;
	local msg = cfg.messaggi[action][prot][title.namespace]&lt;br /&gt;
	return msg and msg:gsub('$1', string.format('[[%s|pagina di discussione]]', title.talkPageTitle.fullText)) or nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Restituisce la categoria configurata per il tipo di azione e protezione sulla pagina specificata.&lt;br /&gt;
--&lt;br /&gt;
-- @param {table} title&lt;br /&gt;
-- @param {string} action&lt;br /&gt;
-- @param {string} prot&lt;br /&gt;
-- @return {string}&lt;br /&gt;
local function getCategory(title, action, prot)&lt;br /&gt;
	local categories = cfg.categorie[action]&lt;br /&gt;
	local cat = categories[title.namespace] or categories.default&lt;br /&gt;
	if prot == 'autoconfirmed' then&lt;br /&gt;
		cat = cat .. ' parzialmente'&lt;br /&gt;
	end&lt;br /&gt;
	return string.format('[[Categoria:%s]]', cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Restituisce la categoria arbitraria scelta dall'utente.&lt;br /&gt;
--&lt;br /&gt;
-- @param {string} editProt&lt;br /&gt;
-- @param {table} args&lt;br /&gt;
-- @return {string}&lt;br /&gt;
local function getUserCategory(editProt, args)&lt;br /&gt;
	local cat&lt;br /&gt;
	if editProt == 'sysop' then&lt;br /&gt;
		cat = args.cat .. ' ' .. (args.generecat == 'm' and 'protetti' or 'protette')&lt;br /&gt;
	elseif editProt == 'autoconfirmed' then&lt;br /&gt;
		cat = args.cat .. ' ' .. (args.generecat == 'm' and 'protetti parzialmente' or 'protette parzialmente')&lt;br /&gt;
	end&lt;br /&gt;
	return cat and string.format('[[Categoria:%s]]', cat) or nil &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
--                            Funzioni esportate&lt;br /&gt;
-- =============================================================================&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Funzione per l'utilizzo da un altro modulo.&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local title, editProt, moveProt, editCat, moveCat, msg, ret&lt;br /&gt;
&lt;br /&gt;
	title = mw.title.getCurrentTitle()&lt;br /&gt;
	editProt = getProtection(title, 'edit')&lt;br /&gt;
	moveProt = getProtection(title, 'move')&lt;br /&gt;
	-- moveProt=autoconfirmed è già il default in itwiki&lt;br /&gt;
	if moveProt == 'autoconfirmed' then&lt;br /&gt;
		moveProt = nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- protezione per la modifica&lt;br /&gt;
	if editProt then&lt;br /&gt;
		addIcon('edit', editProt)&lt;br /&gt;
		msg = getMsg(title, 'edit', editProt)&lt;br /&gt;
		-- il parametro &amp;quot;cat&amp;quot; permette di specificare una categoria arbitraria&lt;br /&gt;
		if args.cat then&lt;br /&gt;
			editCat = getUserCategory(editProt, args)&lt;br /&gt;
		else&lt;br /&gt;
			editCat = getCategory(title, 'edit', editProt)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- protezione per lo spostamento&lt;br /&gt;
	if moveProt then&lt;br /&gt;
		addIcon('move', moveProt)&lt;br /&gt;
		-- la categoria per lo spostamento non è aggiunta se editProt=sysop&lt;br /&gt;
		if editProt ~= 'sysop' then&lt;br /&gt;
			moveCat = getCategory(title, 'move', moveProt)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if editProt or moveProt then&lt;br /&gt;
		ret = (msg or '') .. (editCat or '') .. (moveCat or '')&lt;br /&gt;
	else&lt;br /&gt;
		-- la pagina non è protetta&lt;br /&gt;
		if title.namespace == 10 and title.isSubpage and title.subpageText:match('^[Ss]andbox$') then&lt;br /&gt;
			ret = '[[Categoria:Sandbox dei template]]'&lt;br /&gt;
		else&lt;br /&gt;
			ret = string.format('[[Categoria:%s]]', cfg.catSprotette)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Funzione per il template {{Protetta}}.&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	return p._main(getArgs(frame, { parentOnly = true }))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Rotpunkt</name></author>
	</entry>
</feed>