Diferencia entre revisiones de «Módulo:Ficha de selecciones deportivas»

Contenido eliminado Contenido añadido
++
Simplifico operaciones repetitivas con funciones auxiliares 'helperBandera' y 'helperParticipaciones'; aseguro cadenas de texto con 'safeText'; otros cambios menores y tabulaciones
Línea 7:
local argumento = ModuloArgs.obtenerValorDeArgumentos
 
local function obtenerPRIsafeText(frametext)
return text or ''
local contador = 1
local cadenaret = ''
if argumento{'PRI'} == nil and (argumento{'PRI país1'} == nil or argumento{'PRI país1'} == '') and (argumento{'PRI país2'} == nil or argumento{'PRI país2'} == '') then
return 'Aún no disputado'
end
 
local continuar = true
local function helperBandera(pais, param, frame)
local evento = ''
if (pais == nil or pais == '') then
while (continuar == true) do
pais = argumento{'país','Nombre'} or ''
i = contador
end
if i == 1 then
if (pais ~= nil) and i(pais ~= '') then
if (param ~= nil) and (param ~= '') then
end
return frame:preprocess('{{Bandera2|'..pais..'|'..param..'}}')
if (argumento{'PRI'..(contador + 1)} == nil) and (argumento{'PRI'..(contador + 1).. ' país1'} == nil) and (argumento{'PRI'..(contador + 1)..' país2'}) == nil then
else
continuar = false
return frame:preprocess('{{Bandera2|'..pais..'}}')
end
end
if argumento{'PRI'..i} ~= nil then
else
continuar = false
return ''
return '[['..argumento{'país','Nombre'}..']]'..' '..argumento{'PRI'..i..' Marcador'}..' '..argumento{'PRI'..i}..'<br>'..argumento{'PRI'..i..' Lugar'}..' &mdash; '..argumento{'PRI'..i..' Fecha'}
end
local pais1 = ''
local pais2 = ''
if (argumento{'PRI'..i..' país1'} == nil or argumento{'PRI'..i..' país1'} == '') then
pais1 = argumento{'país','Nombre'}
else
pais1 = argumento{'PRI'..i..' país1'}
end
if (argumento{'PRI'..i..' país2'} == nil or argumento{'PRI'..i..' país2'} == '') then
pais2 = argumento{'país','Nombre'}
else
pais2 = argumento{'PRI'..i..' país2'}
end
 
local bandpais1 = ''
function obtenerPRI(frame)
local bandpais2 = ''
local contador = 1
if (argumento{'PRI'..i..' bandera1'} ~= nil) and (argumento{'PRI'..i..' bandera1'} ~= '') then
local cadenaret = ''
bandpais1 = frame:preprocess('{{Bandera2|'..pais1..'|'..argumento{'PRI'..i..' bandera1'}..'}}')
if argumento{'PRI'} == nil and
else
( argumento{'PRI país1'} == nil or
bandpais1= frame:preprocess('{{Bandera2|'..pais1..'}}')
argumento{'PRI país1'} == '' ) and
end
if ( argumento{'PRI'..i..' bandera2país2'} ~== nil) and (argumento{'PRI'..i..' bandera2'} ~= '') then or
argumento{'PRI país2'} == '' ) then
bandpais2 = frame:preprocess('{{Bandera2|'..pais2..'|'..argumento{'PRI'..i..' bandera2'}..'}}')
return 'Aún no disputado'
else
end
bandpais2= frame:preprocess('{{Bandera2|'..pais2..'}}')
local continuar = true
end
local evento = argumento{'PRI'..i..' evento'} or ''
while (continuar == true) do
if cadenaret == '' then
i = contador
marcador = argumento{'PRI'..i..' marcador'} or ''
if i == 1 then
lugar = argumento{'PRI'..i..' lugar'} or ''
i = ''
cadenaret = bandpais1..' '.."'''"..marcador.."'''"..' '..bandpais2..' '..'<br><small>'..lugar..' &mdash; '..argumento{'PRI'..i..' fecha'}..'</small><br><small>'..evento..'</small>'
end
else
if (argumento{'PRI'..(contador + 1)} == nil) and
cadenaret = cadenaret..'<br>'..bandpais1..' '.."'''"..argumento{'PRI'..i..' marcador'}.."'''"..' '..bandpais2..' '..'<br><small>'..argumento{'PRI'..i..' lugar'}..' &mdash; '..argumento{'PRI'..i..' fecha'}..'</small><br><small>'.. evento..'</small>'
(argumento{'PRI'..(contador + 1).. ' país1'} == nil) and
end
(argumento{'PRI'..(contador + 1).. ' país2'} == nil) then
contador = contador + 1
continuar = false
end
end
return cadenaret
if argumento{'PRI'..i} ~= nil then
continuar = false
return '[[' .. safeText(argumento{'país','Nombre'}) .. ']]' ..
' ' .. safeText(argumento{'PRI'..i..' Marcador'}) ..
' ' .. safeText(argumento{'PRI'..i}) ..
'<br>' .. safeText(argumento{'PRI'..i..' Lugar'}) ..
' — ' .. safeText(argumento{'PRI'..i..' Fecha'})
end
cadenaret = cadenaret ..
( cadenaret == '' and '' or '<br>' ) ..
helperBandera( argumento{'PRI'..i..' país1'}, argumento{'PRI'..i..' bandera1'}, frame ) .. ' ' ..
"'''" .. safeText( argumento{'PRI'..i..' marcador'} ) .. "'''" ..
' ' .. helperBandera( argumento{'PRI'..i..' país2'}, argumento{'PRI'..i..' bandera2'}, frame ) .. ' ' ..
'<br><small>' .. safeText( argumento{'PRI'..i..' lugar'} ) ..
' — ' .. safeText( argumento{'PRI'..i..' fecha'} ) .. '</small>' ..
'<br><small>' .. safeText(argumento{'PRI'..i..' evento'}) .. '</small>'
contador = contador + 1
end
return cadenaret
end
 
