Modulo:Partiti: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
provo |
m Modificate le impostazioni di protezione per "Modulo:Partiti": Template o modulo usato in maniera estensiva ([Modifica=Consentito solo agli amministratori] (infinito) [Spostamento=Consentito solo agli amministratori] (infinito)) |
||
(29 versioni intermedie di 2 utenti non mostrate) | |||
Riga 24:
local x2 = mw.ustring.find(b,'%|')
local x3 = mw.ustring.find(b,'%]%]')
local x4 = mw.ustring.find(b,'%<s')
local x5 = mw.ustring.find(b,'%–')
if (x3) then
if (x4) then
a=mw.ustring.sub(a,x1,x3+x1)
end
if (x5) then
a=mw.ustring.sub(a,x1,x3+x1)
end
if (x2) then
a = mw.ustring.sub(a,x1+2,x2+x1)
Line 77 ⟶ 85:
if args.partito then return _colore(args.partito) end
if args.gruppo then return _colore(args.gruppo) end
if args.coll then return _colore(args.coll) end
return ''
end
Line 130 ⟶ 139:
local function cod(frame)
local args = getArgs(frame, {frameOnly = true})
local
local
local
if (rgb:len() == 6) then
cls[1] = tonumber(rgb:sub(1,2),16) or 255
cls[2] = tonumber(rgb:sub(3,4),16) or 255
cls[3] = tonumber(rgb:sub(5,6),16) or 255
end
cls[1] = math.floor(cls[1]/255)
cls[2] = math.floor(cls[2]/255)
cls[3] = math.floor(cls[3]/255)
return string.format('%02x%02x%02x',cls[1],cls[2],cls[3])
end
|