Cambios

Saltar a: navegación, buscar

Módulo:Infobox

325 bytes añadidos, 19:00 11 oct 2015
sin resumen de edición
function p.infobox( f )
local args = require( 'Module:ProcessArgs' ).merge( true )
local title titleObject = args.title or mw.title.getCurrentTitle() local title = args.title or titleObject.baseText
local imageArea = args.imagearea
local imgCount = {}
local invImgCount = {}
local grid
for k, v in pairs( args ) do
if type( k ) == 'string' then
if imageTitle and imageTitle.exists then
image = '[[File:' .. title .. '.png|' .. size .. ']]'
elseif mw.title.getCurrentTitle()titleObject.namespace == 0 then
image = '[[File:No image.svg|' .. size .. '|link=File:' .. title .. '.png|Upload ' .. title .. '.png]]'
else
if #invImgCount > 0 then
table.sort( invImgCount )
local gridslot local invIds = mw.loadData( 'Module:InvSprite/IDs' ).ids
for k, v in ipairs( invImgCount ) do
local image = args['invimage' .. v]
if image == 'title' then
local imageExists if invIds[title] then imageExists = true else local imageTitle = mw.title.new( 'File:Grid ' .. title .. '.png' ) if imageExists = imageTitle and imageTitle.exists end if imageExists then
image = title
else
end
if image == '----' then table.insert( invImages, '</div><div style="padding-top:.5em">' ) elseif image then if not grid slot then grid slot = require( 'Module:GridInventory slot' ).cellslot
end
table.insert( invImages, gridslot{ image, link = 'none' } )
end
end
if slot and #invImages > 0 then invImages = '<div class="infobox-invimages"><div>' .. table.concat( invImages, '' ) .. '</div></div>'
else
invImages = ''
local html = {
'<div class="notaninfobox">',
'<div class="mcwiki-header infobox-title mcwiki-header">' .. title .. '</div>',
imageArea,
'{| class="infobox-rows" cellspacing="1" cellpadding="4"',
Colaborador, Bots, Administradores
10 223
ediciones

Menú de navegación