Module:Category handler: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
add support for "categories=no" and "category2=¬"
(fix blacklist-checking bug)
(add support for "categories=no" and "category2=¬")
Line 29:
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.category2Yes or cfg.category2Negative.
cfg.category2 = 'category2'
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
 
-- cfg.subpage is the parameter name to specify how to behave on
Line 121 ⟶ 125:
-- Only categorise if the relevant options are set.
if args[cfg.nocat] == cfg.nocatTrue
or ( args[cfg.category2categories] and args[cfg.category2] ~== cfg.category2Yes )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
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu