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 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 29 * match the pattern. 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 '_'. 34 * 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 43 * 44 * Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output 45 * 46 * Defined parameters: 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. 57 * 58 * @author Chris Smith <chris@jalakai.co.uk> 59 */ 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 $ 63 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'; 68 69/* DEPRECATED 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 75 */ 76 77// test value (FIXME, remove before publishing) 78//$meta['test'] = array('multichoice','_choices' => array('')); 79 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 85 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'); 98 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'); 117 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')); 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 136$meta['_anti_spam'] = array('fieldset'); 137$meta['usewordblock']= array('onoff'); 138$meta['relnofollow'] = array('onoff'); 139$meta['indexdelay'] = array('numeric'); 140$meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none')); 141$meta['iexssprotect']= array('onoff'); 142 143$meta['_editing'] = array('fieldset'); 144$meta['usedraft'] = array('onoff'); 145$meta['htmlok'] = array('onoff'); 146$meta['phpok'] = array('onoff'); 147$meta['notify'] = array('email'); 148$meta['subscribers'] = array('onoff'); 149$meta['locktime'] = array('numeric'); 150$meta['cachetime'] = array('numeric'); 151 152$meta['_links'] = array('fieldset'); 153$meta['target____wiki'] = array('string'); 154$meta['target____interwiki'] = array('string'); 155$meta['target____extern'] = array('string'); 156$meta['target____media'] = array('string'); 157$meta['target____windows'] = array('string'); 158 159$meta['_media'] = array('fieldset'); 160$meta['gdlib'] = array('multichoice','_choices' => array(0,1,2)); 161$meta['im_convert'] = array('im_convert'); 162$meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100) 163$meta['fetchsize'] = array('numeric'); 164 165$meta['_advanced'] = array('fieldset'); 166$meta['updatecheck'] = array('onoff'); 167$meta['userewrite'] = array('multichoice','_choices' => array(0,1,2)); 168$meta['useslash'] = array('onoff'); 169$meta['sepchar'] = array('sepchar'); 170$meta['canonical'] = array('onoff'); 171$meta['autoplural'] = array('onoff'); 172$meta['mailfrom'] = array('richemail'); 173$meta['compress'] = array('onoff'); 174$meta['gzip_output'] = array('onoff'); 175$meta['hidepages'] = array('string'); 176$meta['send404'] = array('onoff'); 177$meta['compression'] = array('compression'); 178$meta['sitemap'] = array('numeric'); 179$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1')); 180$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); 181$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html')); 182$meta['rss_update'] = array('numeric'); 183$meta['recent_days'] = array('numeric'); 184$meta['rss_show_summary'] = array('onoff'); 185$meta['broken_iua'] = array('onoff'); 186$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); 187$meta['xmlrpc'] = array('onoff'); 188$meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); 189 190$meta['_network'] = array('fieldset'); 191$meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); 192$meta['proxy____port'] = array('numericopt'); 193$meta['proxy____user'] = array('string'); 194$meta['proxy____pass'] = array('password','_code' => 'base64'); 195$meta['proxy____ssl'] = array('onoff'); 196$meta['safemodehack'] = array('onoff'); 197$meta['ftp____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); 198$meta['ftp____port'] = array('numericopt'); 199$meta['ftp____user'] = array('string'); 200$meta['ftp____pass'] = array('password','_code' => 'base64'); 201$meta['ftp____root'] = array('string'); 202 203