Jump to content

Module:Protection banner/config: Difference between revisions

finish adding comments for all the general data tables
(use default values in the images table, to make them future-proofed against new protection levels)
(finish adding comments for all the general data tables)
Line 575: Line 575:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- This table provides the data for the ${IMAGELINK} parameter, which gets
-- the image link for small padlock icons based on the page's protection action
-- and protection level. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, and autoreview subtables.
-- *required* - this table needs edit, move, and autoreview subtables.
imageLinks = {
imageLinks = {
Line 595: Line 603:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- Sets the "right" CSS property for padlock icons, based on its protection
-- This table provides the data for the "right" CSS property for small padlock
-- action. This determines the position of the padlock among the other top
-- icons, which determines where the icon appears on the top bar among the other
-- icons. If no value is found for the action, the default field is used.
-- top icons. The data is stored by protection action. If no value is found for
 
-- the action, the default field is used.
padlockPositions = {
padlockPositions = {
autoreview = '85px',
autoreview = '85px',
Line 609: Line 617:


--[[
--[[
-- The protection categories are stored in the cfg.protectionCategories table.
-- The protection categories are stored in the protectionCategories table.
-- Keys to this table are made up of the following strings:
-- Keys to this table are made up of the following strings:
--
--
Line 673: Line 681:
--]]
--]]


-- If the reason specified to the template is listed in this table,
-- namespace data will take priority over reason data in the protectionCategories
-- table.
reasonsWithNamespacePriority = {
reasonsWithNamespacePriority = {
-- If the reason specified to the template is listed in this table,
-- namespace data will take priority over reason data in the protectionCategories
-- table.
vandalism = true,
vandalism = true,
},
},


-- The string to use as a namespace key for the protectionCategories table for each
-- namespace number.
categoryNamespaceKeys = {
categoryNamespaceKeys = {
-- The string to use as a namespace key for the protectionCategories table for each
-- namespace number.
[  2] = 'user',
[  2] = 'user',
[  3] = 'user',
[  3] = 'user',
Line 771: Line 779:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- This table produces the page types available with the ${PAGETYPE} parameter.
-- Keys are namespace numbers, or the string "default" for the default value.
pagetypes = {
pagetypes = {
[0] = 'article',
[0] = 'article',
Line 784: Line 794:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- This table contains values passed to the expiry parameter that mean the page
-- is protected indefinitely.
indefStrings = {
indefStrings = {
['indef'] = true,
['indef'] = true,
Line 795: Line 807:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- This table contains wrapper templates used with the module, and their
-- default arguments. Templates specified in this table should contain the
-- following invocation, and no other template content:
--
-- {{#invoke:Protection banner|main}}
--
-- If other content is desired, it can be added between
-- <noinclude>...</noinclude> tags.
--
-- When a user calls one of these wrapper templates, they will use the
-- default arguments automatically. The arguments cannot be overwritten by the
-- user.
wrappers = {
wrappers = {
['Template:Pp']                        = {},
['Template:Pp']                        = {},
Cookies help us deliver our services. By using our services, you agree to our use of cookies.