function obtenerMRI(frame)
if argumento{'MRI'} == nil and
( argumento{'MRI país1'} == nil or
argumento{'MRI país1'} == '' ) and
( argumento{'MRI país2'} == nil or
argumento{'MRI país2'} == '' ) then
return 'Aún no conseguido'
end
if argumento{'MRI'} ~= nil then
return '[[' .. safeText( argumento{'país','Nombre'} ) .. ']]' ..
' ' .. safeText( argumento{'MRI Marcador'} ) ..
' ' .. safeText( argumento{'MRI'} ) ..
'<br>' .. safeText( argumento{'MRI Lugar'} ) ..
' &mdash; ' .. safeText( argumento{'MRI Fecha'} )
end
return helperBandera( argumento{'MRI país1'}, argumento{'MRI bandera1'}, frame ) .. ' ' ..
"'''" .. safeText( argumento{'MRI marcador'} ) .. "'''" ..
' ' .. helperBandera( argumento{'MRI país2'}, argumento{'MRI bandera2'}, frame ) .. ' ' ..
'<br><small>' .. safeText( argumento{'MRI lugar'} ) ..
' — ' .. safeText( argumento{'MRI fecha'} ) .. '</small>' ..
'<br><small>' .. safeText( argumento{'MRI evento'} ) .. '</small>'
end
local pais1 = ''
local pais2 = ''
if (argumento{'MRI país1'} == nil or argumento{'MRI país1'} == '') then
pais1 = argumento{'país','Nombre'}
else
pais1 = argumento{'MRI país1'}
end
if (argumento{'MRI país2'} == nil and argumento{'MRI país2'} == '') then
pais2 = argumento{'país','Nombre'}
else
pais2 = argumento{'MRI país2'}
end
local bandpais1 = ''
local bandpais2 = ''
if (argumento{'MRI bandera1'} ~= nil) and (argumento{'MRI bandera1'} ~= '') then
bandpais1 = frame:preprocess('{{Bandera2|'..pais1..'|'..argumento{'MRI bandera1'}..'}}')
else
bandpais1= frame:preprocess('{{Bandera2|'..pais1..'}}')
end
if pais2 ~= nil then
if (argumento{'MRI bandera2'} ~= '') and (argumento{'MRI bandera2'} ~= nil) then
bandpais2 = frame:preprocess('{{Bandera2|'..pais2..'|'..argumento{'MRI bandera2'}..'}}')
else
bandpais2= frame:preprocess('{{Bandera2|'..pais2..'}}')
end
end
local evento = argumento{'MRI evento'} or ''
local marcador = argumento{'MRI marcador'} or ''
local lugar = argumento{'MRI lugar'} or ''
local fecha = argumento{'MRI fecha'} or ''
return bandpais1..' '.."'''"..marcador.."'''"..' '..bandpais2..' '..'<br><small>'..lugar..' &mdash; '..fecha..'</small><br><small>'..evento..'</small>'
end
 
 
function obtenerUPI(frame)
if argumento{'UPI'} == nil and
( argumento{'UPI país1'} == nil or
argumento{'UPI país1'} == '' ) and
( argumento{'UPI país2'} == nil or
argumento{'UPI país2'} == '' ) then
return 'Aún no disputado'
end
if argumento{'UPI'} ~= nil then
return '[[' .. safeText( argumento{'país','Nombre'} ) .. ']]' ..
' ' .. safeText( argumento{'UPI Marcador'} ) ..
' ' .. safeText( argumento{'UPI'} ) ..
'<br>' .. safeText( argumento{'UPI Lugar'} ) ..
' &mdash; ' .. safeText( argumento{'UPI Fecha'} )
end
return helperBandera( argumento{'UPI país1'}, argumento{'UPI bandera1'}, frame ) .. ' ' ..
local pais1 = ''
"'''" .. safeText( argumento{'UPI marcador'} ) .. "'''" ..
local pais2 = ''
if ' ' .. helperBandera( argumento{'UPI país1país2'} == nil or, argumento{'UPI país1bandera2'}, ==frame ) .. ' ') then..
'<br><small>' .. pais1 =safeText( argumento{'país','NombreUPI lugar'} ) ..
' — ' .. safeText( argumento{'UPI fecha'} ) .. '</small>' ..
else
'<br><small>' .. pais1 =safeText( argumento{'UPI país1evento'} ) .. '</small>'
end
if (argumento{'UPI país2'} == nil or argumento{'UPI país2'} == '') then
pais2 = argumento{'país','Nombre'}
else
pais2 = argumento{'UPI país2'}
end
local bandpais1 = ''
local bandpais2 = ''
if (argumento{'UPI bandera1'} ~= nil) and (argumento{'UPI bandera1'} ~= '') then
bandpais1 = frame:preprocess('{{Bandera2|'..pais1..'|'..argumento{'UPI bandera1'}..'}}')
else
bandpais1= frame:preprocess('{{Bandera2|'..pais1..'}}')
end
if (argumento{'UPI bandera2'} ~= nil) and (argumento{'UPI bandera2'} ~= '') then
bandpais2 = frame:preprocess('{{Bandera2|'..pais2..'|'..argumento{'UPI bandera2'}..'}}')
else
bandpais2= frame:preprocess('{{Bandera2|'..pais2..'}}')
end
 
