110449332Schris<?php 210449332Schris/** 310449332Schris * Metadata for configuration manager plugin 410449332Schris * 510449332Schris * Note: This file should be included within a function to ensure it 6862763f2Schris * doesn't clash with the settings it is describing. 710449332Schris * 810449332Schris * Format: 910449332Schris * $meta[<setting name>] = array(<handler class id>,<param name> => <param value>); 1010449332Schris * 1110449332Schris * <handler class id> is the handler class name without the "setting_" prefix 1210449332Schris * 1310449332Schris * Defined classes: 14306ca8aaSchris * Generic (source: settings/config.class.php) 15306ca8aaSchris * ------------------------------------------- 16e8a6bae4Schris * '' - default class ('setting'), textarea, minimal input validation, setting output in quotes 17e8a6bae4Schris * 'string' - single line text input, minimal input validation, setting output in quotes 1810449332Schris * 'numeric' - text input, accepts numbers and arithmetic operators, setting output without quotes 1976ae5803SAndreas Gohr * 'numericopt' - like above, but accepts empty values 2010449332Schris * 'onoff' - checkbox input, setting output 0|1 2110449332Schris * 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter 2210449332Schris * 'email' - text input, input must conform to email address format, setting output in quotes 2310449332Schris * 'password' - password input, minimal input validation, setting output plain text in quotes 2410449332Schris * 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir 25*f7589b08SChris Smith * parameter (required). A pattern can be used to restrict the folders to only those which 26*f7589b08SChris Smith * match the pattern. 27306ca8aaSchris * 'multicheckbox'- a checkbox for each choice plus an "other" string input, config file setting is a comma 28306ca8aaSchris * separated list of checked choices 294fa2dffcSBen Coburn * 'fieldset' - used to group configuration settings, but is not itself a setting. To make this clear in 304fa2dffcSBen Coburn * the language files the keys for this type should start with '_'. 3110449332Schris * 32306ca8aaSchris * Single Setting (source: settings/extra.class.php) 33306ca8aaSchris * ------------------------------------------------- 3410449332Schris * 'savedir' - as 'setting', input tested against initpath() (inc/init.php) 3510449332Schris * 'sepchar' - as multichoice, selection constructed from string of valid values 3610449332Schris * 'authtype' - as 'setting', input validated against a valid php file at expected location for auth files 3710449332Schris * 'im_convert' - as 'setting', input must exist and be an im_convert module 38306ca8aaSchris * 'disableactions' - as 'setting' 391b95bfdfSChris Smith * 'compression' - no additional parameters. checks php installation supports possible compression alternatives 4010449332Schris * 4110449332Schris * Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output 4210449332Schris * 4310449332Schris * Defined parameters: 4410449332Schris * '_pattern' - string, a preg pattern. input is tested against this pattern before being accepted 45*f7589b08SChris Smith * optional all classes, except onoff & multichoice which ignore it 4610449332Schris * '_choices' - array of choices. used to populate a selection box. choice will be replaced by a localised 4710449332Schris * language string, indexed by <setting name>_o_<choice>, if one exists 48306ca8aaSchris * required by 'multichoice' & 'multicheckbox' classes, ignored by others 4910449332Schris * '_dir' - location of directory to be used to populate choice list 5010449332Schris * required by 'dirchoice' class, ignored by other classes 51306ca8aaSchris * '_combine' - complimentary output setting values which can be combined into a single display checkbox 52306ca8aaSchris * optional for 'multicheckbox', ignored by other classes 5310449332Schris * 5410449332Schris * @author Chris Smith <chris@jalakai.co.uk> 5510449332Schris */ 5610449332Schris// ---------------[ settings for settings ]------------------------------ 5710449332Schris$config['format'] = 'php'; // format of setting files, supported formats: php 5810449332Schris$config['varname'] = 'conf'; // name of the config variable, sans $ 5910449332Schris 6010449332Schris// this string is written at the top of the rewritten settings file, 6110449332Schris// !! do not include any comment indicators !! 6210449332Schris// this value can be overriden when calling save_settings() method 6310449332Schris$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings'; 6410449332Schris 6510449332Schris// ---------------[ setting files ]-------------------------------------- 6610449332Schris// these values can be string expressions, they will be eval'd before use 6710449332Schris$file['local'] = "DOKU_CONF.'local.php'"; // mandatory (file doesn't have to exist) 6810449332Schris$file['default'] = "DOKU_CONF.'dokuwiki.php'"; // optional 6910449332Schris$file['protected'] = "DOKU_CONF.'local.protected.php'"; // optional 7010449332Schris 7110449332Schris// test value (FIXME, remove before publishing) 7210449332Schris//$meta['test'] = array('multichoice','_choices' => array('')); 7310449332Schris 7410449332Schris// --------------[ setting metadata ]------------------------------------ 7510449332Schris// - for description of format and fields see top of file 7610449332Schris// - order the settings in the order you wish them to appear 7710449332Schris// - any settings not mentioned will come after the last setting listed and 7810449332Schris// will use the default class with no parameters 7910449332Schris 804fa2dffcSBen Coburn$meta['_basic'] = array('fieldset'); 8191f04971SAndreas Gohr$meta['title'] = array('string'); 8291f04971SAndreas Gohr$meta['start'] = array('string'); 8310449332Schris$meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/'); 84*f7589b08SChris Smith$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/','_pattern' => '/^[\w-]+$/'); 854fa2dffcSBen Coburn$meta['savedir'] = array('savedir'); 8691f04971SAndreas Gohr$meta['basedir'] = array('string'); 8791f04971SAndreas Gohr$meta['baseurl'] = array('string'); 882f97bef5Schris$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation 892f97bef5Schris$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation 904fa2dffcSBen Coburn$meta['allowdebug'] = array('onoff'); 9110449332Schris 924fa2dffcSBen Coburn$meta['_display'] = array('fieldset'); 9310449332Schris$meta['recent'] = array('numeric'); 9410449332Schris$meta['breadcrumbs'] = array('numeric'); 9591f04971SAndreas Gohr$meta['youarehere'] = array('onoff'); 964fa2dffcSBen Coburn$meta['fullpath'] = array('onoff'); 979426a41aSAndreas Gohr$meta['typography'] = array('multichoice','_choices' => array(0,1,2)); 9891f04971SAndreas Gohr$meta['dformat'] = array('string'); 9991f04971SAndreas Gohr$meta['signature'] = array('string'); 10010449332Schris$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels 101220c8709Schris$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); 10210449332Schris$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons 10310449332Schris$meta['camelcase'] = array('onoff'); 1044de01997Schris$meta['deaccent'] = array('multichoice','_choices' => array(0,1,2)); 10510449332Schris$meta['useheading'] = array('onoff'); 10610449332Schris$meta['refcheck'] = array('onoff'); 10710449332Schris$meta['refshow'] = array('numeric'); 10810449332Schris 1094fa2dffcSBen Coburn$meta['_authentication'] = array('fieldset'); 11010449332Schris$meta['useacl'] = array('onoff'); 11110449332Schris$meta['autopasswd'] = array('onoff'); 11210449332Schris$meta['authtype'] = array('authtype'); 11310449332Schris$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','sha1','ssha','crypt','mysql','my411')); 11491f04971SAndreas Gohr$meta['defaultgroup']= array('string'); 11591f04971SAndreas Gohr$meta['superuser'] = array('string'); 116f8cc712eSAndreas Gohr$meta['manager'] = array('string'); 11710449332Schris$meta['profileconfirm'] = array('onoff'); 1188a1f5d50SAndreas Gohr$meta['registernotify'] = array('email'); 119306ca8aaSchris$meta['disableactions'] = array('disableactions', 120ada32d75SGuy Brand '_choices' => array('backlink','index','recent','revisions','search','subscription','nssubscription','register','resendpwd','profile','edit','wikicode','check'), 121ada32d75SGuy Brand '_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw'), 'nssubscription' => array('subscribens','unsubscribens'))); 122d1c7b6ecSAndreas Gohr$meta['sneaky_index'] = array('onoff'); 1234c989037SChris Smith$meta['auth_security_timeout'] = array('numeric'); 12410449332Schris 1254fa2dffcSBen Coburn$meta['_anti_spam'] = array('fieldset'); 1264fa2dffcSBen Coburn$meta['usewordblock']= array('onoff'); 1274fa2dffcSBen Coburn$meta['relnofollow'] = array('onoff'); 1284fa2dffcSBen Coburn$meta['indexdelay'] = array('numeric'); 1294fa2dffcSBen Coburn$meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none')); 13026ceae18SAndreas Gohr$meta['iexssprotect']= array('onoff'); 1314fa2dffcSBen Coburn 1324fa2dffcSBen Coburn$meta['_editing'] = array('fieldset'); 13317e7a281SBen Coburn$meta['usedraft'] = array('onoff'); 1344fa2dffcSBen Coburn$meta['htmlok'] = array('onoff'); 1354fa2dffcSBen Coburn$meta['phpok'] = array('onoff'); 1364fa2dffcSBen Coburn$meta['notify'] = array('email'); 1374fa2dffcSBen Coburn$meta['subscribers'] = array('onoff'); 13810449332Schris$meta['locktime'] = array('numeric'); 1394fa2dffcSBen Coburn$meta['cachetime'] = array('numeric'); 14010449332Schris 1414fa2dffcSBen Coburn$meta['_links'] = array('fieldset'); 14291f04971SAndreas Gohr$meta['target____wiki'] = array('string'); 14391f04971SAndreas Gohr$meta['target____interwiki'] = array('string'); 14491f04971SAndreas Gohr$meta['target____extern'] = array('string'); 14591f04971SAndreas Gohr$meta['target____media'] = array('string'); 14691f04971SAndreas Gohr$meta['target____windows'] = array('string'); 14710449332Schris 1482b03e74dSBen Coburn$meta['_media'] = array('fieldset'); 1492b03e74dSBen Coburn$meta['gdlib'] = array('multichoice','_choices' => array(0,1,2)); 1502b03e74dSBen Coburn$meta['im_convert'] = array('im_convert'); 1512b03e74dSBen Coburn$meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100) 1528a1f5d50SAndreas Gohr$meta['fetchsize'] = array('numeric'); 1532b03e74dSBen Coburn 1544fa2dffcSBen Coburn$meta['_advanced'] = array('fieldset'); 155c29dc6e4SAndreas Gohr$meta['updatecheck'] = array('onoff'); 1564fa2dffcSBen Coburn$meta['userewrite'] = array('multichoice','_choices' => array(0,1,2)); 1574fa2dffcSBen Coburn$meta['useslash'] = array('onoff'); 1584fa2dffcSBen Coburn$meta['sepchar'] = array('sepchar'); 1594fa2dffcSBen Coburn$meta['canonical'] = array('onoff'); 1604fa2dffcSBen Coburn$meta['autoplural'] = array('onoff'); 1614fa2dffcSBen Coburn$meta['mailfrom'] = array('email'); 1624fa2dffcSBen Coburn$meta['compress'] = array('onoff'); 163524be65dSBen Coburn$meta['gzip_output'] = array('onoff'); 1644fa2dffcSBen Coburn$meta['hidepages'] = array('string'); 1654fa2dffcSBen Coburn$meta['send404'] = array('onoff'); 1661b95bfdfSChris Smith$meta['compression'] = array('compression'); 1674fa2dffcSBen Coburn$meta['sitemap'] = array('numeric'); 1684ab889eaSAndreas Gohr$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1')); 1694fa2dffcSBen Coburn$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); 1704ab889eaSAndreas Gohr$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html')); 1714fa2dffcSBen Coburn$meta['rss_update'] = array('numeric'); 17271726d78SBen Coburn$meta['recent_days'] = array('numeric'); 173657541cbSAndreas Gohr$meta['rss_show_summary'] = array('onoff'); 174cde6a01bSAndreas Gohr$meta['broken_iua'] = array('onoff'); 175deec6eb9Spierre.pracht$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); 176fdd2e9d6SMichael Klier$meta['xmlrpc'] = array('onoff'); 1770ceb549dSChris Smith$meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); 1784fa2dffcSBen Coburn 1794fa2dffcSBen Coburn$meta['_network'] = array('fieldset'); 18076ae5803SAndreas Gohr$meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); 18176ae5803SAndreas Gohr$meta['proxy____port'] = array('numericopt'); 18291f04971SAndreas Gohr$meta['proxy____user'] = array('string'); 18310449332Schris$meta['proxy____pass'] = array('password'); 18410449332Schris$meta['proxy____ssl'] = array('onoff'); 18510449332Schris$meta['safemodehack'] = array('onoff'); 18676ae5803SAndreas Gohr$meta['ftp____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); 18776ae5803SAndreas Gohr$meta['ftp____port'] = array('numericopt'); 18891f04971SAndreas Gohr$meta['ftp____user'] = array('string'); 18910449332Schris$meta['ftp____pass'] = array('password'); 19091f04971SAndreas Gohr$meta['ftp____root'] = array('string'); 19110449332Schris 192