8,290
edits
imported>CaptainTechnicality54384 No edit summary |
mNo edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
if not imageArea and imageArea ~= 'none' then | if not imageArea and imageArea ~= 'none' then | ||
local images = {} | local images = {} | ||
local defaultImageSize = args.defaultimagesize or ' | local defaultImageSize = args.defaultimagesize or '160px' | ||
args.image1 = args.image1 or args.image or 'title' | args.image1 = args.image1 or args.image or 'title' | ||
args.image1size = args.image1size or args.imagesize | args.image1size = args.image1size or args.imagesize | ||
Line 68: | Line 68: | ||
footer = '| class="infobox-footer" colspan="2" | ' .. footer | footer = '| class="infobox-footer" colspan="2" | ' .. footer | ||
end | end | ||
local gameversion = args.gameversion | |||
if gameversion then | |||
local frame = mw.getCurrentFrame() | |||
frame:callParserFunction{ name = '#cargo_store', args = { '', | |||
_table = 'VersHistInfobox', Version = gameversion | |||
} } | |||
gameversion = '| class="infobox-gameversion-postfooter" colspan="2" | <div class="qud-infobox-version">Infobox data from game version <span class="qud-version-num">' .. gameversion .. '</span></div>' | |||
end | |||
local infoboxStartDiv = '<div class="moduleinfobox' | |||
local class = args.class | |||
if class then | |||
infoboxStartDiv = infoboxStartDiv .. ' ' .. class | |||
end | |||
infoboxStartDiv = infoboxStartDiv .. '"' | |||
local style = args.style | |||
if style then | |||
infoboxStartDiv = infoboxStartDiv .. ' style="' .. style .. '"' | |||
end | |||
infoboxStartDiv = infoboxStartDiv .. '>' | |||
local html = { | local html = { | ||
infoboxStartDiv, | |||
'<div class="infobox-title">' .. title .. '</div>', | '<div class="infobox-title">' .. title .. '</div>', | ||
imageArea, | imageArea, | ||
'{| | '{| class="infobox-rows" cellspacing="1" cellpadding="4"', | ||
'|-', | '|-', | ||
args.rows or '', | args.rows or '', | ||
footer or '', | footer or '', | ||
gameversion or '', | |||
'|}', | '|}', | ||
'</div>' | '</div>' |