110449332Schris<?php 210449332Schris/** 310449332Schris * Metadata for configuration manager plugin 410449332Schris * 510449332Schris * Note: This file should be included within a function to ensure it 6862763f2Schris * doesn't clash 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 * ------------- 16e8a6bae4Schris * '' - default class ('setting'), textarea, minimal input validation, setting output in quotes 17e8a6bae4Schris * 'string' - single line text input, minimal input validation, setting output in quotes 1810449332Schris * 'numeric' - text input, accepts numbers and arithmetic operators, setting output without quotes 1910449332Schris * 'onoff' - checkbox input, setting output 0|1 2010449332Schris * 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter 2110449332Schris * 'email' - text input, input must conform to email address format, setting output in quotes 2210449332Schris * 'password' - password input, minimal input validation, setting output plain text in quotes 2310449332Schris * 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir 2410449332Schris * parameter (required) 254fa2dffcSBen Coburn * 'fieldset' - used to group configuration settings, but is not itself a setting. To make this clear in 264fa2dffcSBen Coburn * the language files the keys for this type should start with '_'. 2710449332Schris * 2810449332Schris * Single Setting 2910449332Schris * -------------- 3010449332Schris * 'savedir' - as 'setting', input tested against initpath() (inc/init.php) 3110449332Schris * 'sepchar' - as multichoice, selection constructed from string of valid values 3210449332Schris * 'authtype' - as 'setting', input validated against a valid php file at expected location for auth files 3310449332Schris * 'im_convert' - as 'setting', input must exist and be an im_convert module 3410449332Schris * 3510449332Schris * Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output 3610449332Schris * 3710449332Schris * Defined parameters: 3810449332Schris * '_pattern' - string, a preg pattern. input is tested against this pattern before being accepted 3910449332Schris * optional all classes, except onoff, multichoice & dirchoice which ignore it 4010449332Schris * '_choices' - array of choices. used to populate a selection box. choice will be replaced by a localised 4110449332Schris * language string, indexed by <setting name>_o_<choice>, if one exists 4210449332Schris * required by 'multichoice' class, ignored by other classes 4310449332Schris * '_dir' - location of directory to be used to populate choice list 4410449332Schris * required by 'dirchoice' class, ignored by other classes 4510449332Schris * 4610449332Schris * @author Chris Smith <chris@jalakai.co.uk> 4710449332Schris */ 4810449332Schris// ---------------[ settings for settings ]------------------------------ 4910449332Schris$config['format'] = 'php'; // format of setting files, supported formats: php 5010449332Schris$config['varname'] = 'conf'; // name of the config variable, sans $ 5110449332Schris 5210449332Schris// this string is written at the top of the rewritten settings file, 5310449332Schris// !! do not include any comment indicators !! 5410449332Schris// this value can be overriden when calling save_settings() method 5510449332Schris$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings'; 5610449332Schris 5710449332Schris// ---------------[ setting files ]-------------------------------------- 5810449332Schris// these values can be string expressions, they will be eval'd before use 5910449332Schris$file['local'] = "DOKU_CONF.'local.php'"; // mandatory (file doesn't have to exist) 6010449332Schris$file['default'] = "DOKU_CONF.'dokuwiki.php'"; // optional 6110449332Schris$file['protected'] = "DOKU_CONF.'local.protected.php'"; // optional 6210449332Schris 6310449332Schris// test value (FIXME, remove before publishing) 6410449332Schris//$meta['test'] = array('multichoice','_choices' => array('')); 6510449332Schris 6610449332Schris// --------------[ setting metadata ]------------------------------------ 6710449332Schris// - for description of format and fields see top of file 6810449332Schris// - order the settings in the order you wish them to appear 6910449332Schris// - any settings not mentioned will come after the last setting listed and 7010449332Schris// will use the default class with no parameters 7110449332Schris 724fa2dffcSBen Coburn$meta['_basic'] = array('fieldset'); 7391f04971SAndreas Gohr$meta['title'] = array('string'); 7491f04971SAndreas Gohr$meta['start'] = array('string'); 7510449332Schris$meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/'); 7610449332Schris$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/'); 774fa2dffcSBen Coburn$meta['savedir'] = array('savedir'); 7891f04971SAndreas Gohr$meta['basedir'] = array('string'); 7991f04971SAndreas Gohr$meta['baseurl'] = array('string'); 804fa2dffcSBen Coburn$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3}/'); // only accept octal representation 814fa2dffcSBen Coburn$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3}/'); // only accept octal representation 824fa2dffcSBen Coburn$meta['allowdebug'] = array('onoff'); 8310449332Schris 844fa2dffcSBen Coburn$meta['_display'] = array('fieldset'); 8510449332Schris$meta['recent'] = array('numeric'); 8610449332Schris$meta['breadcrumbs'] = array('numeric'); 8791f04971SAndreas Gohr$meta['youarehere'] = array('onoff'); 884fa2dffcSBen Coburn$meta['fullpath'] = array('onoff'); 8910449332Schris$meta['typography'] = array('onoff'); 9091f04971SAndreas Gohr$meta['dformat'] = array('string'); 9191f04971SAndreas Gohr$meta['signature'] = array('string'); 9210449332Schris$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels 93220c8709Schris$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); 9410449332Schris$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons 9510449332Schris$meta['camelcase'] = array('onoff'); 964de01997Schris$meta['deaccent'] = array('multichoice','_choices' => array(0,1,2)); 9710449332Schris$meta['useheading'] = array('onoff'); 9810449332Schris$meta['refcheck'] = array('onoff'); 9910449332Schris$meta['refshow'] = array('numeric'); 10010449332Schris 1014fa2dffcSBen Coburn$meta['_authentication'] = array('fieldset'); 10210449332Schris$meta['useacl'] = array('onoff'); 10310449332Schris$meta['openregister']= array('onoff'); 10410449332Schris$meta['autopasswd'] = array('onoff'); 105b174aeaeSchris$meta['resendpasswd'] = array('onoff'); 10610449332Schris$meta['authtype'] = array('authtype'); 10710449332Schris$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','sha1','ssha','crypt','mysql','my411')); 10891f04971SAndreas Gohr$meta['defaultgroup']= array('string'); 10991f04971SAndreas Gohr$meta['superuser'] = array('string'); 11010449332Schris$meta['profileconfirm'] = array('onoff'); 111*8a1f5d50SAndreas Gohr$meta['registernotify'] = array('email'); 11210449332Schris 1134fa2dffcSBen Coburn$meta['_anti_spam'] = array('fieldset'); 1144fa2dffcSBen Coburn$meta['usewordblock']= array('onoff'); 1154fa2dffcSBen Coburn$meta['relnofollow'] = array('onoff'); 1164fa2dffcSBen Coburn$meta['indexdelay'] = array('numeric'); 1174fa2dffcSBen Coburn$meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none')); 1184fa2dffcSBen Coburn 1194fa2dffcSBen Coburn$meta['_editing'] = array('fieldset'); 12017e7a281SBen Coburn$meta['usedraft'] = array('onoff'); 1214fa2dffcSBen Coburn$meta['spellchecker']= array('onoff'); 1224fa2dffcSBen Coburn$meta['htmlok'] = array('onoff'); 1234fa2dffcSBen Coburn$meta['phpok'] = array('onoff'); 1244fa2dffcSBen Coburn$meta['notify'] = array('email'); 1254fa2dffcSBen Coburn$meta['subscribers'] = array('onoff'); 12610449332Schris$meta['purgeonadd'] = array('onoff'); 12710449332Schris$meta['locktime'] = array('numeric'); 1284fa2dffcSBen Coburn$meta['cachetime'] = array('numeric'); 12910449332Schris 1304fa2dffcSBen Coburn$meta['_links'] = array('fieldset'); 13191f04971SAndreas Gohr$meta['target____wiki'] = array('string'); 13291f04971SAndreas Gohr$meta['target____interwiki'] = array('string'); 13391f04971SAndreas Gohr$meta['target____extern'] = array('string'); 13491f04971SAndreas Gohr$meta['target____media'] = array('string'); 13591f04971SAndreas Gohr$meta['target____windows'] = array('string'); 13610449332Schris 1372b03e74dSBen Coburn$meta['_media'] = array('fieldset'); 1382b03e74dSBen Coburn$meta['gdlib'] = array('multichoice','_choices' => array(0,1,2)); 1392b03e74dSBen Coburn$meta['im_convert'] = array('im_convert'); 1402b03e74dSBen Coburn$meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100) 141*8a1f5d50SAndreas Gohr$meta['fetchsize'] = array('numeric'); 1422b03e74dSBen Coburn 1434fa2dffcSBen Coburn$meta['_advanced'] = array('fieldset'); 1444fa2dffcSBen Coburn$meta['userewrite'] = array('multichoice','_choices' => array(0,1,2)); 1454fa2dffcSBen Coburn$meta['useslash'] = array('onoff'); 1464fa2dffcSBen Coburn$meta['sepchar'] = array('sepchar'); 1474fa2dffcSBen Coburn$meta['canonical'] = array('onoff'); 1484fa2dffcSBen Coburn$meta['autoplural'] = array('onoff'); 1494fa2dffcSBen Coburn$meta['mailfrom'] = array('email'); 1504fa2dffcSBen Coburn$meta['compress'] = array('onoff'); 151524be65dSBen Coburn$meta['gzip_output'] = array('onoff'); 1524fa2dffcSBen Coburn$meta['hidepages'] = array('string'); 1534fa2dffcSBen Coburn$meta['send404'] = array('onoff'); 154524be65dSBen Coburn$meta['usegzip'] = array('onoff'); 1554fa2dffcSBen Coburn$meta['sitemap'] = array('numeric'); 1564fa2dffcSBen Coburn$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom')); 1574fa2dffcSBen Coburn$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); 1584fa2dffcSBen Coburn$meta['rss_update'] = array('numeric'); 1594fa2dffcSBen Coburn 1604fa2dffcSBen Coburn$meta['_network'] = array('fieldset'); 16191f04971SAndreas Gohr$meta['proxy____host'] = array('string','_pattern' => '#^[a-z0-9\-\.+]+?#i'); 16210449332Schris$meta['proxy____port'] = array('numeric'); 16391f04971SAndreas Gohr$meta['proxy____user'] = array('string'); 16410449332Schris$meta['proxy____pass'] = array('password'); 16510449332Schris$meta['proxy____ssl'] = array('onoff'); 16610449332Schris$meta['safemodehack'] = array('onoff'); 16791f04971SAndreas Gohr$meta['ftp____host'] = array('string','_pattern' => '#^[a-z0-9\-\.+]+?#i'); 16810449332Schris$meta['ftp____port'] = array('numeric'); 16991f04971SAndreas Gohr$meta['ftp____user'] = array('string'); 17010449332Schris$meta['ftp____pass'] = array('password'); 17191f04971SAndreas Gohr$meta['ftp____root'] = array('string'); 17210449332Schris 173