Module:Protection banner/config: Difference between revisions

(move template explanation text to a new banner config table)
 
(128 intermediate revisions by 25 users not shown)
Line 1: Line 1:
-- This module provides configuration data for [[Module:Protection banner]].
-- This module provides configuration data for [[Module:Protection banner]].


local cfg = {}
return {


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Banner config
--
--                                BANNER DATA
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


-- A table of protection banners, sorted by protection type.
--[[
-- $1 = Intro blurb, e.g. "This page is currently
-- Banner data consists of six fields:
--     [[Help:Protection|protected]] from editing"
-- * text - the main protection text that appears at the top of protection
-- $2 = "until" or "or until" depending on the expiry
--  banners.
-- $3 = "disputes", with or without a section link
-- * explanation - the text that appears below the main protection text, used
-- $4 = the type of the page, e.g. "article", "template", or "page"
--  to explain the details of the protection.
-- $5 = A blurb "it has been protected for x years, x months and x days."
-- * tooltip - the tooltip text you see when you move the mouse over a small
-- $6 = the protection date
--  padlock icon.
-- $7 = {{vandal-m|username}} replacement
-- * link - the page that the small padlock icon links to.
-- $8 = protection level/type blurb, e.g. "create-protected" or "fully protected"
-- * alt - the alt text for the small padlock icon. This is also used as tooltip
-- $9 = the expiry - " until DD Month YYYY". If protection is indefinite, this is the blank string.
--  text for the large protection banners.
-- $10 = the icon-reason, prefixed with ", "
-- * image - the padlock image used in both protection banners and small padlock
-- $11 = A link to the page history, with display msg['dispute-edit-link-display']
--  icons.
-- $12 = A link to the move log, with display msg['dispute-move-link-display']
--
-- $13 = A link to the protection log or the pending changes log, with display msg['more-details-protection-log-display'] or msg['more-details-pc-log-display']
-- The module checks in three separate tables to find a value for each field.
-- $14 = Talk page link
-- First it checks the banners table, which has values specific to the reason
-- $15 = Edit request link
-- for the page being protected. Then the module checks the defaultBanners
-- $16 = Request unprotection blurb
-- table, which has values specific to each protection level. Finally, the
-- $17 = Adds links to edit requests and the talk page if we are on a subject page
-- module checks the masterBanner table, which holds data for protection
-- $18 = Deletion discussion link
-- templates to use if no data has been found in the previous two tables.
-- $19 = Deletion log link
--
-- $20 = {{#ifeq:{{NAMESPACE}}|{{ns:6}}|image, included in a high-risk template or message,|high-risk {{pp-meta/pagetype}} }}
-- The values in the banner data can take parameters. These are specified
-- $21 = "semi-protected from editing", "protected from editing" or "move-protected"
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name
-- enclosed in curly braces).
--
--                         Available parameters:
--
-- ${CURRENTVERSION} - a link to the page history or the move log, with the
-- display message "current-version-edit-display" or
-- "current-version-move-display".
--
-- ${EDITREQUEST} - a link to create an edit request for the current page.
--
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes
-- on the talk page; you may submit a request to ask an administrator to make
-- an edit if it is minor or supported by consensus."
--
-- ${IMAGELINK} - a link to set the image to, depending on the protection
-- action and protection level.
--
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry
-- is set. E.g. "Editing of this page by new or unregistered users is currently
-- disabled until dd Month YYYY."
--
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation
-- so that it can be used in run-on sentences.
--
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".
-- Defined in the cfg.pagetypes table.
--
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.
-- "Editing of this page by new or unregistered users is currently disabled"
--
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the
-- template.
--
-- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or
-- "semi-protected".
--
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,
-- depending on the protection action.
--
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links
-- straight to that talk page section.
--
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to
-- create a blurb like "This template is semi-protected", or "This article is
-- move-protected until DD Month YYYY".
--
-- ${VANDAL} - links for the specified username (or the root page name)
-- using Module:Vandal-m.