https://it.seminaverbi.bibleget.io/w/index.php?title=Modulo:Protezione&feed=atom&action=history
Modulo:Protezione - Cronologia
2024-03-28T10:18:50Z
Cronologia della pagina su questo sito
MediaWiki 1.41.0
https://it.seminaverbi.bibleget.io/w/index.php?title=Modulo:Protezione&diff=3828&oldid=prev
Johnrdorazio: una versione importata
2022-10-24T16:17:56Z
<p>una versione importata</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="it">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Versione meno recente</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Versione delle 16:17, 24 ott 2022</td>
</tr><tr><td colspan="2" class="diff-notice" lang="it"><div class="mw-diff-empty">(Nessuna differenza)</div>
</td></tr></table>
Johnrdorazio
https://it.seminaverbi.bibleget.io/w/index.php?title=Modulo:Protezione&diff=3827&oldid=prev
it>Sakretsu: modulo no globals obsoleto
2022-10-22T19:30:38Z
<p>modulo no globals obsoleto</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="it">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Versione meno recente</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Versione delle 19:30, 22 ott 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3">Riga 3:</td>
<td colspan="2" class="diff-lineno">Riga 3:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>]]--</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>]]--</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>require('<del style="font-weight: bold; text-decoration: none;">Modulo:No globals</del>')</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>require('<ins style="font-weight: bold; text-decoration: none;">strict</ins>')</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs = require('Modulo:Arguments').getArgs</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local getArgs = require('Modulo:Arguments').getArgs</div></td></tr>
</table>
it>Sakretsu
https://it.seminaverbi.bibleget.io/w/index.php?title=Modulo:Protezione&diff=428&oldid=prev
Johnrdorazio: una versione importata
2020-08-28T15:05:05Z
<p>una versione importata</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="it">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Versione meno recente</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Versione delle 15:05, 28 ago 2020</td>
</tr><tr><td colspan="2" class="diff-notice" lang="it"><div class="mw-diff-empty">(Nessuna differenza)</div>
</td></tr></table>
Johnrdorazio
https://it.seminaverbi.bibleget.io/w/index.php?title=Modulo:Protezione&diff=427&oldid=prev
it>Rotpunkt: aggiornato stile documentazione a quello usato in Mediawiki per Lua
2018-02-14T19:16:18Z
<p>aggiornato stile documentazione a quello usato in Mediawiki per Lua</p>
<p><b>Nuova pagina</b></p><div>--[[<br />
* Modulo che implementa il template Protetta.<br />
]]--<br />
<br />
require('Modulo:No globals')<br />
<br />
local getArgs = require('Modulo:Arguments').getArgs<br />
local cfg = mw.loadData('Modulo:Protezione/Configurazione')<br />
<br />
-- Restituisce la protezione della pagina per l'azione richiesta o nil se non protetta.<br />
--<br />
-- @param {table} title<br />
-- @param {string} action<br />
-- @return {string}<br />
local function getProtection(title, action)<br />
return title.protectionLevels[action] and title.protectionLevels[action][1]<br />
end<br />
<br />
-- Aggiunge l'icona per l'azione e la protezione specificate.<br />
--<br />
-- @param {string} action<br />
-- @param {string} prot<br />
local function addIcon(action, prot)<br />
-- l'underscore di move serve per cambiare l'ordine di visualizzazione delle icone<br />
local icon = string.format('<indicator name="prot%s">%s</indicator>',<br />
action == 'move' and '_move' or action, cfg.icone[action][prot])<br />
mw.getCurrentFrame():preprocess(icon)<br />
end<br />
<br />
-- Restituisce il messaggio configurato per il tipo di azione e protezione sulla pagina specificata.<br />
--<br />
-- @param {table} title<br />
-- @param {string} action<br />
-- @param {string} prot<br />
-- @return {string}<br />
local function getMsg(title, action, prot)<br />
local msg = cfg.messaggi[action][prot][title.namespace]<br />
return msg and msg:gsub('$1', string.format('[[%s|pagina di discussione]]', title.talkPageTitle.fullText)) or nil<br />
end<br />
<br />
-- Restituisce la categoria configurata per il tipo di azione e protezione sulla pagina specificata.<br />
--<br />
-- @param {table} title<br />
-- @param {string} action<br />
-- @param {string} prot<br />
-- @return {string}<br />
local function getCategory(title, action, prot)<br />
local categories = cfg.categorie[action]<br />
local cat = categories[title.namespace] or categories.default<br />
if prot == 'autoconfirmed' then<br />
cat = cat .. ' parzialmente'<br />
end<br />
return string.format('[[Categoria:%s]]', cat)<br />
end<br />
<br />
-- Restituisce la categoria arbitraria scelta dall'utente.<br />
--<br />
-- @param {string} editProt<br />
-- @param {table} args<br />
-- @return {string}<br />
local function getUserCategory(editProt, args)<br />
local cat<br />
if editProt == 'sysop' then<br />
cat = args.cat .. ' ' .. (args.generecat == 'm' and 'protetti' or 'protette')<br />
elseif editProt == 'autoconfirmed' then<br />
cat = args.cat .. ' ' .. (args.generecat == 'm' and 'protetti parzialmente' or 'protette parzialmente')<br />
end<br />
return cat and string.format('[[Categoria:%s]]', cat) or nil <br />
end<br />
<br />
-- =============================================================================<br />
-- Funzioni esportate<br />
-- =============================================================================<br />
<br />
local p = {}<br />
<br />
-- Funzione per l'utilizzo da un altro modulo.<br />
function p._main(args)<br />
local title, editProt, moveProt, editCat, moveCat, msg, ret<br />
<br />
title = mw.title.getCurrentTitle()<br />
editProt = getProtection(title, 'edit')<br />
moveProt = getProtection(title, 'move')<br />
-- moveProt=autoconfirmed è già il default in itwiki<br />
if moveProt == 'autoconfirmed' then<br />
moveProt = nil<br />
end<br />
<br />
-- protezione per la modifica<br />
if editProt then<br />
addIcon('edit', editProt)<br />
msg = getMsg(title, 'edit', editProt)<br />
-- il parametro "cat" permette di specificare una categoria arbitraria<br />
if args.cat then<br />
editCat = getUserCategory(editProt, args)<br />
else<br />
editCat = getCategory(title, 'edit', editProt)<br />
end<br />
end<br />
<br />
-- protezione per lo spostamento<br />
if moveProt then<br />
addIcon('move', moveProt)<br />
-- la categoria per lo spostamento non è aggiunta se editProt=sysop<br />
if editProt ~= 'sysop' then<br />
moveCat = getCategory(title, 'move', moveProt)<br />
end<br />
end<br />
<br />
if editProt or moveProt then<br />
ret = (msg or '') .. (editCat or '') .. (moveCat or '')<br />
else<br />
-- la pagina non è protetta<br />
if title.namespace == 10 and title.isSubpage and title.subpageText:match('^[Ss]andbox$') then<br />
ret = '[[Categoria:Sandbox dei template]]'<br />
else<br />
ret = string.format('[[Categoria:%s]]', cfg.catSprotette)<br />
end<br />
end<br />
<br />
return ret<br />
end<br />
<br />
-- Funzione per il template {{Protetta}}.<br />
function p.main(frame)<br />
return p._main(getArgs(frame, { parentOnly = true }))<br />
end<br />
<br />
return p</div>
it>Rotpunkt