xref: /dokuwiki/lib/plugins/config/settings/config.metadata.php (revision 91f04971fc0984a7528ac3e001051b8b10cb8b1b)
110449332Schris<?php
210449332Schris/**
310449332Schris * Metadata for configuration manager plugin
410449332Schris *
510449332Schris * Note:  This file should be included within a function to ensure it
610449332Schris *        doesn't class with the settings it is describing.
710449332Schris *
810449332Schris * Format:
910449332Schris *   $meta[<setting name>] = array(<handler class id>,<param name> => <param value>);
1010449332Schris *
1110449332Schris *   <handler class id>  is the handler class name without the "setting_" prefix
1210449332Schris *
1310449332Schris * Defined classes:
1410449332Schris *   Generic
1510449332Schris *   -------------
1610449332Schris *   ''             - default class ('setting'), text input, minimal input validation, setting output in quotes
1710449332Schris *   'numeric'      - text input, accepts numbers and arithmetic operators, setting output without quotes
1810449332Schris *   'onoff'        - checkbox input, setting output  0|1
1910449332Schris *   'multichoice'  - select input (single choice), setting output with quotes, required _choices parameter
2010449332Schris *   'email'        - text input, input must conform to email address format, setting output in quotes
2110449332Schris *   'password'     - password input, minimal input validation, setting output plain text in quotes
2210449332Schris *   'dirchoice'    - as multichoice, selection choices based on folders found at location specified in _dir
2310449332Schris *                    parameter (required)
2410449332Schris *
2510449332Schris *  Single Setting
2610449332Schris *  --------------
2710449332Schris *   'savedir'     - as 'setting', input tested against initpath() (inc/init.php)
2810449332Schris *   'sepchar'     - as multichoice, selection constructed from string of valid values
2910449332Schris *   'authtype'    - as 'setting', input validated against a valid php file at expected location for auth files
3010449332Schris *   'im_convert'  - as 'setting', input must exist and be an im_convert module
3110449332Schris *
3210449332Schris *  Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output
3310449332Schris *
3410449332Schris * Defined parameters:
3510449332Schris *   '_pattern'    - string, a preg pattern. input is tested against this pattern before being accepted
3610449332Schris *                   optional all classes, except onoff, multichoice & dirchoice which ignore it
3710449332Schris *   '_choices'    - array of choices. used to populate a selection box. choice will be replaced by a localised
3810449332Schris *                   language string, indexed by  <setting name>_o_<choice>, if one exists
3910449332Schris *                   required by 'multichoice' class, ignored by other classes
4010449332Schris *   '_dir'        - location of directory to be used to populate choice list
4110449332Schris *                   required by 'dirchoice' class, ignored by other classes
4210449332Schris *
4310449332Schris * @author    Chris Smith <chris@jalakai.co.uk>
4410449332Schris */
4510449332Schris// ---------------[ settings for settings ]------------------------------
4610449332Schris$config['format']  = 'php';      // format of setting files, supported formats: php
4710449332Schris$config['varname'] = 'conf';     // name of the config variable, sans $
4810449332Schris
4910449332Schris// this string is written at the top of the rewritten settings file,
5010449332Schris// !! do not include any comment indicators !!
5110449332Schris// this value can be overriden when calling save_settings() method
5210449332Schris$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings';
5310449332Schris
5410449332Schris// ---------------[ setting files ]--------------------------------------
5510449332Schris// these values can be string expressions, they will be eval'd before use
5610449332Schris$file['local']     = "DOKU_CONF.'local.php'";            // mandatory (file doesn't have to exist)
5710449332Schris$file['default']   = "DOKU_CONF.'dokuwiki.php'";         // optional
5810449332Schris$file['protected'] = "DOKU_CONF.'local.protected.php'";  // optional
5910449332Schris
6010449332Schris// test value (FIXME, remove before publishing)
6110449332Schris//$meta['test']     = array('multichoice','_choices' => array(''));
6210449332Schris
6310449332Schris// --------------[ setting metadata ]------------------------------------
6410449332Schris// - for description of format and fields see top of file
6510449332Schris// - order the settings in the order you wish them to appear
6610449332Schris// - any settings not mentioned will come after the last setting listed and
6710449332Schris//   will use the default class with no parameters
6810449332Schris
69*91f04971SAndreas Gohr$meta['title']    = array('string');
70*91f04971SAndreas Gohr$meta['start']    = array('string');
7110449332Schris$meta['savedir']  = array('savedir');
7210449332Schris$meta['lang']     = array('dirchoice','_dir' => DOKU_INC.'inc/lang/');
7310449332Schris$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/');
7410449332Schris
75ac9115b0STroels Liebe Bentsen$meta['dmode']    = array('numeric','_pattern' => '/0[0-7]{3}/');  // only accept octal representation
76ac9115b0STroels Liebe Bentsen$meta['fmode']    = array('numeric','_pattern' => '/0[0-7]{3}/');  // only accept octal representation
77*91f04971SAndreas Gohr$meta['basedir']  = array('string');
78*91f04971SAndreas Gohr$meta['baseurl']  = array('string');
7910449332Schris
8010449332Schris$meta['fullpath']    = array('onoff');
8110449332Schris$meta['recent']      = array('numeric');
8210449332Schris$meta['breadcrumbs'] = array('numeric');
83*91f04971SAndreas Gohr$meta['youarehere']  = array('onoff');
8410449332Schris$meta['typography']  = array('onoff');
8510449332Schris$meta['htmlok']      = array('onoff');
8610449332Schris$meta['phpok']       = array('onoff');
87*91f04971SAndreas Gohr$meta['dformat']     = array('string');
88*91f04971SAndreas Gohr$meta['signature']   = array('string');
8910449332Schris$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5));   // 5 toc levels
90220c8709Schris$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5));
9110449332Schris$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons
9210449332Schris$meta['camelcase']   = array('onoff');
934de01997Schris$meta['deaccent']    = array('multichoice','_choices' => array(0,1,2));
9410449332Schris$meta['useheading']  = array('onoff');
9510449332Schris$meta['refcheck']    = array('onoff');
9610449332Schris$meta['refshow']     = array('numeric');
9720e7ccb0Schris$meta['allowdebug']  = array('onoff');
9810449332Schris
9910449332Schris$meta['usewordblock']= array('onoff');
10010449332Schris$meta['indexdelay']  = array('numeric');
10110449332Schris$meta['relnofollow'] = array('onoff');
10210449332Schris$meta['mailguard']   = array('multichoice','_choices' => array('visible','hex','none'));
10310449332Schris
10410449332Schris$meta['useacl']      = array('onoff');
10510449332Schris$meta['openregister']= array('onoff');
10610449332Schris$meta['autopasswd']  = array('onoff');
107b174aeaeSchris$meta['resendpasswd'] = array('onoff');
10810449332Schris$meta['authtype']    = array('authtype');
10910449332Schris$meta['passcrypt']   = array('multichoice','_choices' => array('smd5','md5','sha1','ssha','crypt','mysql','my411'));
110*91f04971SAndreas Gohr$meta['defaultgroup']= array('string');
111*91f04971SAndreas Gohr$meta['superuser']   = array('string');
11210449332Schris$meta['profileconfirm'] = array('onoff');
11310449332Schris
11410449332Schris$meta['userewrite']  = array('multichoice','_choices' => array(0,1,2));
11510449332Schris$meta['useslash']    = array('onoff');
11610449332Schris$meta['sepchar']     = array('sepchar');
11710449332Schris$meta['canonical']   = array('onoff');
11810449332Schris$meta['autoplural']  = array('onoff');
11910449332Schris$meta['usegzip']     = array('onoff');
12010449332Schris$meta['cachetime']   = array('numeric');
12110449332Schris$meta['purgeonadd']  = array('onoff');
12210449332Schris$meta['locktime']    = array('numeric');
12310449332Schris$meta['notify']      = array('email');
12410449332Schris$meta['mailfrom']    = array('email');
12510449332Schris$meta['gdlib']       = array('multichoice','_choices' => array(0,1,2));
12610449332Schris$meta['im_convert']  = array('im_convert');
12710449332Schris$meta['spellchecker']= array('onoff');
12810449332Schris$meta['subscribers'] = array('onoff');
12910449332Schris$meta['compress']    = array('onoff');
130*91f04971SAndreas Gohr$meta['hidepages']   = array('string');
13110449332Schris$meta['send404']     = array('onoff');
13210449332Schris$meta['sitemap']     = array('numeric');
13310449332Schris
13410449332Schris$meta['rss_type']    = array('multichoice','_choices' => array('rss','rss1','rss2','atom'));
13510449332Schris$meta['rss_linkto']  = array('multichoice','_choices' => array('diff','page','rev','current'));
13610449332Schris
137*91f04971SAndreas Gohr$meta['target____wiki']      = array('string');
138*91f04971SAndreas Gohr$meta['target____interwiki'] = array('string');
139*91f04971SAndreas Gohr$meta['target____extern']    = array('string');
140*91f04971SAndreas Gohr$meta['target____media']     = array('string');
141*91f04971SAndreas Gohr$meta['target____windows']   = array('string');
14210449332Schris
143*91f04971SAndreas Gohr$meta['proxy____host'] = array('string','_pattern' => '#^[a-z0-9\-\.+]+?#i');
14410449332Schris$meta['proxy____port'] = array('numeric');
145*91f04971SAndreas Gohr$meta['proxy____user'] = array('string');
14610449332Schris$meta['proxy____pass'] = array('password');
14710449332Schris$meta['proxy____ssl']  = array('onoff');
14810449332Schris
14910449332Schris$meta['safemodehack'] = array('onoff');
150*91f04971SAndreas Gohr$meta['ftp____host']  = array('string','_pattern' => '#^[a-z0-9\-\.+]+?#i');
15110449332Schris$meta['ftp____port']  = array('numeric');
152*91f04971SAndreas Gohr$meta['ftp____user']  = array('string');
15310449332Schris$meta['ftp____pass']  = array('password');
154*91f04971SAndreas Gohr$meta['ftp____root']  = array('string');
15510449332Schris
156