xref: /dokuwiki/lib/plugins/config/settings/config.metadata.php (revision 51d94d49a96d3c3d2a1c98e75b7a02030b5915e4)
1<?php
2/**
3 * Metadata for configuration manager plugin
4 *
5 * Note:  This file should be included within a function to ensure it
6 *        doesn't class with the settings it is describing.
7 *
8 * Format:
9 *   $meta[<setting name>] = array(<handler class id>,<param name> => <param value>);
10 *
11 *   <handler class id>  is the handler class name without the "setting_" prefix
12 *
13 * Defined classes:
14 *   Generic
15 *   -------------
16 *   ''             - default class ('setting'), text input, minimal input validation, setting output in quotes
17 *   'numeric'      - text input, accepts numbers and arithmetic operators, setting output without quotes
18 *   'onoff'        - checkbox input, setting output  0|1
19 *   'multichoice'  - select input (single choice), setting output with quotes, required _choices parameter
20 *   'email'        - text input, input must conform to email address format, setting output in quotes
21 *   'password'     - password input, minimal input validation, setting output plain text in quotes
22 *   'dirchoice'    - as multichoice, selection choices based on folders found at location specified in _dir
23 *                    parameter (required)
24 *
25 *  Single Setting
26 *  --------------
27 *   'savedir'     - as 'setting', input tested against initpath() (inc/init.php)
28 *   'sepchar'     - as multichoice, selection constructed from string of valid values
29 *   'authtype'    - as 'setting', input validated against a valid php file at expected location for auth files
30 *   'im_convert'  - as 'setting', input must exist and be an im_convert module
31 *
32 *  Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output
33 *
34 * Defined parameters:
35 *   '_pattern'    - string, a preg pattern. input is tested against this pattern before being accepted
36 *                   optional all classes, except onoff, multichoice & dirchoice which ignore it
37 *   '_choices'    - array of choices. used to populate a selection box. choice will be replaced by a localised
38 *                   language string, indexed by  <setting name>_o_<choice>, if one exists
39 *                   required by 'multichoice' class, ignored by other classes
40 *   '_dir'        - location of directory to be used to populate choice list
41 *                   required by 'dirchoice' class, ignored by other classes
42 *
43 * @author    Chris Smith <chris@jalakai.co.uk>
44 */
45// ---------------[ settings for settings ]------------------------------
46$config['format']  = 'php';      // format of setting files, supported formats: php
47$config['varname'] = 'conf';     // name of the config variable, sans $
48
49// this string is written at the top of the rewritten settings file,
50// !! do not include any comment indicators !!
51// this value can be overriden when calling save_settings() method
52$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings';
53
54// ---------------[ setting files ]--------------------------------------
55// these values can be string expressions, they will be eval'd before use
56$file['local']     = "DOKU_CONF.'local.php'";            // mandatory (file doesn't have to exist)
57$file['default']   = "DOKU_CONF.'dokuwiki.php'";         // optional
58$file['protected'] = "DOKU_CONF.'local.protected.php'";  // optional
59
60// test value (FIXME, remove before publishing)
61//$meta['test']     = array('multichoice','_choices' => array(''));
62
63// --------------[ setting metadata ]------------------------------------
64// - for description of format and fields see top of file
65// - order the settings in the order you wish them to appear
66// - any settings not mentioned will come after the last setting listed and
67//   will use the default class with no parameters
68
69$meta['title']    = array('');
70$meta['start']    = array('');
71$meta['savedir']  = array('savedir');
72$meta['lang']     = array('dirchoice','_dir' => DOKU_INC.'inc/lang/');
73$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/');
74
75$meta['umask']    = array('numeric','_pattern' => '/0[0-7]{3}/');  // only accept octal representation
76$meta['dmask']    = array('numeric','_pattern' => '/0[0-7]{3}/');  // only accept octal representation
77$meta['basedir']  = array('');
78$meta['baseurl']  = array('');
79
80$meta['fullpath']    = array('onoff');
81$meta['recent']      = array('numeric');
82$meta['breadcrumbs'] = array('numeric');
83$meta['typography']  = array('onoff');
84$meta['htmlok']      = array('onoff');
85$meta['phpok']       = array('onoff');
86$meta['dformat']     = array('');
87$meta['signature']   = array('');
88$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5));   // 5 toc levels
89$meta['maxtoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5));
90$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons
91$meta['camelcase']   = array('onoff');
92$meta['deaccent']    = array('onoff');
93$meta['useheading']  = array('onoff');
94$meta['refcheck']    = array('onoff');
95$meta['refshow']     = array('numeric');
96$meta['allowdebug']  = array('onoff');
97
98$meta['usewordblock']= array('onoff');
99$meta['indexdelay']  = array('numeric');
100$meta['relnofollow'] = array('onoff');
101$meta['mailguard']   = array('multichoice','_choices' => array('visible','hex','none'));
102
103$meta['useacl']      = array('onoff');
104$meta['openregister']= array('onoff');
105$meta['autopasswd']  = array('onoff');
106$meta['authtype']    = array('authtype');
107$meta['passcrypt']   = array('multichoice','_choices' => array('smd5','md5','sha1','ssha','crypt','mysql','my411'));
108$meta['defaultgroup']= array('');
109$meta['superuser']   = array('');
110$meta['profileconfirm'] = array('onoff');
111
112$meta['userewrite']  = array('multichoice','_choices' => array(0,1,2));
113$meta['useslash']    = array('onoff');
114$meta['sepchar']     = array('sepchar');
115$meta['canonical']   = array('onoff');
116$meta['autoplural']  = array('onoff');
117$meta['usegzip']     = array('onoff');
118$meta['cachetime']   = array('numeric');
119$meta['purgeonadd']  = array('onoff');
120$meta['locktime']    = array('numeric');
121$meta['notify']      = array('email');
122$meta['mailfrom']    = array('email');
123$meta['gdlib']       = array('multichoice','_choices' => array(0,1,2));
124$meta['im_convert']  = array('im_convert');
125$meta['spellchecker']= array('onoff');
126$meta['subscribers'] = array('onoff');
127$meta['compress']    = array('onoff');
128$meta['hidepages']   = array('');
129$meta['send404']     = array('onoff');
130$meta['sitemap']     = array('numeric');
131
132$meta['rss_type']    = array('multichoice','_choices' => array('rss','rss1','rss2','atom'));
133$meta['rss_linkto']  = array('multichoice','_choices' => array('diff','page','rev','current'));
134
135$meta['target____wiki']      = array('');
136$meta['target____interwiki'] = array('');
137$meta['target____extern']    = array('');
138$meta['target____media']     = array('');
139$meta['target____windows']   = array('');
140
141$meta['proxy____host'] = array('','_pattern' => '#^[a-z0-9\-\.+]+?#i');
142$meta['proxy____port'] = array('numeric');
143$meta['proxy____user'] = array('');
144$meta['proxy____pass'] = array('password');
145$meta['proxy____ssl']  = array('onoff');
146
147$meta['safemodehack'] = array('onoff');
148$meta['ftp____host']  = array('','_pattern' => '#^[a-z0-9\-\.+]+?#i');
149$meta['ftp____port']  = array('numeric');
150$meta['ftp____user']  = array('');
151$meta['ftp____pass']  = array('password');
152$meta['ftp____root']  = array('');
153
154