Module:Player: Difference between revisions
From PC Gaming Shelter
m Text replacement - "Has note" to "Has short description" |
No edit summary |
||
| Line 34: | Line 34: | ||
order = '2', | order = '2', | ||
rows = { | rows = { | ||
'Has status', | 'Has status', | ||
'Plays game', | 'Plays game', | ||
'Plays mod', | 'Plays mod', | ||
'Has favorite mod' | 'Has favorite mod' | ||
} | |||
}, | |||
['Clans'] = { | |||
heading = 'Communities', | |||
template = 'Infobox/Clans', | |||
order = '3', | |||
rows = { | |||
'Communities' | |||
} | } | ||
}, | }, | ||
| Line 44: | Line 51: | ||
heading = 'Wiki', | heading = 'Wiki', | ||
template = 'Infobox/Wiki', | template = 'Infobox/Wiki', | ||
order = ' | order = '4', | ||
rows = { | rows = { | ||
'Is guardian for', | 'Is guardian for', | ||
Latest revision as of 17:31, 25 March 2026
Documentation for this module may be created at Module:Player/doc
local utils = require( 'Module:Utils' )
local p = {}
local function propertiesPlan()
-- ['Form field name'] = { 'Semantic property', 'delimiter' }
local propMap = {
['Image'] = {'Image', 'file' },
['Member of'] = {'Member of', ',' },
['Has status'] = {'Has status' },
['Plays game'] = {'Plays game', ',' },
['Plays mod'] = {'Plays mod', ',' },
['Has favorite mod'] = {'Has favorite mod', ',' },
['Is mentor for'] = {'Is mentor for', ',' },
['Is guardian for'] = {'Is guardian for', ',' },
['Has short description'] = {'Has short description' }
}
return propMap
end
local function infoboxSectionPlan()
local sectionMap = {
['Cover image'] = {
heading = '',
template = 'Infobox/Cover',
order = '1',
rows = {
'Image'
}
},
['Player Info'] = {
heading = 'Player Info',
template = 'Infobox/Player Info',
order = '2',
rows = {
'Has status',
'Plays game',
'Plays mod',
'Has favorite mod'
}
},
['Clans'] = {
heading = 'Communities',
template = 'Infobox/Clans',
order = '3',
rows = {
'Communities'
}
},
['Wiki'] = {
heading = 'Wiki',
template = 'Infobox/Wiki',
order = '4',
rows = {
'Is guardian for',
'Is mentor for',
'Contact links'
}
}
}
return sectionMap
end
function p.infobox(frame)
local category = 'Players'
local properties = propertiesPlan()
local sections = infoboxSectionPlan()
local footer = ''
local infobox = utils.createInfobox(frame, category, properties, sections, footer)
return infobox
end
return p
