Jump to content

Module:Protection banner/config: Difference between revisions

further conversion to new bannerData scheme
(more conversion of the data to the bannerConfig table)
(further conversion to new bannerData scheme)
Line 109: Line 109:
-- "deletion-discussion-blurb-xfd" if a link to a deletion discussion is
-- "deletion-discussion-blurb-xfd" if a link to a deletion discussion is
-- present, or "deletion-discussion-blurb-noxfd" if not.
-- present, or "deletion-discussion-blurb-noxfd" if not.
--
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,
-- depending on the protection action.
--]]
--]]


Line 139: Line 142:


local introText = {}
local introText = {}
introText.full = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from editing'
introText.semi = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access levels'
.. '#New users|new]] or [[Wikipedia:User access levels#Unregistered users'
.. '|unregistered]] users is currently [[Help:Protection|disabled]]'
introText.move = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
introText.move = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]]'
.. ' from [[Help:Moving a page|page moves]]'
introText.create = '[[Help:Starting a new page|Recreation]] of this ${PAGETYPE}'
introText.create = '[[Help:Starting a new page|Recreation]] of this ${PAGETYPE}'
.. ' [[Help:Protection|has been disabled]]'
.. ' [[Help:Protection|has been disabled]]'
 
--------------------------------------------------------------------------------
-- Banner data table
--------------------------------------------------------------------------------
 
-- Shared explanation text for the bannerData table.
 
local explanationText = {}
explanationText.moreDetails = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
 
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Banner data table
-- Banner data table
Line 157: Line 165:
-- Set the defaults for all protection types.
-- Set the defaults for all protection types.
cfg.bannerData['all-all-all-all-all'] = {
cfg.bannerData['all-all-all-all-all'] = {
text = introText.full .. '.',
text = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from editing.',
explanation = 'Please discuss any changes on the ${TALKPAGELINK}; you'
explanation = 'Please discuss any changes on the ${TALKPAGELINK}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' may ${EDITREQUEST} to ask an'
Line 175: Line 184:
cfg.bannerData['all-all-all-all-move'] = {
cfg.bannerData['all-all-all-all-move'] = {
explanation = 'The page may still be edited but cannot be moved'
explanation = 'The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves on the'
.. ' until unprotected. Please discuss any suggested moves on the'
.. ' ${TALKPAGELINK} or at [[Wikipedia:Requested moves]]. You can also'
.. ' ${TALKPAGELINK} or at [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
.. ' unprotected.',
}
}


Line 184: Line 193:
cfg.bannerData['all-all-all-all-create'] = {
cfg.bannerData['all-all-all-all-create'] = {
explanation = '${DELETIONBLURB} If you would like to create a page'
explanation = '${DELETIONBLURB} If you would like to create a page'
.. ' at this title, you must first'
.. ' at this title, you must first'
.. ' [[Wikipedia:Requests for page protection|request]] for it to be'
.. ' [[Wikipedia:Requests for page protection|request]] for it to be'
.. ' unprotected, or contact the administrator who deleted the page for the'
.. ' unprotected, or contact the administrator who deleted the page for the'
.. ' deleted material to be restored. If unsuccessful, you can use'
.. ' deleted material to be restored. If unsuccessful, you can use'
.. ' [[Wikipedia:Deletion review|deletion review]].',
.. ' [[Wikipedia:Deletion review|deletion review]].',
}
}


-- Don't make an unprotection request link for pages in the MediaWiki namespace.
-- Don't make an unprotection request link for pages in the MediaWiki namespace.
cfg.bannerData['all-mediawiki-all-all-all'] = {
cfg.bannerData['all-mediawiki-all-all-all'] = {
text = introText.full .. '.',
explanation = 'Please discuss any changes on the ${TALKPAGELINK}; you'
explanation = 'Please discuss any changes on the ${TALKPAGELINK}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' may ${EDITREQUEST} to ask an'
Line 204: Line 212:
-- Set defaults for temporarily-protected pages.
-- Set defaults for temporarily-protected pages.
cfg.bannerData['temp-all-all-all-all'] = {
cfg.bannerData['temp-all-all-all-all'] = {
text = introText.full .. ' until ${EXPIRY}.',
text = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.'
.. ' from editing until ${EXPIRY}.',
tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',
}
}


-- Semi-protected pages.
cfg.bannerData['all-all-all-autoconfirmed-edit'] = {
cfg.bannerData['all-all-all-autoconfirmed-edit'] = {
text = introText.semi .. '.'
text = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access levels'
.. '#New users|new]] or [[Wikipedia:User access levels#Unregistered users'
.. '|unregistered]] users is currently [[Help:Protection|disabled]].',
}
}


-- Temporarily semi-protected pages.
cfg.bannerData['temp-all-all-autoconfirmed-edit'] = {
cfg.bannerData['temp-all-all-autoconfirmed-edit'] = {
text = introText.semi .. ' until ${EXPIRY}.'
text = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access levels'
.. '#New users|new]] or [[Wikipedia:User access levels#Unregistered users'
.. '|unregistered]] users is currently [[Help:Protection|disabled]]'
.. ' until ${EXPIRY}.',
}
 
-- Move-protected pages.
cfg.bannerData['all-all-all-all-move'] = {
text = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]].',
}
 
-- Temporarily move-protected pages.
cfg.bannerData['temp-all-all-all-move'] = {
text = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]] until ${EXPIRY}.',
}
 
-- Create-protected pages.
cfg.bannerData['all-all-all-all-create'] = {
text = '[[Help:Starting a new page|Recreation]] of this ${PAGETYPE}'
.. ' [[Help:Protection|has been disabled]].',
}
 
-- Create-protected pages.
cfg.bannerData['temp-all-all-all-create'] = {
text = '[[Help:Starting a new page|Recreation]] of this ${PAGETYPE}'
.. ' [[Help:Protection|has been disabled]] until ${EXPIRY}.',
}
}


