Module:Protection banner/config: Difference between revisions
From Roses, Tulips, & Liberty
Content added Content deleted
(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: | ||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
-- |
-- This table provides the data for the "right" CSS property for small padlock |
||
-- |
-- icons, which determines where the icon appears on the top bar among the other |
||
-- icons. |
-- 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 |
-- 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: | ||
--]] |
--]] |
||
⚫ | |||
⚫ | |||
⚫ | |||
reasonsWithNamespacePriority = { |
reasonsWithNamespacePriority = { |
||
⚫ | |||
⚫ | |||
⚫ | |||
vandalism = true, |
vandalism = true, |
||
}, |
}, |
||
⚫ | |||
⚫ | |||
categoryNamespaceKeys = { |
categoryNamespaceKeys = { |
||
⚫ | |||
⚫ | |||
[ 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'] = {}, |