Modulo:User
La documentazione per questo modulo può essere creata in Modulo:User/man
local ip=require('Modulo:IP validator')
local p = {}
function p.Utente(frame)
local utente = frame.args[1]
local opzione = frame.args[2]
local ipv4 = ip.is_ipv4( frame ) == '1';
local ipv6 = ip.is_ipv6( frame ) == '1';
if ipv4 or ipv6 then
return '[[Speciale:Contributi/' .. utente ..'|' .. utente ..']] ([[Discussioni utente:' .. utente ..'|discussioni]]'
else
if opzione == '0' or opzione == 'discussioni' then -- se è specificato lo "0" come secondo parametro, non visualizza i contributi
return '[[user:'..utente..'|'..utente..']] ([[Discussioni utente:' .. utente ..'|discussioni]]'
else
return '[[user:'..utente..'|'..utente..']] ([[Discussioni utente:' .. utente ..'|discussioni]] <span style="font-weight:bold;"> ·</span> [[Speciale:Contributi/' .. utente ..'|contributi]]'
end
end
end
return p