function obtenerPPI(frame)
return bandpais1..' '.."'''"..argumento{'UPI marcador'}.."'''"..' '..bandpais2..' '..'<br><small>'..argumento{'UPI lugar'}..' &mdash; '..argumento{'UPI fecha'}..'</small><br><small>'..argumento{'UPI evento'}..'</small>'
if argumento{'PPI'} == nil and
( argumento{'PPI país1'} == nil or
argumento{'PPI país1'} == '' ) and
( argumento{'PPI país2'} == nil or
argumento{'PPI país2'} == '' ) then
return 'Aún no disputado'
end
if argumento{'PPI'} ~= nil then
return '[[' .. safeText( argumento{'país','Nombre'} ) .. ']]' ..
' ' .. safeText( argumento{'PPI Marcador'} ) ..
' ' .. safeText( argumento{'PPI'} ) ..
'<br>' .. safeText( argumento{'PPI Lugar'} ) ..
' — ' .. safeText( argumento{'PPI Fecha'} )
end
return helperBandera( argumento{'PPI país1'}, argumento{'PPI bandera1'}, frame ) ..
' ' .. "'''" .. safeText( argumento{'PPI marcador'} ) .. "'''" ..
' ' .. helperBandera( argumento{'PPI país2'}, argumento{'PPI bandera2'}, frame ) .. ' ' ..
'<br><small>' .. safeText( argumento{'PPI lugar'} ) ..
' — ' .. argumento{'PPI fecha'} .. '</small>' ..
'<br><small>' .. safeText( argumento{{'PPI evento'}} ) .. '</small>'
end
 
local function helperParticipaciones(first, second)
if first == nil then
return ''
else
return safeText(first) ..
'<small>(Por primera vez en ' .. safeText(second) .. ')</small>'
end
end
 
