Module:Infobox Player: Difference between revisions
Appearance
Revert to 18:11, 21 June 2025 (store categories in lua script) |
new non-chatgpt player infobox |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local | local infobox = require("Module:Infobox") | ||
function p.infobox(frame) | function p.infobox(frame) | ||
| Line 18: | Line 7: | ||
local used = {} -- track which keys we’ve output | local used = {} -- track which keys we’ve output | ||
local out = {} | local out = {} | ||
local player_args = { | |||
{'t', args.username}, | |||
{'s', 'About'}, | |||
{'f', nationality, args.nationality}, | |||
{'f', seasonjoined, args.seasonjoined}, | |||
{'s', 'Socials'}, | |||
{'f', discord, args.discord}, | |||
} | |||
local newFrame = { | |||
getParent = function() | |||
return { args = player_args } | |||
end | |||
} | |||
end | end | ||
return p | return p | ||
Revision as of 19:37, 21 June 2025
Documentation for this module may be created at Module:Infobox Player/doc
local p = {}
local infobox = require("Module:Infobox")
function p.infobox(frame)
local args = frame:getParent().args
local used = {} -- track which keys we’ve output
local out = {}
local player_args = {
{'t', args.username},
{'s', 'About'},
{'f', nationality, args.nationality},
{'f', seasonjoined, args.seasonjoined},
{'s', 'Socials'},
{'f', discord, args.discord},
}
local newFrame = {
getParent = function()
return { args = player_args }
end
}
end
return p