Cambios

Saltar a: navegación, buscar

Módulo:Infobox

212 bytes eliminados, 21:37 11 oct 2015
sin resumen de edición
function p.infobox( f )
local args = require( 'Module:ProcessArgs' ).merge( true )
local titleObject title = 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 titleObjectmw.title.getCurrentTitle().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 slot local invIds = mw.loadData( 'Module:InvSprite/IDs' ).idsgrid
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' ) imageExists = if imageTitle and imageTitle.exists end if imageExists then
image = title
else
end
end
if image == '----' then
table.insert( invImages, '</div><div style="padding-top:.5em">' )
elseif image then
if not slot grid then slot grid = require( 'Module:Inventory slotGrid' ).slotcell
end
table.insert( invImages, slotgrid{ 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="infobox-title mcwiki-header infobox-title">' .. title .. '</div>',
imageArea,
'{| class="infobox-rows" cellspacing="1" cellpadding="4"',
Colaborador, Bots, Administradores
10 223
ediciones

Menú de navegación