function obtenerPPI(frame)
if argumento{'PPI'} == nil and (argumento{'PPI país1'} == nil or argumento{'PPI país1'} == '') and (argumento{'PPI país2'} == nil or argumento{'PPI país2'} == '') then
return 'Aún no disputado'
end
if argumento{'PPI'} ~= nil then
return '[['..argumento{'país','Nombre'}..']]'..' '..argumento{'PPI Marcador'}..' '..argumento{'PPI'}..'<br>'..argumento{'PPI Lugar'}..' &mdash; '..argumento{'PPI Fecha'}
end
local pais1 = ''
local pais2 = ''
if (argumento{'PPI país1'} == nil or argumento{'PPI país1'} == '') then
pais1 = argumento{'país','Nombre'}
else
pais1 = argumento{'PPI país1'}
end
if (argumento{'PPI país2'} == nil or argumento{'PPI país2'} == '') then
pais2 = argumento{'país','Nombre'}
else
pais2 = argumento{'PPI país2'}
end
local bandpais1 = ''
local bandpais2 = ''
if (argumento{'PPI bandera1'} ~= nil) and (argumento{'PPI bandera1'} ~= '') then
bandpais1 = frame:preprocess('{{Bandera2|'..pais1..'|'..argumento{'PPI bandera1'}..'}}')
else
bandpais1= frame:preprocess('{{Bandera2|'..pais1..'}}')
end
if (argumento{'PPI bandera2'} ~= nil) and (argumento{'PPI bandera2'} ~= '') then
bandpais2 = frame:preprocess('{{Bandera2|'..pais2..'|'..argumento{'PPI bandera2'}..'}}')
else
bandpais2= frame:preprocess('{{Bandera2|'..pais2..'}}')
end
local evento = argumento{{'PPI evento'}} or ''
local marcador = argumento{'PPI marcador'} or ''
local lugar = argumento{'PPI lugar'} or ''
return bandpais1..' '.."'''"..marcador.."'''"..' '..bandpais2..' '..'<br><small>'..lugar..' &mdash; '..argumento{'PPI fecha'}..'</small><br><small>'..evento..'</small>'
end
function obtenerparticipaciones(arg, frame)
if arg == 'participación mundial' then
ifreturn helperParticipaciones( argumento{'participación mundial'}, ==argumento{'primer nilmundial'} then)
elseif arg == 'participación regional' then
return ''
return helperParticipaciones( argumento{'participación regional'}, argumento{'primer regional'} )
else
elseif arg == 'participación regional2' then
partmundial = argumento{'participacion mundial'} or ''
return helperParticipaciones( argumento{'participación regional2'}, argumento{'primer regional2'} )
primmundial = argumento{'primer mundial'} or ''
elseif arg == 'participación regional3' then
return partmundial..'<small>(Por primera vez en'..primmundial..')</small>'
return helperParticipaciones( argumento{'participación regional3'}, argumento{'primer regional3'} )
end
elseif arg == 'participación confederaciones' then
end
return helperParticipaciones( argumento{'participación confederaciones'}, argumento{'primer confederaciones'} )
 
if elseif arg == 'participación regionalolímpico' then
ifreturn helperParticipaciones( argumento{'participación regionalolímpico'}, ==argumento{'primer nilolímpico'} then)
end
return ''
else
partregional = argumento{'participación regional'} or ''
primeregional = argumento{'primer regional'} or ''
return partregional..'<small>(Por primera vez en'..primeregional..')</small>'
end
end
 
if arg == 'participación regional2' then
if argumento{'participación regional2'} == nil then
return ''
else
return argumento{'participación regional2'}..'<small>(Por primera vez en'..argumento{'primer regional2'}..')</small>'
end
end
 
if arg == 'participación regional3' then
if argumento{'participación regional3'} == nil then
return ''
else
return argumento{'participación regional3'}..'<small>(Por primera vez en'..argumento{'primer regional2'}..')</small>'
end
end
 
if arg == 'participación confederaciones' then
if argumento{'participación confederaciones'} == nil then
return ''
else
return argumento{'participación confederaciones'}..'<small>(Por primera vez en'..argumento{'primer confederaciones'}..')</small>'
end
end
if arg == 'participación olímpico' then
if argumento{'participación olímpico'} == nil then
return ''
else
return argumento{'participación olímpico'}..'<small>(Por primera vez en'..argumento{'primer olímpìco'}..')</small>'
end
end
end
 
function obtenercamisetafutbol(frame)
color_cuerpo1 = argumento{'color_cuerpo1'} or 'FFFFFF'
color_izq1 = argumento{'color_izq1','izquierdo1'} or 'FFFFFF'
color_der1 = argumento{'color_der1','derecho1'} or 'FFFFFF'
color_pantalon1 = argumento{'color_pantalón1','shorts1'} or 'FFFFFF'
color_medias1 = argumento{'color_medias1','medias1'} or 'FFFFFF'
trama_izq1 = argumento{'trama_izq1','patrón_izq1'} or ''
trama_cuerpo1 = argumento{'trama_cuerpo1','patrón_cuerpo1'} or ''
trama_der1 = argumento{'trama_der1','patrón_der1'} or 'FFFFFF'
trama_pantalon1 = argumento{'trama_pantalón1','patrón_pant1'} or ''
trama_medias1 = argumento{'trama_medias1','patrón_med1'} or ''
tipo_izq1 = argumento{'tipo_izq1'} or 'png'
tipo_der1 = argumento{'tipo_der1'} or 'png'
tipo_pantalon1 = argumento{'tipo_pantalón1'} or 'png'
tipo_cuerpo1 = argumento{'tipo_cuerpo1'} or 'png'
 
