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