Changes

Module:Category handler

341 bytes added, 05:39, 1 July 2013
add support for "categories=no" and "category2=¬"
cfg.nocatFalse = 'false'
-- The parameter name for the legacy "categories" parameter. This-- skips the blacklist if set to the cfg.category2Yes value, and-- suppresses categorisation if set to the cfg.categoriesNo value.
cfg.categories = 'categories'
cfg.categoriesYes = 'yes'
cfg.categoriesNo = 'no'
-- The parameter name for the legacy "category2" parameter. This
-- skips the blacklist if set to the cfg.category2Yes value, and
-- suppresses categorisation if present but equal to anything other
-- than cfg.category2Yesor cfg.category2Negative.
cfg.category2 = 'category2'
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
-- cfg.subpage is the parameter name to specify how to behave on
-- Only categorise if the relevant options are set.
if args[cfg.nocat] == cfg.nocatTrue
or args[cfg.categories] == cfg.categoriesNo or ( args[cfg.category2] and args[cfg.category2] ~= cfg.category2Yes and args[cfg.category2] ~= cfg.category2Negative )
or ( args[cfg.subpage] == cfg.subpageNo and pageObject.isSubpage )
or ( args[cfg.subpage] == cfg.subpageOnly and not pageObject.isSubpage ) then
Anonymous user