tipo_medias1 = argumento{'tipo_medias1'} or 'png'
color_cuerpo2 = argumento{'color_cuerpo2'} or 'FFFFFF'
color_izq2 = argumento{'color_izq2','izquierdo2'} or 'FFFFFF'
color_der2 = argumento{'color_der2','derecho2'} or 'FFFFFF'
color_pantalon2 = argumento{'color_pantalón2','shorts2'} or 'FFFFFF'
color_medias2 = argumento{'color_medias2','medias2'} or 'FFFFFF'
trama_izq2 = argumento{'trama_izq2','patrón_izq2'} or ''
trama_cuerpo2 = argumento{'trama_cuerpo2','patrón_cuerpo2'} or ''
trama_der2 = argumento{'trama_der2','patrón_der2'} or ''
trama_pantalon2 = argumento{'trama_pantalón2','patrón_pant2'} or ''
trama_medias2 = argumento{'trama_medias2','patrón_med2'} or''
tipo_izq2 = argumento{'tipo_izq2'} or 'png'
tipo_der2 = argumento{'tipo_der2'} or 'png'
tipo_pantalon2 = argumento{'tipo_pantalón2'} or 'png'
tipo_medias2 = argumento{'tipo_medias2'} or 'png'
tipo_cuerpo2 = argumento{'tipo_cuerpo2'} or 'png'
 
color_cuerpo3 = argumento{'color_cuerpo3'} or ''
color_izq3 = argumento{'color_izq3'} -- control
color_der3 = argumento{'color_der3'} -- control
color_pantalon3 = argumento{'color_pantalón3'} or ''
color_medias3 = argumento{'color_medias3'} or ''
trama_izq3 = argumento{'trama_izq3'} or ''
trama_cuerpo3 = argumento{'trama_cuerpo3'} or ''
trama_der3 = argumento{'trama_der3'} or ''
trama_pantalon3 = argumento{'tipo_pantalón3'} or ''
trama_medias3 = argumento{'trama_medias3'} or ''
tipo_izq3 = argumento{'tipo_izq3'} or 'png'
tipo_der3 = argumento{'tipo_der3'} or 'png'
tipo_pantalon3 = argumento{'trama_pantalón3'} or ''
tipo_medias3 = argumento{'tipo_medias3'} or 'png'
tipo_cuerpo3 = argumento{'tipo_cuerpo3'} or 'png'
 
tipo_local = argumento{'tipo_local'} or 'png'
 
cadenaaux = '{{Uniforme' ..
cadenaaux=cadenaaux.. '|color brazo izquierdo = ' .. color_izq1 ..
cadenaaux= cadenaaux.. '|color cuerpo = ' .. color_cuerpo1 ..
cadenaaux=cadenaaux.. '|color brazo derecho = ' .. color_der1 ..
cadenaaux=cadenaaux.. '|color pantalón = ' .. color_pantalon1 ..
cadenaaux=cadenaaux.. '|color medias = ' .. color_medias1 ..
cadenaaux=cadenaaux.. '|trama brazo izquierdo = ' .. trama_izq1 ..
cadenaaux=cadenaaux.. '|trama cuerpo = ' .. trama_cuerpo1 ..
cadenaaux=cadenaaux.. '|trama brazo derecho = ' .. trama_der1 ..
cadenaaux=cadenaaux.. '|trama pantalón = ' .. trama_pantalon1 ..
cadenaaux=cadenaaux.. '|trama medias = ' .. trama_medias1 ..
cadenaaux=cadenaaux.. '|tipo_izq = ' .. tipo_izq1 ..
cadenaaux=cadenaaux.. '|tipo_cuerpo = ' .. tipo_cuerpo1 ..
cadenaaux=cadenaaux.. '|tipo_der = ' .. tipo_der1 ..
cadenaaux=cadenaaux.. '|tipo_pan = ' .. tipo_pantalon1 ..
cadenaaux=cadenaaux.. '|tipo_med = ' .. tipo_medias1 ..
cadenaaux=cadenaaux.. '|título = [[Equipamiento de los futbolistas|Titular]]' ..
'}}'
cadenaaux=cadenaaux..'}}'
 
