Module:Category handler: Difference between revisions
refactor; try to enter category names one by one as unnamed params |
todo; comments |
||
| Line 139: | Line 139: | ||
function p.category_handler(frame) | function p.category_handler(frame) | ||
local args = getArgs(frame) | local args = getArgs(frame) | ||
local excluded_ns_unparsed = args["excluded_ns"] or "" | local excluded_ns_unparsed = args["excluded_ns"] or "" -- Additional namespaces to exclude (EG, a template that should not be used within main namespace, which is allowed by default) | ||
local suffixes_unparsed = args["suffixes" ] or "" | local allowed_ns_unparsed = args["allowed_ns" ] or "" -- Namespaces to allow; overrides default list (EG, a template that should be used within user namespace, which is disallowed by default) | ||
local suffixes_unparsed = args["suffixes" ] or "" -- Additional page suffixes in which to disallow categories | |||
local is_debug = yesno(args["debug"], false) -- Parse debug mode; setting this to TRUE disables all categories | local is_debug = yesno(args["debug"], false) -- Parse debug mode; setting this to TRUE disables all categories | ||
| Line 152: | Line 153: | ||
end | end | ||
end | end | ||
-- Parse excluded namespaces | -- Parse excluded namespaces | ||
| Line 173: | Line 165: | ||
end | end | ||
end | end | ||
-- TODO: parse allowed namespaces | |||
-- This gets added to the ns_override array, with values set to FALSE | |||
-- Parse excluded suffixes | -- Parse excluded suffixes | ||