Jump to content

Module:Protection banner/config: Difference between revisions

add support for upload protection
(replace red with gold, per changes on policy page)
(add support for upload protection)
Line 132: Line 132:
-- The default banner data. This holds banner data for different protection
-- The default banner data. This holds banner data for different protection
-- levels.
-- levels.
-- *required* - this table needs edit, move, and autoreview subtables.
-- *required* - this table needs edit, move, autoreview and upload subtables.
defaultBanners = {
defaultBanners = {
edit = {},
edit = {},
Line 147: Line 147:
.. ' subject to review',
.. ' subject to review',
}
}
}
},
upload = {}
},
},


Line 158: Line 159:
-- module documentation.
-- module documentation.
--
--
-- *required* - this table needs edit, move, and autoreview subtables.
-- *required* - this table needs edit, move, autoreview and upload subtables.
banners = {
banners = {
edit = {
edit = {
Line 367: Line 368:
}
}
},
},
autoreview = {}
autoreview = {},
upload = {}
},
},


Line 388: Line 390:
--
--
-- It is possible to use banner parameters inside this table.
-- 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, autoreview and upload subtables.
protectionBlurbs = {
protectionBlurbs = {
edit = {
edit = {
Line 411: Line 413:
.. ' [[Wikipedia:Administrators|administrators]] are currently'
.. ' [[Wikipedia:Administrators|administrators]] are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]'
.. ' [[Wikipedia:Pending changes|subject to review]]'
},
upload = {
default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'
}
}
},
},
Line 430: Line 435:
--
--
-- It is possible to use banner parameters inside this table.
-- 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, autoreview and upload subtables.
explanationBlurbs = {
explanationBlurbs = {
edit = {
edit = {
Line 510: Line 515:
.. ' [[Special:UserLogin/signup|create an account]].'
.. ' [[Special:UserLogin/signup|create an account]].'
},
},
},
upload = {
default = {
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but new versions of the file'
.. ' cannot be uploaded until it is unprotected. You can'
.. ' request that a new version be uploaded by using a'
.. ' [[Wikipedia:Edit requests|protected edit request]], or you'
.. ' can  [[Wikipedia:Requests for page protection|request]]'
.. ' that the file be unprotected.'
}
}
}
},
},
Line 519: Line 536:
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which
-- produces a short label for different protection levels. It is sorted by
-- produces a short label for different protection levels. It is sorted by
-- protection action and proteciton level, and is checked in the following
-- protection action and protection level, and is checked in the following
-- order:
-- order:
-- 1. page's protection action, page's protection level
-- 1. page's protection action, page's protection level
Line 526: Line 543:
--
--
-- It is possible to use banner parameters inside this table.
-- 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, autoreview and upload subtables.
protectionLevels = {
protectionLevels = {
edit = {
edit = {
Line 537: Line 554:
},
},
autoreview = {
autoreview = {
},
upload = {
default = 'upload-protected'
}
}
},
},
Line 562: Line 582:
autoconfirmed = 'Padlock-silver-light.svg',
autoconfirmed = 'Padlock-silver-light.svg',
default = 'Padlock-orange.svg'
default = 'Padlock-orange.svg'
},
upload = {
default = 'Padlock-purple.svg'
}
}
},
},
Line 583: Line 606:
--
--
-- It is possible to use banner parameters inside this table.
-- 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, autoreview and upload subtables.
imageLinks = {
imageLinks = {
edit = {
edit = {
Line 596: Line 619:
autoconfirmed = 'Wikipedia:Protection policy#pc1',
autoconfirmed = 'Wikipedia:Protection policy#pc1',
reviewer = 'Wikipedia:Protection policy#pc2'
reviewer = 'Wikipedia:Protection policy#pc2'
},
upload = {
default = 'Wikipedia:Protection policy#upload'
}
}
},
},
Line 753: Line 779:
['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages (level 1)',
['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages (level 1)',
['all|all|all|reviewer|autoreview']      = 'Wikipedia pending changes protected pages (level 2)',
['all|all|all|reviewer|autoreview']      = 'Wikipedia pending changes protected pages (level 2)',
['all|file|all|all|upload']              = 'Wikipedia upload-protected files',
},
},


Line 773: Line 800:
edit = nil,
edit = nil,
move = false,
move = false,
autoreview = true
autoreview = true,
upload = false
},
},


Line 839: Line 867:
--
--
-- When a user calls one of these wrapper templates, they will use the
-- When a user calls one of these wrapper templates, they will use the
-- default arguments automatically. The arguments cannot be overwritten by the
-- default arguments automatically. However, users can override any of the
-- user.
-- arguments.
wrappers = {
wrappers = {
['Template:Pp']                        = {},
['Template:Pp']                        = {},
Line 859: Line 887:
['Template:Pp-sock']                    = {'sock'},
['Template:Pp-sock']                    = {'sock'},
['Template:Pp-template']                = {'template', small = true},
['Template:Pp-template']                = {'template', small = true},
['Template:Pp-upload']                  = {action = 'upload'},
['Template:Pp-usertalk']                = {'usertalk'},
['Template:Pp-usertalk']                = {'usertalk'},
['Template:Pp-vandalism']              = {'vandalism'},
['Template:Pp-vandalism']              = {'vandalism'},
Cookies help us deliver our services. By using our services, you agree to our use of cookies.