cadenaaux1 = '{{Uniforme' ..
cadenaaux1=cadenaaux1.. '|color brazo izquierdo = ' .. color_izq2 ..
cadenaaux1=cadenaaux1.. '|color cuerpo = ' .. color_cuerpo2 ..
cadenaaux1=cadenaaux1.. '|color brazo derecho = ' .. color_der2 ..
cadenaaux1=cadenaaux1.. '|color pantalón = ' .. color_pantalon2 ..
cadenaaux1=cadenaaux1.. '|color medias = ' .. color_medias2 ..
cadenaaux1=cadenaaux1.. '|trama brazo izquierdo = ' .. trama_izq2 ..
cadenaaux1=cadenaaux1.. '|trama cuerpo = ' .. trama_cuerpo2 ..
cadenaaux1=cadenaaux1.. '|trama brazo derecho = ' .. trama_der2 ..
cadenaaux1=cadenaaux1.. '|trama pantalón = ' .. trama_pantalon2 ..
cadenaaux1=cadenaaux1.. '|trama medias = ' .. trama_medias2 ..
cadenaaux1=cadenaaux1.. '|tipo_izq = ' .. tipo_izq2 ..
cadenaaux1=cadenaaux1.. '|tipo_cuerpo = ' .. tipo_cuerpo2 ..
cadenaaux1=cadenaaux1.. '|tipo_der = ' .. tipo_der2 ..
cadenaaux1=cadenaaux1.. '|tipo_pan = ' .. tipo_pantalon2 ..
cadenaaux1=cadenaaux1.. '|tipo_med = ' .. tipo_medias2 ..
cadenaaux1=cadenaaux1.. '|título = [[Equipamiento de los futbolistas|Alternativo]]' ..
'}}'
cadenaaux1=cadenaaux1..'}}'
 
cadenaret= '<table style="margin: 0 auto;"><tr style="vertical-align: top;"><td style="width: 50%;">'..frame:preprocess(cadenaaux)..'</td><td style="width: 50%;">'..frame:preprocess(cadenaaux1)..'<td style="width: 50%;">'
cadenaret = '<table style="margin: 0 auto;"><tr style="vertical-align: top;">' ..
if (color_izq3 == nil) and (color_der3==nil) then --No hay una tercer camiseta
'<td style="width: 50%;">' .. frame:preprocess(cadenaaux) .. '</td>' ..
cadenaret = cadenaret..'</td></tr></table>'
'<td style="width: 50%;">' .. frame:preprocess(cadenaaux1) .. '</td>'
 
if (color_izq3 == nil) and (color_der3 == nil) then -- No hay una tercer camiseta ..
cadenaret = cadenaret .. '</tr></table>'
else
cadenaaux2 = '{{Uniforme' ..
cadenaaux2=cadenaaux2.. '|color brazo izquierdo = ' .. safeText(color_izq3) ..
cadenaaux2=cadenaaux2.. '|color cuerpo = ' .. color_cuerpo3 ..
cadenaaux2=cadenaaux2.. '|color brazo derecho = ' .. safeText(color_der3) ..
cadenaaux2=cadenaaux2.. '|color pantalón = ' .. color_pantalon3 ..
cadenaaux2=cadenaaux2.. '|color medias = ' .. color_medias3 ..
cadenaaux2=cadenaaux2.. '|trama brazo izquierdo = ' .. trama_izq3 ..
cadenaaux2=cadenaaux2.. '|trama cuerpo = ' .. trama_cuerpo3 ..
cadenaaux2=cadenaaux2.. '|trama brazo derecho = ' .. trama_der3 ..
cadenaaux2=cadenaaux2.. '|trama pantalón = ' .. trama_pantalon3 ..
cadenaaux2=cadenaaux2.. '|trama medias = ' .. trama_medias3 ..
cadenaaux2=cadenaaux2.. '|tipo_izq = ' .. tipo_izq3 ..
cadenaaux2=cadenaaux2.. '|tipo_cuerpo = ' .. tipo_cuerpo3 ..
cadenaaux2=cadenaaux2.. '|tipo_der = ' .. tipo_der3 ..
cadenaaux2=cadenaaux2.. '|tipo_pan = ' .. tipo_pantalon3 ..
cadenaaux2=cadenaaux2.. '|tipo_med = ' .. tipo_medias3 ..
cadenaaux2=cadenaaux2.. '|título = [[Equipamiento de los futbolistas|Tercero]]' ..
'}}'
cadenaaux2=cadenaaux2..'}}'
cadenaret = cadenaret .. cadenaret'<td style="width: 50%;">' cadenaret.. frame:preprocess(cadenaaux2) .. '</td></tr></table>' ..
'</tr></table>'
end
end
cadenaret=cadenaret..'<tr style="vertical-align: top;">'
cadenaret = cadenaret .. '<tdtr style="widthvertical-align: 50%top;">'
cadenaret = cadenaret .. '<td style="width: 50%;">'
return frame:preprocess(cadenaret)
return frame:preprocess(cadenaret)
end
 
