Module:Param Parse: Difference between revisions

Try to autogenerate premium status on all pages
No edit summary
(Try to autogenerate premium status on all pages)
Line 152:
 
-- Premium
local premium_episodes = {
['hopeport'] = 'Yes',
['hopeforest'] = 'Yes',
['mine of mantuban'] = 'No',
['crenopolis'] = 'No'
}
function parse.premium_func(episode)
local premium_episode = premium_episodes[string.lower(episode or '')]
return premium_episode
end
function parse.premium_smw(episode)
return parse.yes_no_smw(parse.premium_func(episode))
end
parse.premium = {
name = 'premium',
func = {name = parse.premium_func, params = {Infobox.raw_param('episode')}},
func = parse.yes_no,
smw_property = 'Premium',
smw_func = {name = parse.yes_no_smwpremium_smw, params = {Infobox.raw_param('episode')}}
category_incomplete = 'Needs premium status',
}