Module:Infobox Season: Difference between revisions
Appearance
Tag: Undo |
Only format if not embed |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
local infobox = require("Module:Infobox") | local infobox = require("Module:Infobox") | ||
function p.infobox(frame) | function p.infobox(frame) | ||
| Line 10: | Line 8: | ||
local season_args = { | local season_args = { | ||
{'t', args.name}, | {'t', args.name}, | ||
{'i', args.image and args.image ~= '' and string.format('[[File:%s|300px]]', args.image) or ''}, | |||
{'s', 'Overview'}, | |||
{'f', 'Name', args.name}, | {'f', 'Name', args.name}, | ||
{'f', 'Started', args.started}, | {'f', 'Started', args.started}, | ||
| Line 26: | Line 24: | ||
{'f', 'Download Link', args.worlddownload}, | {'f', 'Download Link', args.worlddownload}, | ||
} | } | ||
return infobox.infobox { | return infobox.infobox { | ||
getParent = function() return { args = | getParent = function() return { args = season_args } end | ||
} | } | ||
end | end | ||
return p | return p | ||
Latest revision as of 10:59, 24 June 2025
Documentation for this module may be created at Module:Infobox Season/doc
local p = {}
local infobox = require("Module:Infobox")
function p.infobox(frame)
local args = frame:getParent().args
local season_args = {
{'t', args.name},
{'i', args.image and args.image ~= '' and string.format('[[File:%s|300px]]', args.image) or ''},
{'s', 'Overview'},
{'f', 'Name', args.name},
{'f', 'Started', args.started},
{'f', 'Ended', args.ended},
{'f', 'Total Days', args.totaldays},
{'s', 'Player Statistics'},
{'f', 'Whitelisted Players', args.players},
{'f', 'Peak Players', args.peakplayers},
{'s', 'Server Info'},
{'f', 'Version', args.version},
{'f', 'Platform', args.platform},
{'f', 'Experiments', args.experiments},
{'s', 'World Download'},
{'f', 'Download Link', args.worlddownload},
}
return infobox.infobox {
getParent = function() return { args = season_args } end
}
end
return p