Module:Category handler/config

From KitwarePublic
< Module:Category handler
Revision as of 23:19, 12 July 2016 by WikiSysop (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Documentation for this module may be created at Module:Category handler/config/doc

  1 --------------------------------------------------------------------------------
  2 --            [[Module:Category handler]] configuration data                  --
  3 --       Language-specific parameter names and values can be set here.        --
  4 --       For blacklist config, see [[Module:Category handler/blacklist]].     --
  5 --------------------------------------------------------------------------------
  6 
  7 local cfg = {} -- Don't edit this line.
  8 
  9 --------------------------------------------------------------------------------
 10 --                       Start configuration data                             --
 11 --------------------------------------------------------------------------------
 12 
 13 --------------------------------------------------------------------------------
 14 --                              Parameter names                               --
 15 -- These configuration items specify custom parameter names.                  --
 16 -- To add one extra name, you can use this format:                            --
 17 --                                                                            --
 18 -- foo = 'parameter name',                                                    --
 19 --                                                                            --
 20 -- To add multiple names, you can use this format:                            --
 21 --                                                                            --
 22 -- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'},        --
 23 --------------------------------------------------------------------------------
 24 
 25 cfg.parameters = {
 26 	
 27 	-- The nocat and categories parameter suppress
 28 	-- categorisation. They are used with Module:Yesno, and work as follows:
 29 	--
 30 	-- cfg.nocat:
 31 	-- Result of yesno()                        Effect
 32 	-- true                                     Categorisation is suppressed
 33 	-- false                                    Categorisation is allowed, and
 34 	--                                          the blacklist check is skipped
 35 	-- nil                                      Categorisation is allowed
 36 	--
 37 	-- cfg.categories:
 38 	-- Result of yesno()                        Effect
 39 	-- true                                     Categorisation is allowed, and
 40 	--                                          the blacklist check is skipped
 41 	-- false                                    Categorisation is suppressed
 42 	-- nil                                      Categorisation is allowed
 43 	nocat = 'nocat',
 44 	categories = 'categories',
 45 	
 46 	-- The parameter name for the legacy "category2" parameter. This skips the
 47 	-- blacklist if set to the cfg.category2Yes value, and suppresses
 48 	-- categorisation if present but equal to anything other than
 49 	-- cfg.category2Yes or cfg.category2Negative.
 50 	category2 = 'category2',
 51 	
 52 	-- cfg.subpage is the parameter name to specify how to behave on subpages.
 53 	subpage = 'subpage',
 54 	
 55 	-- The parameter for data to return in all namespaces.
 56 	all = 'all',
 57 	
 58 	-- The parameter name for data to return if no data is specified for the
 59 	-- namespace that is detected.
 60 	other = 'other',
 61 	
 62 	-- The parameter name used to specify a page other than the current page;
 63 	-- used for testing and demonstration.
 64 	demopage = 'page',
 65 }
 66 
 67 --------------------------------------------------------------------------------
 68 --                              Parameter values                              --
 69 -- These are set values that can be used with certain parameters. Only one    --
 70 -- value can be specified, like this:                                         --
 71 --                                                                            --
 72 -- cfg.foo = 'value name'                                                     --                                               --
 73 --------------------------------------------------------------------------------
 74 
 75 -- The following settings are used with the cfg.category2 parameter. Setting
 76 -- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2
 77 -- is present but equal to anything other than cfg.category2Yes or
 78 -- cfg.category2Negative then it supresses cateogrisation.
 79 cfg.category2Yes = 'yes'
 80 cfg.category2Negative = '¬'
 81 
 82 -- The following settings are used with the cfg.subpage parameter.
 83 -- cfg.subpageNo is the value to specify to not categorise on subpages;
 84 -- cfg.subpageOnly is the value to specify to only categorise on subpages.
 85 cfg.subpageNo = 'no'
 86 cfg.subpageOnly = 'only'
 87 
 88 --------------------------------------------------------------------------------
 89 --                           Default namespaces                               --
 90 -- This is a table of namespaces to categorise by default. The keys are the   --
 91 -- namespace numbers.                                                         --
 92 --------------------------------------------------------------------------------
 93 
 94 cfg.defaultNamespaces = {
 95 	[  0] = true, -- main
 96 	[  6] = true, -- file
 97 	[ 12] = true, -- help
 98 	[ 14] = true, -- category
 99 	[100] = true, -- portal
100 	[108] = true, -- book
101 }
102 
103 --------------------------------------------------------------------------------
104 --                                Wrappers                                    --
105 -- This is a wrapper template or a list of wrapper templates to be passed to  --
106 -- [[Module:Arguments]].                                                      --
107 --------------------------------------------------------------------------------
108 
109 cfg.wrappers = 'Template:Category handler'
110 
111 --------------------------------------------------------------------------------
112 --                           End configuration data                           --
113 --------------------------------------------------------------------------------
114 
115 return cfg -- Don't edit this line.