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