Line 221: Line 261:


local bannerDataCategories = {
local bannerDataCategories = {
['all-all-office-all-all'] = 'Wikipedia Office-protected pages',
['all-all-office-all-all']               = 'Wikipedia Office-protected pages',
['all-all-reset-all-all'] = 'Wikipedia Office-protected pages',
['all-all-reset-all-all']               = 'Wikipedia Office-protected pages',
['all-template-all-all-edit'] = 'Wikipedia protected templates',
['all-template-all-all-edit']           = 'Wikipedia protected templates',
['all-all-all-autoconfirmed-edit'] = 'Wikipedia semi-protected pages',
['all-all-all-autoconfirmed-edit']       = 'Wikipedia semi-protected pages',
['indef-all-all-autoconfirmed-edit'] = 'Wikipedia indefinitely semi-protected pages',
['indef-all-all-autoconfirmed-edit']     = 'Wikipedia indefinitely semi-protected pages',
['all-all-blp-autoconfirmed-edit'] = 'Wikipedia indefinitely semi-protected biographies of living people',
['all-all-blp-autoconfirmed-edit']       = 'Wikipedia indefinitely semi-protected biographies of living people',
['temp-all-blp-autoconfirmed-edit'] = 'Wikipedia temporarily semi-protected biographies of living people',
['temp-all-blp-autoconfirmed-edit']     = 'Wikipedia temporarily semi-protected biographies of living people',
['all-all-dispute-autoconfirmed-edit'] = 'Wikipedia pages semi-protected due to dispute',
['all-all-dispute-autoconfirmed-edit']   = 'Wikipedia pages semi-protected due to dispute',
['all-all-sock-autoconfirmed-edit'] = 'Wikipedia pages semi-protected from banned users',
['all-all-sock-autoconfirmed-edit']     = 'Wikipedia pages semi-protected from banned users',
['all-all-vandalism-autoconfirmed-edit'] = 'Wikipedia pages semi-protected against vandalism',
['all-all-vandalism-autoconfirmed-edit'] = 'Wikipedia pages semi-protected against vandalism',
['all-category-all-autoconfirmed-edit'] = 'Wikipedia semi-protected categories',
['all-category-all-autoconfirmed-edit'] = 'Wikipedia semi-protected categories',
['all-file-all-autoconfirmed-edit'] = 'Semi-protected images',
['all-file-all-autoconfirmed-edit']     = 'Semi-protected images',
['all-portal-all-autoconfirmed-edit'] = 'Semi-protected portals',
['all-portal-all-autoconfirmed-edit']   = 'Semi-protected portals',
['all-project-all-autoconfirmed-edit'] = 'Semi-protected project pages',
['all-project-all-autoconfirmed-edit']   = 'Semi-protected project pages',
['all-talk-all-autoconfirmed-edit'] = 'Semi-protected talk pages',
['all-talk-all-autoconfirmed-edit']     = 'Semi-protected talk pages',
['all-template-all-autoconfirmed-edit'] = 'Wikipedia semi-protected templates',
['all-template-all-autoconfirmed-edit'] = 'Wikipedia semi-protected templates',
['all-template-all-autoconfirmed-edit'] = 'Wikipedia semi-protected templates',
['all-template-all-autoconfirmed-edit'] = 'Wikipedia semi-protected templates',
['all-user-all-autoconfirmed-edit'] = 'Wikipedia semi-protected user and user talk pages',
['all-user-all-autoconfirmed-edit']     = 'Wikipedia semi-protected user and user talk pages',
['all-all-blp-sysop-edit'] = 'Wikipedia indefinitely protected biographies of living people',
['all-all-blp-sysop-edit']               = 'Wikipedia indefinitely protected biographies of living people',
['temp-all-blp-sysop-edit'] = 'Wikipedia temporarily protected biographies of living people',
['temp-all-blp-sysop-edit']             = 'Wikipedia temporarily protected biographies of living people',
['all-all-dispute-sysop-edit'] = 'Wikipedia pages protected due to dispute',
['all-all-dispute-sysop-edit']           = 'Wikipedia pages protected due to dispute',
['all-all-sock-sysop-edit'] = 'Wikipedia pages protected from banned users',
['all-all-sock-sysop-edit']             = 'Wikipedia pages protected from banned users',
['all-all-vandalism-sysop-edit'] = 'Wikipedia pages protected against vandalism',
['all-all-vandalism-sysop-edit']         = 'Wikipedia pages protected against vandalism',
['all-category-all-sysop-edit'] = 'Wikipedia protected categories',
['all-category-all-sysop-edit']         = 'Wikipedia protected categories',
['all-file-all-sysop-edit'] = 'Protected images',
['all-file-all-sysop-edit']             = 'Protected images',
['all-project-all-sysop-edit'] = 'Protected project pages',
['all-project-all-sysop-edit']           = 'Protected project pages',
['all-talk-all-sysop-edit'] = 'Protected talk pages',
['all-talk-all-sysop-edit']             = 'Protected talk pages',
['all-template-all-sysop-edit'] = 'Wikipedia protected templates',
['all-template-all-sysop-edit']         = 'Wikipedia protected templates',
['all-user-all-sysop-edit'] = 'Wikipedia protected user and user talk pages',
['all-user-all-sysop-edit']             = 'Wikipedia protected user and user talk pages',
['all-all-all-sysop-move'] = 'Wikipedia move-protected pages',
['all-all-all-sysop-move']               = 'Wikipedia move-protected pages',
['indef-all-all-sysop-move'] = 'Wikipedia indefinitely move-protected pages',
['indef-all-all-sysop-move']             = 'Wikipedia indefinitely move-protected pages',
['all-all-dispute-sysop-move'] = 'Wikipedia pages move-protected due to dispute',
['all-all-dispute-sysop-move']           = 'Wikipedia pages move-protected due to dispute',
['all-all-vandalism-sysop-move'] = 'Wikipedia pages move-protected due to vandalism',
['all-all-vandalism-sysop-move']         = 'Wikipedia pages move-protected due to vandalism',
['all-portal-all-sysop-move'] = 'Wikipedia move-protected portals',
['all-portal-all-sysop-move']           = 'Wikipedia move-protected portals',
['all-portal-all-sysop-move'] = 'Wikipedia move-protected portals',
['all-portal-all-sysop-move']           = 'Wikipedia move-protected portals',
['all-project-all-sysop-move'] = 'Wikipedia move-protected project pages',
['all-project-all-sysop-move']           = 'Wikipedia move-protected project pages',
['all-talk-all-sysop-move'] = 'Wikipedia move-protected talk pages',
['all-talk-all-sysop-move']             = 'Wikipedia move-protected talk pages',
['all-template-all-sysop-move'] = 'Wikipedia move-protected templates',
['all-template-all-sysop-move']         = 'Wikipedia move-protected templates',
['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 (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)',
}
}


Cookies help us deliver our services. By using our services, you agree to our use of cookies.