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