Jump to content

📢 Please make sure to read our Style Guide before editing. For questions, suggestions, or technical issues, please contact Noah.

Module:Infobox Player: Difference between revisions

From CrabCraft Wiki
new non-chatgpt player infobox
fixed player infobox
Line 11: Line 11:
     {'t', args.username},
     {'t', args.username},
     {'s', 'About'},
     {'s', 'About'},
     {'f', nationality, args.nationality},
     {'f', 'nationality', args.nationality},
     {'f', seasonjoined, args.seasonjoined},
     {'f', 'seasonjoined', args.seasonjoined},
     {'s', 'Socials'},
     {'s', 'Socials'},
     {'f', discord, args.discord},
     {'f', 'discord', args.discord},
     }
     }


     local newFrame = {
     return infobox.infobox {
getParent = function()
    getParent = function() return { args = player_args } end
return { args = player_args }
    }
end
}
end
end


return p
return p

Revision as of 20:20, 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},
    }

    return infobox.infobox {
    	getParent = function() return { args = player_args } end
    }
end

return p