function obtenercamisetabaloncesto(frame)
end
function obtenercamiseta(frame)
if ((frame:getParent()):getTitle() == 'Plantilla:Ficha de selección de fútbol') or ((frame:getParent()):getTitle() == 'Plantilla:Ficha de selección de fútbol 2') then
return obtenercamisetafutbol(frame)
end
 
function obtenercamiseta(frame)
if (frame:getParent():getTitle() == 'Plantilla:Ficha de selección de baloncesto') then
if ((frame:getParent()):getTitle() == 'Plantilla:Ficha de selección de fútbol') or ((frame:getParent()):getTitle() == 'Plantilla:Ficha de selección de fútbol 2') then
return obtenercamisetabaloncesto(frame)
return obtenercamisetafutbol(frame)
elseif (frame:getParent():getTitle() == 'Plantilla:Ficha de selección de baloncesto') then
return obtenercamisetabaloncesto(frame)
end
 
end
 
function p.Ficha(frame)
ModuloArgs.obtenerTablaDeArgumentos(frame)
local nombre = argumento{'nombre','Nombre'} or ModuloPaginas.nombrePagina({desambiguar='sí'})
local goleadorgoles = ''
if argumento{'mayor goleador goles'} ~= nil then
goleadorgoles = safeText( argumento('mayor goleador') )..' ('..argumento{'mayor goleador goles'}..')'
else
goleadorgoles = safeText( argumento{'mayor goleador'} )
end
local mayorparticipacion = ''
if argumento{'mayor partidos'} ~= nil then
mayorparticipacion = safeText( argumento('más participaciones') )..' ('..argumento('mayor partidos')..')'
else
mayorparticipacion = safeText( argumento{'más participaciones'} )
end
local banderapais = frame:preprocess('{{Bandera|'..argumento{'país','Nombre'}..'|tamaño=200px}}')
local dtband1bandera = ''
if pais ~= nil then
local dtband2 = ''
bandera = frame:preprocess('{{Bandera|'..pais..'|tamaño=200px}}')
if argumento{'país-dt'} ~= nil then
end
dtband1 = frame:preprocess('{{Bandera|'..argumento{'país-dt'}..'|tamaño=20px}}')
local dtband1 = ''
end
local dtband2 = ''
if argumento{'país2-dt'} ~= nil then
if argumento{'país-dt'} ~= nil then
dtband2 = frame:preprocees('{{Bandera|'..argumento('país2-dt')..'|tamaño=20px}}')
dtband1 = frame:preprocess('{{Bandera|'..argumento{'país-dt'}..'|tamaño=20px}}')
end
end
local dt = ''
if argumento{'director técnicopaís2-dt'} =~= nil then
dtband2 = frame:preprocees('{{Bandera|'..argumento('país2-dt')..'|tamaño=20px}}')
dt = 'No tiene'
end
else
local dt = ''
if (argumento{'año-dt'} == '') or (argumento{'año-dt'} == nil) then
if dt = dtband1..dtband2..argumento{'director técnico'} == nil then
dt = 'No tiene'
else
else
dt = dtband1..dtband2..argumento{'director técnico'}..' <small>(Desde '..argumento{'año-dt'}..')</small>'
if (argumento{'año-dt'} == '') or (argumento{'año-dt'} == nil) then
end
dt = dtband1..dtband2..argumento{'director técnico'}
end
else
local PPI = obtenerPPI(frame)
dt = dtband1..dtband2..argumento{'director técnico'}..' <small>(Desde '..safeText(argumento{'año-dt'})..')</small>'
local UPI = obtenerUPI(frame)
end
local MRI = obtenerMRI(frame)
end
local PRI = obtenerPRI(frame)
local PPI = obtenerPPI(frame)
local Ficha={
local UPI = obtenerUPI(frame)
tipocabecera = 'fútbol',
local MRI = obtenerMRI(frame)
['titulo'] = nombre,
local PRI = obtenerPRI(frame)
{'',bandera},
local Ficha = {
{tipo = 'sección',
tipocabecera = 'fútbol',
['titulo'] ='Datos generales',
['titulo'] = nombre,
{'país',argumento{'país','Nombre'}},
{'',bandera},
{'[[Anexo:Códigos de la FIFA|Código FIFA]]', argumento{'cod'}},
{tipo = 'sección',
{'Asociación', argumento{'asociación'}},
['titulo'] ='Datos generales',
{'Confederación',argumento{'confederación'}},
{'Seudónimopaís',argumento{'seudónimopaís','Nombre'}},
{'[[Anexo:Códigos de la FIFA|Código FIFA]]', argumento{'cod'}},
{'Director técnico', dt},
{'[[Capitán (fútbol)|Capitán]]Asociación', argumento{'capitánasociación'}},
{'Confederación',argumento{'confederación'}},
{'Mayor goleador',goleadorgoles},
{'Seudónimo',argumento{'seudónimo'}},
{'Jugador con mayor participación', mayorparticipacion},
{'Director técnico', dt},
{'Estadio',argumento{'estadio'}},
{'[[Capitán (fútbol)|Capitán]]',argumento{'capitán'}},
{'',obtenercamiseta(frame)}
{'Mayor goleador',goleadorgoles},
},
{'Jugador con mayor participación', mayorparticipacion},
{'Estadio',argumento{'estadio'}},
{tipo = 'sección',
{'',obtenercamiseta(frame)}
['título'] = 'Primer partido internacional',
{'',PPI},
{tipo = 'sección',
},
['título'] = 'Primer partido internacional',
{tipo='sección',PPI}
},
['título'] = 'Ultimo partido internacional',
{tipo='sección',UPI}
['título'] = 'Último partido internacional',
},
{'',UPI}
},
{tipo='sección',
{tipo='sección',
['título'] = 'Mejor resultado internacional',
{'',MRI}
},
{tipo = 'sección',
['título'] = 'Peor resultado internacional',
{tipo = 'sección',
{'',PRI}
['título'] = 'Peor resultado internacional',
{'',PRI},
{tipo = 'sección',
},
['título'] = '[[Copa Mundial de fútbol]]',
{'Participaciones', obtenerparticipaciones('participación mundial', frame)},
{tipo = 'sección',
{'Mejor resultado', argumento{'mejor mundial'},},
['título'] = '[[Copa Mundial de fútbol]]',
},
{'Participaciones', obtenerparticipaciones('participación mundial', frame)},
{tipo = 'sección',
{'Mejor resultado', argumento{'mejor mundial'},},
['título'] = '[[Copa Confederaciones]]',
},
{'Participaciones', obtenerparticipaciones('participación confederaciones', frame)},
{'Mejor resultado', argumento{'mejor confederaciones'},},
{tipo = 'sección',
},
['título'] = '[[Copa Confederaciones]]',
{tipo = 'sección',
{'Participaciones', obtenerparticipaciones('participación confederaciones', frame)},
{ ['Mejortítulo'] resultado',= argumento{'mejorcopa confederacionesregional'},},
{'Participaciones', obtenerparticipaciones('participación regional', frame)},
},
{'Mejor resultado', argumento{'mejor regional'},},
},
{tipo = 'sección',
{tipo = 'sección',
['título'] = argumento{'copa regional'},
['título'] = argumento{'copa regional2'},
{'Participaciones', obtenerparticipaciones('participación regional', frame)},
{'Participaciones', obtenerparticipaciones('participación regional2', frame)},
{'Mejor resultado', argumento{'mejor regional'},},
{'Mejor resultado', argumento{'mejor regional2'},},
},
},
{tipo = 'sección',
['título'] = argumento{'copa regional2regional3'},
{'Participaciones', obtenerparticipaciones('participación regional2regional3', frame)},
{'Mejor resultado', argumento{'mejor regional2regional3'},},
},
{tipo = 'sección',
['título'] = argumento{'copa regional3'},
{tipo = 'sección',
[ {'títuloParticipaciones'], = argumento{obtenerparticipaciones('copaparticipación regional3', frame)},
{'ParticipacionesMejor resultado', obtenerparticipaciones(argumento{'participaciónmejor regional3'}, frame)},
},
{'Mejor resultado', argumento{'mejor regional3'},},
{tipo= 'sección',
},
['título'] = '[[Fútbol en los Juegos Olímpicos|Torneos Olímpicos]]',
{'Participaciones', obtenerparticipaciones('torneo olímpico', frame)},
{tipo = 'sección',
[ {'título']Mejor =resultado', argumento{'copamejor regional3olímpico'},},
},
{'Participaciones', obtenerparticipaciones('participación regional3', frame)},
}
{'Mejor resultado', argumento{'mejor regional3'},},
return ModuloFicha.infobox(Ficha)
},
{tipo= 'sección',
['título'] = '[[Fútbol en los Juegos Olímpicos|Torneos Olímpicos]]',
{'Participaciones', obtenerparticipaciones('torneo olímpico', frame)},
{'Mejor resultado', argumento{'mejor olímpico'},},
},
}
return ModuloFicha.infobox(Ficha)
end