Changes

Jump to navigation Jump to search

Module:Protection banner

148 bytes added, 10:51, 16 March 2014
try different format for behaviors table
--------------------------------------------------------------------------------
local cfg = {} cfg.reasons = { blp = { behavior = 'reasonFirst' }, dispute = { behavior = 'reasonFirst' }, office = { behavior = 'reasonFirst' }, sock = { behavior = 'reasonFirst' }, vandalism = { behavior = 'namespaceFirst' },} cfg.protectionLevels = { foo} cfg.categories = {
-- The key strings follow this format:
-- type, level, ns, reason, expiry
}
local cfg.categoryNamespaces = {
[2] = 'user',
[3] = 'user',
}
local behaviors = { vandalism = 'namespaceFirst', dispute = 'reasonFirst', blp = 'reasonFirst', sock = 'reasonFirst', office = 'reasonFirst',} local cfg.pagetypeNamespaces = {
[0] = 'article',
[6] = 'file',
return nil
end
local nskey = cfg.categoryNamespaces[ns]
if not nskey and ns % 2 == 1 then
nskey = 'talk'
-- reason for protection, and the expiry date.
--]]
cats = cats or cfg.categories
--[[
behavior = 'reasonFirst'
else
behavior = behaviorscfg.reasons[reason].behavior
end
if behavior == 'namespaceFirst' then
Anonymous user

Navigation menu