Modulo:Sandbox/ppong

Versione del 20 mag 2015 alle 17:17 di Ppong.it (discussione | contributi) (Nuova pagina: local p= {} local A= { ["FRA"]= "Flag of France.svg"} local B= { ["FRA"]= "della "} local C= { ["FRA"]= "Francia"} local D= {} local E= {} local Tipo= {} loca...)
(diff) ← Versione meno recente | Versione attuale (diff) | Versione più recente → (diff)
local p= {}

local A= {
	["FRA"]= "Flag of France.svg"}

local B= {
	["FRA"]= "della "}

local C= {
	["FRA"]= "Francia"}

local D= {}

local E= {}

local Tipo= {}

local SB= {}

local BL= {}

local sport= {
	["CA"]= "Calcio"}

function p.db (frame)			--da completare, sempre che ne valga la pena
	if frame["args"][1] == "a" then
		return A[frame["args"][0]]
			end
	end

function p.visualizza (frame)	--da completare
	local out= "{| class=\"wikitable\" \n!codice !!bandiera !!genitivo\n"
	local e= "FRA"				--da sostituire con un ciclo
	out= out.."|-\n|"..e.."||[[file:"..A[e].."|20px]] "..A[e].."||"..B[e]..C[e].."\n"
	out= out.."|}"
	return out
	end

function p.nazNB (frame)		--completo, credo
	local args= frame:getParent()
	local out= "[[nazionale"								-- si inizia a definire il link
	if Tipo[args[1]] then
		out= "[[selezione" end
	if args[3] then
		out= out.." "..args[3] end
	out= out.." di "..sport[args[0]]
	if args[2] == "M" then
		out= out.." maschile"
	elseif args[2] == "F" then
		out= out.." femminile" end
	if D[args[1]] then
		out= out.." "..D[args[1]]
	else
		out= out.." "..B[args[1]]..C[args[1]] end
	out= out.."|"..C[args[1]]								-- si definisce il testo del link
	if args[3] and not args[4] then
		out= out.." "..args[3] end
	out= out.."]]"
	return out
	end

--function p.bandiera (frame)
	
--function p.naz (frame)
	
return p