3 * Metadata for configuration manager plugin
5 * Note: This file should be included within a function to ensure it
6 * doesn't clash with the settings it is describing.
9 * $meta[<setting name>] = array(<handler class id>,<param name> => <param value>);
11 * <handler class id> is the handler class name without the "setting_" prefix
14 * Generic (source: settings/config.class.php)
15 * -------------------------------------------
16 * '' - default class ('setting'), textarea, minimal input validation, setting output in quotes
17 * 'string' - single line text input, minimal input validation, setting output in quotes
18 * 'numeric' - text input, accepts numbers and arithmetic operators, setting output without quotes
19 * 'numericopt' - like above, but accepts empty values
20 * 'onoff' - checkbox input, setting output 0|1
21 * 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter
22 * 'email' - text input, input must conform to email address format, setting output in quotes
23 * 'richemail' - text input, input must conform to email address format but accepts variables and
24 * emails with a real name prepended (when email address is given in <>)
25 * 'password' - password input, minimal input validation, setting output text in quotes, maybe encoded
26 * according to the _code parameter
27 * 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir
28 * parameter (required). A pattern can be used to restrict the folders to only those which
30 * 'multicheckbox'- a checkbox for each choice plus an "other" string input, config file setting is a comma
31 * separated list of checked choices
32 * 'fieldset' - used to group configuration settings, but is not itself a setting. To make this clear in
33 * the language files the keys for this type should start with '_'.
35 * Single Setting (source: settings/extra.class.php)
36 * -------------------------------------------------
37 * 'savedir' - as 'setting', input tested against initpath() (inc/init.php)
38 * 'sepchar' - as multichoice, selection constructed from string of valid values
39 * 'authtype' - as 'setting', input validated against a valid php file at expected location for auth files
40 * 'im_convert' - as 'setting', input must exist and be an im_convert module
41 * 'disableactions' - as 'setting'
42 * 'compression' - no additional parameters. checks php installation supports possible compression alternatives
44 * Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output
47 * '_pattern' - string, a preg pattern. input is tested against this pattern before being accepted
48 * optional all classes, except onoff & multichoice which ignore it
49 * '_choices' - array of choices. used to populate a selection box. choice will be replaced by a localised
50 * language string, indexed by <setting name>_o_<choice>, if one exists
51 * required by 'multichoice' & 'multicheckbox' classes, ignored by others
52 * '_dir' - location of directory to be used to populate choice list
53 * required by 'dirchoice' class, ignored by other classes
54 * '_combine' - complimentary output setting values which can be combined into a single display checkbox
55 * optional for 'multicheckbox', ignored by other classes
56 * '_code' - encoding method to use, accepted values: 'base64','uuencode','plain'. defaults to plain.
58 * @author Chris Smith <chris@jalakai.co.uk>
60 // ---------------[ settings for settings ]------------------------------
61 $config['format'] = 'php'; // format of setting files, supported formats: php
62 $config['varname'] = 'conf'; // name of the config variable, sans $
64 // this string is written at the top of the rewritten settings file,
65 // !! do not include any comment indicators !!
66 // this value can be overriden when calling save_settings() method
67 $config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings';
70 // ---------------[ setting files ]--------------------------------------
71 // these values can be string expressions, they will be eval'd before use
72 $file['local'] = "DOKU_CONF.'local.php'"; // mandatory (file doesn't have to exist)
73 $file['default'] = "DOKU_CONF.'dokuwiki.php'"; // optional
74 $file['protected'] = "DOKU_CONF.'local.protected.php'"; // optional
77 // test value (FIXME, remove before publishing)
78 //$meta['test'] = array('multichoice','_choices' => array(''));
80 // --------------[ setting metadata ]------------------------------------
81 // - for description of format and fields see top of file
82 // - order the settings in the order you wish them to appear
83 // - any settings not mentioned will come after the last setting listed and
84 // will use the default class with no parameters
86 $meta['_basic'] = array('fieldset');
87 $meta['title'] = array('string');
88 $meta['start'] = array('string','_pattern' => '!^[^:;/]+$!'); // don't accept namespaces
89 $meta['lang'] = array('dirchoice','_dir' => DOKU_INC
.'inc/lang/');
90 $meta['template'] = array('dirchoice','_dir' => DOKU_INC
.'lib/tpl/','_pattern' => '/^[\w-]+$/');
91 $meta['license'] = array('license');
92 $meta['savedir'] = array('savedir');
93 $meta['basedir'] = array('string');
94 $meta['baseurl'] = array('string');
95 $meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
96 $meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
97 $meta['allowdebug'] = array('onoff');
99 $meta['_display'] = array('fieldset');
100 $meta['recent'] = array('numeric');
101 $meta['breadcrumbs'] = array('numeric');
102 $meta['youarehere'] = array('onoff');
103 $meta['fullpath'] = array('onoff');
104 $meta['typography'] = array('multichoice','_choices' => array(0,1,2));
105 $meta['dformat'] = array('string');
106 $meta['signature'] = array('string');
107 $meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','email','email_link'));
108 $meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels
109 $meta['tocminheads'] = array('multichoice','_choices' => array(0,1,2,3,4,5,10,15,20));
110 $meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5));
111 $meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons
112 $meta['camelcase'] = array('onoff');
113 $meta['deaccent'] = array('multichoice','_choices' => array(0,1,2));
114 $meta['useheading'] = array('multichoice','_choices' => array(0,'navigation','content',1));
115 $meta['refcheck'] = array('onoff');
116 $meta['refshow'] = array('numeric');
118 $meta['_authentication'] = array('fieldset');
119 $meta['useacl'] = array('onoff');
120 $meta['autopasswd'] = array('onoff');
121 $meta['authtype'] = array('authtype');
122 $meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','crypt','mysql','my411','kmd5'));
123 $meta['defaultgroup']= array('string');
124 $meta['superuser'] = array('string');
125 $meta['manager'] = array('string');
126 $meta['profileconfirm'] = array('onoff');
127 $meta['rememberme'] = array('onoff');
128 $meta['registernotify'] = array('email');
129 $meta['disableactions'] = array('disableactions',
130 '_choices' => array('backlink','index','recent','revisions','search','subscription','nssubscription','register','resendpwd','profile','edit','wikicode','check'),
131 '_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw'), 'nssubscription' => array('subscribens','unsubscribens')));
132 $meta['sneaky_index'] = array('onoff');
133 $meta['auth_security_timeout'] = array('numeric');
134 $meta['securecookie'] = array('onoff');
135 $meta['xmlrpc'] = array('onoff');
136 $meta['xmlrpcuser'] = array('string');
138 $meta['_anti_spam'] = array('fieldset');
139 $meta['usewordblock']= array('onoff');
140 $meta['relnofollow'] = array('onoff');
141 $meta['indexdelay'] = array('numeric');
142 $meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none'));
143 $meta['iexssprotect']= array('onoff');
145 $meta['_editing'] = array('fieldset');
146 $meta['usedraft'] = array('onoff');
147 $meta['htmlok'] = array('onoff');
148 $meta['phpok'] = array('onoff');
149 $meta['notify'] = array('email', '_multiple' => true);
150 $meta['subscribers'] = array('onoff');
151 $meta['locktime'] = array('numeric');
152 $meta['cachetime'] = array('numeric');
154 $meta['_links'] = array('fieldset');
155 $meta['target____wiki'] = array('string');
156 $meta['target____interwiki'] = array('string');
157 $meta['target____extern'] = array('string');
158 $meta['target____media'] = array('string');
159 $meta['target____windows'] = array('string');
161 $meta['_media'] = array('fieldset');
162 $meta['gdlib'] = array('multichoice','_choices' => array(0,1,2));
163 $meta['im_convert'] = array('im_convert');
164 $meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100)
165 $meta['fetchsize'] = array('numeric');
167 $meta['_advanced'] = array('fieldset');
168 $meta['updatecheck'] = array('onoff');
169 $meta['userewrite'] = array('multichoice','_choices' => array(0,1,2));
170 $meta['useslash'] = array('onoff');
171 $meta['sepchar'] = array('sepchar');
172 $meta['canonical'] = array('onoff');
173 $meta['autoplural'] = array('onoff');
174 $meta['mailfrom'] = array('richemail');
175 $meta['compress'] = array('onoff');
176 $meta['gzip_output'] = array('onoff');
177 $meta['hidepages'] = array('string');
178 $meta['send404'] = array('onoff');
179 $meta['compression'] = array('compression');
180 $meta['sitemap'] = array('numeric');
181 $meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1'));
182 $meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current'));
183 $meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html'));
184 $meta['rss_update'] = array('numeric');
185 $meta['recent_days'] = array('numeric');
186 $meta['rss_show_summary'] = array('onoff');
187 $meta['broken_iua'] = array('onoff');
188 $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3));
189 $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml'));
191 $meta['_network'] = array('fieldset');
192 $meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i');
193 $meta['proxy____port'] = array('numericopt');
194 $meta['proxy____user'] = array('string');
195 $meta['proxy____pass'] = array('password','_code' => 'base64');
196 $meta['proxy____ssl'] = array('onoff');
197 $meta['safemodehack'] = array('onoff');
198 $meta['ftp____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i');
199 $meta['ftp____port'] = array('numericopt');
200 $meta['ftp____user'] = array('string');
201 $meta['ftp____pass'] = array('password','_code' => 'base64');
202 $meta['ftp____root'] = array('string');