Module:Protection banner/config: Difference between revisions

    From Nonbinary Wiki
    (Specify time of expiration in addition to date — suggested on talk, seems to work and is reasonable)
    (Remove references to Pending Changes level 2, normalize PC1 as PC)
    Line 134: Line 134:
    move = {},
    move = {},
    autoreview = {
    autoreview = {
    autoconfirmed = {
    default = {
    alt = 'Page protected with pending changes level 1',
    alt = 'Page protected with pending changes',
    tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users',
    tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users',
    image = 'Padlock-silver-light.svg'
    image = 'Padlock-silver-light.svg'
    },
    default = {
    alt = 'Page protected with pending changes level 2',
    tooltip = 'All edits by users who are not reviewers or administrators are'
    .. ' subject to review prior to becoming visible to unregistered users',
    image = 'Padlock-orange.svg'
    }
    }
    },
    },
    Line 412: Line 406:
    },
    },
    autoreview = {
    autoreview = {
    autoconfirmed = 'All edits made to this ${PAGETYPE} by'
    default = 'All edits made to this ${PAGETYPE} by'
    .. ' [[Wikipedia:User access levels#New users|new]] or'
    .. ' [[Wikipedia:User access levels#New users|new]] or'
    .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'
    .. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'
    .. ' users are currently'
    .. ' users are currently'
    .. ' [[Wikipedia:Pending changes|subject to review]]',
    default = 'All edits made to this ${PAGETYPE} by users who are not'
    .. ' [[Wikipedia:Reviewing|reviewers]] or'
    .. ' [[Wikipedia:Administrators|administrators]] are currently'
    .. ' [[Wikipedia:Pending changes|subject to review]]'
    .. ' [[Wikipedia:Pending changes|subject to review]]'
    },
    },
    Line 513: Line 503:
    autoreview = {
    autoreview = {
    default = {
    default = {
    reviewer = 'See the [[Wikipedia:Protection policy|'
    .. 'protection policy]] and ${PROTECTIONLOG} for more details.'
    .. ' Edits to this ${PAGETYPE} will not be visible to readers'
    .. ' until they are accepted by a reviewer or an administrator.'
    .. ' To avoid the need for your edits to be reviewed, you may'
    .. ' [[Wikipedia:Requests for page protection'
    .. '#Current requests for reduction in protection level'
    .. '|request unprotection]]. Experienced editors may also'
    .. ' request the [[Wikipedia:Reviewing|reviewer user right]].',
    default = 'See the [[Wikipedia:Protection policy|'
    default = 'See the [[Wikipedia:Protection policy|'
    .. 'protection policy]] and ${PROTECTIONLOG} for more details.'
    .. 'protection policy]] and ${PROTECTIONLOG} for more details.'
    Line 600: Line 581:
    },
    },
    autoreview = {
    autoreview = {
    autoconfirmed = 'Padlock-silver-light.svg',
    default = 'Padlock-silver-light.svg'
    default = 'Padlock-orange.svg'
    },
    },
    upload = {
    upload = {
    Line 638: Line 618:
    },
    },
    autoreview = {
    autoreview = {
    autoconfirmed = 'Wikipedia:Protection policy#pc1',
    default = 'Wikipedia:Protection policy#pending'
    reviewer = 'Wikipedia:Protection policy#pc2'
    },
    },
    upload = {
    upload = {
    Line 801: Line 780:
    ['all|user|all|sysop|move']              = 'Wikipedia move-protected user and user talk pages',
    ['all|user|all|sysop|move']              = 'Wikipedia move-protected user and user talk pages',
    ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages',
    ['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages',
    ['all|all|all|reviewer|autoreview']      = 'Wikipedia pending changes protected pages (level 2)',
    ['all|file|all|all|upload']              = 'Wikipedia upload-protected files',
    ['all|file|all|all|upload']              = 'Wikipedia upload-protected files',
    },
    },
    Line 908: Line 886:
    ['Template:Pp-pc']                      = {action = 'autoreview', small = true},
    ['Template:Pp-pc']                      = {action = 'autoreview', small = true},
    ['Template:Pp-pc1']                    = {action = 'autoreview', small = true},
    ['Template:Pp-pc1']                    = {action = 'autoreview', small = true},
    ['Template:Pp-pc2']                    = {action = 'autoreview', small = true},
    ['Template:Pp-reset']                  = {'reset'},
    ['Template:Pp-reset']                  = {'reset'},
    ['Template:Pp-semi-indef']              = {small = true},
    ['Template:Pp-semi-indef']              = {small = true},

    Revision as of 19:21, 31 October 2018

    Documentation for this module may be created at Module:Protection banner/config/doc

    -- This module provides configuration data for [[Module:Protection banner]].
    
    return {
    
    --------------------------------------------------------------------------------
    --
    --                                BANNER DATA
    --
    --------------------------------------------------------------------------------
    
    --[[
    -- Banner data consists of six fields:
    -- * text - the main protection text that appears at the top of protection
    --   banners.
    -- * explanation - the text that appears below the main protection text, used
    --   to explain the details of the protection.
    -- * tooltip - the tooltip text you see when you move the mouse over a small
    --   padlock icon.
    -- * link - the page that the small padlock icon links to.
    -- * alt - the alt text for the small padlock icon. This is also used as tooltip
    --   text for the large protection banners.
    -- * image - the padlock image used in both protection banners and small padlock
    --   icons.
    --
    -- The module checks in three separate tables to find a value for each field.
    -- First it checks the banners table, which has values specific to the reason
    -- for the page being protected. Then the module checks the defaultBanners
    -- table, which has values specific to each protection level. Finally, the
    -- module checks the masterBanner table, which holds data for protection
    -- templates to use if no data