Module:Documentation/config: Difference between revisions

    From Nonbinary Wiki
    m>Mr. Stradivarius
    (add cfg.titleArg)
     
    (55 intermediate revisions by 25 users not shown)
    Line 9: Line 9:


    local cfg = {} -- Do not edit this line.
    local cfg = {} -- Do not edit this line.
    ----------------------------------------------------------------------------------------------------
    -- Environment configuration
    ----------------------------------------------------------------------------------------------------
    -- cfg.titleArg
    -- An argument to specify what page to make links for. For testing purposes.
    cfg.titleArg = 'page'


    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------
    Line 22: Line 14:
    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------


    -- cfg.protectionTemplate
    -- cfg['protection-reason-edit']
    -- The name of the template that displays the protection icon (a padlock on enwiki).
    -- The protection reason for edit-protected templates to pass to
    cfg.protectionTemplate = 'pp-template'
    -- [[Module:Protection banner]].
     
    cfg['protection-reason-edit'] = 'template'
    -- cfg.protectionTemplateArgs
    -- Any arguments to send to the protection template.
    cfg.protectionTemplateArgs = {docusage = 'yes'}


    --[[
    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------
    -- Sandbox template configuration
    -- Sandbox notice configuration
    --
    --
    -- On sandbox pages the module can display a template notifying users that the current page is a
    -- On sandbox pages the module can display a template notifying users that the current page is a
    -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
    -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
    -- sandbox or not based on the value of cfg.sandboxSubpage. The following settings configure which
    -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
    -- template is displayed and what the arguments passed to it are.
    -- messages that the notices contains.
    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------
    --]]
    -- cfg['sandbox-notice-image']
    -- The image displayed in the sandbox notice.
    cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]'
    --[[
    -- cfg['sandbox-notice-pagetype-template']
    -- cfg['sandbox-notice-pagetype-module']
    -- cfg['sandbox-notice-pagetype-other']
    -- The page type of the sandbox page. The message that is displayed depends on the current subject
    -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
    -- cfg['sandbox-notice-diff-blurb'].
    --]]
    cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'
    cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'
    cfg['sandbox-notice-pagetype-other'] = 'sandbox page'


    -- cfg.sandboxNoticeTemplate
    --[[
    -- The name of the template to display at the top of sandbox pages.
    -- cfg['sandbox-notice-blurb']
    cfg.sandboxNoticeTemplate = 'template sandbox notice'
    -- cfg['sandbox-notice-diff-blurb']
    -- cfg['sandbox-notice-diff-display']
    -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
    -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
    -- type, which is either cfg['sandbox-notice-pagetype-template'],
    -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
    -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
    -- the sandbox and the main template. The display value of the diff link is set by
    -- cfg['sandbox-notice-compare-link-display'].
    --]]
    cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.'
    cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).'
    cfg['sandbox-notice-compare-link-display'] = 'diff'