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