Module:Protection banner/config: Difference between revisions

    From Nonbinary Wiki
    (note which tables are required to have "edit", "move", and "autoreview" subtables)
    (add more comments)
    Line 4: Line 4:


    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --
    --                                BANNER DATA
    --                                BANNER DATA
    --
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------


    -- PARAMETERS
    --[[
    -- 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 has been found in the previous two tables.
    --
    --
    -- The values in the banner data can take parameters. These are specified
    -- The values in the banner data can take parameters. These are specified
    -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name
    -- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name
    -- enclosed in curly braces). Available parameters:
    -- enclosed in curly braces).
    --
    --                          Available parameters:
    --
    --
    -- ${CURRENTVERSION} - a link to the page history or the move log, with the
    -- ${CURRENTVERSION} - a link to the page history or the move log, with the
    Line 62: Line 85:
    --]]
    --]]


     
    -- The master banner data, used if no values have been found in banners or
    --------------------------------------------------------------------------------
    -- defaultBanners.
    -- Banner defaults
    --------------------------------------------------------------------------------
     
    -- If no protection reason is specified, or no banner data exists for the
    -- reason given, then this data will be used for the banner. Individual items
    -- from this data will also be used if that item doesn't exist in the reason-
    -- specific banner config.
     
    masterBanner = {
    masterBanner = {
    text = '${INTROBLURB}',
    text = '${INTROBLURB}',
    Line 80: Line 95:
    },
    },


    -- The default banner data. This holds banner data for different protection
    -- levels.
    -- *required* - this table needs edit, move, and autoreview subtables.
    -- *required* - this table needs edit, move, and autoreview subtables.
    defaultBanners = {
    defaultBanners = {
    Line 98: Line 115:
    },
    },


    --------------------------------------------------------------------------------
    -- The banner data. This holds banner data for different protection reasons.
    -- Banner config
    -- In fact, the reasons specified in this table control which reasons are
    --------------------------------------------------------------------------------
    -- valid inputs to the first positional parameter.
     
    -- *required* - this table needs edit, move, and autoreview subtables.
    -- *required* - this table needs edit, move, and autoreview subtables.
    banners = {
    banners = {
    Line 113: Line 129:
    .. "|Wikipedia's policy on the biographies"
    .. "|Wikipedia's policy on the biographies"
    .. ' of living people]].',
    .. ' of living people]].',
    tooltip = '${TOOLTIPBLURB} to promote compliance with the policy on biographies of'
    tooltip = '${TOOLTIPBLURB} to promote compliance with the policy on'
    .. ' living people',
    .. ' biographies of living people',
    },
    },
    dmca = {
    dmca = {
    Line 726: Line 742:
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------