Module:Protection banner/config: Difference between revisions
(add more comments; explain functions in the banner config and what some of the other config tables do) |
m (137 revisions imported from wikipedia:Module:Protection_banner/config: see Topic:Vtixlm0q28eo6jtf) |
||
| (60 intermediate revisions by 25 users not shown) | |||
| Line 41: | Line 41: | ||
-- | -- | ||
-- ${EDITREQUEST} - a link to create an edit request for the current page. | -- ${EDITREQUEST} - a link to create an edit request for the current page. | ||
-- | -- | ||
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes | -- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes | ||
| Line 125: | Line 122: | ||
text = '${INTROBLURB}', | text = '${INTROBLURB}', | ||
explanation = '${EXPLANATIONBLURB}', | explanation = '${EXPLANATIONBLURB}', | ||
tooltip = '${TOOLTIPBLURB} | tooltip = '${TOOLTIPBLURB}', | ||
link = '${IMAGELINK}', | link = '${IMAGELINK}', | ||
alt = 'Page ${PROTECTIONLEVEL}' | alt = 'Page ${PROTECTIONLEVEL}' | ||
| Line 132: | Line 129: | ||
-- 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 | -- *required* - this table needs edit, move, autoreview and upload subtables. | ||
defaultBanners = { | defaultBanners = { | ||
edit = {}, | edit = {}, | ||
move = {}, | move = {}, | ||
autoreview = { | autoreview = { | ||
default = { | default = { | ||
alt = 'Page protected with pending changes | alt = 'Page protected with pending changes', | ||
tooltip = 'All edits by users | tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', | ||
image = 'Pending-protection-shackle.svg' | |||
} | } | ||
} | }, | ||
upload = {} | |||
}, | }, | ||
| Line 158: | Line 151: | ||
-- module documentation. | -- module documentation. | ||
-- | -- | ||
-- *required* - this table needs edit, move, and | -- *required* - this table needs edit, move, autoreview and upload subtables. | ||
banners = { | banners = { | ||
edit = { | edit = { | ||
| Line 164: | Line 157: | ||
description = 'For pages protected to promote compliance with the' | description = 'For pages protected to promote compliance with the' | ||
.. ' [[Wikipedia:Biographies of living persons' | .. ' [[Wikipedia:Biographies of living persons' | ||
.. '|biographies of living persons]] policy | .. '|biographies of living persons]] policy', | ||
text = '${INTROFRAGMENT} to promote compliance with' | text = '${INTROFRAGMENT} to promote compliance with' | ||
.. ' [[Wikipedia:Biographies of living persons' | .. ' [[Wikipedia:Biographies of living persons' | ||
.. "|Wikipedia's policy on the biographies" | .. "|Wikipedia's policy on the biographies" | ||
.. ' of living people]].', | .. ' of living people]].', | ||
tooltip = '${ | tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' | ||
.. ' biographies of living | .. ' biographies of living persons', | ||
}, | }, | ||
dmca = { | dmca = { | ||
description = 'For pages protected by the Wikimedia Foundation' | description = 'For pages protected by the Wikimedia Foundation' | ||
.. ' due to Digital Millennium Copyright Act takedown requests | .. ' due to [[Digital Millennium Copyright Act]] takedown requests', | ||
explanation = function (protectionObj, args) | explanation = function (protectionObj, args) | ||
local ret = 'Pursuant to a rights owner notice under the Digital' | local ret = 'Pursuant to a rights owner notice under the Digital' | ||
| Line 192: | Line 185: | ||
return ret | return ret | ||
end, | end, | ||
image = ' | image = 'Office-protection-shackle.svg', | ||
}, | }, | ||
dispute = { | dispute = { | ||
description = 'For pages protected due to editing disputes | description = 'For pages protected due to editing disputes', | ||
text = function (protectionObj, args) | text = function (protectionObj, args) | ||
-- Find the value of "disputes". | -- Find the value of "disputes". | ||
| Line 223: | Line 216: | ||
explanation = "This protection is '''not''' an endorsement of the" | explanation = "This protection is '''not''' an endorsement of the" | ||
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', | .. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}', | ||
tooltip = '${ | |||