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