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 1938dc5fa6SMichael Hamann * if given the '_min' and '_max' parameters are used for validation 2076ae5803SAndreas Gohr * 'numericopt' - like above, but accepts empty values 2110449332Schris * 'onoff' - checkbox input, setting output 0|1 2210449332Schris * 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter 23a9b6a8b5SAndreas Gohr * 'email' - text input, input must conform to email address format 243994772aSChris Smith * 'password' - password input, minimal input validation, setting output text in quotes, maybe encoded 253994772aSChris Smith * according to the _code parameter 2610449332Schris * 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir 27f7589b08SChris Smith * parameter (required). A pattern can be used to restrict the folders to only those which 28f7589b08SChris Smith * match the pattern. 29306ca8aaSchris * 'multicheckbox'- a checkbox for each choice plus an "other" string input, config file setting is a comma 30306ca8aaSchris * separated list of checked choices 314fa2dffcSBen Coburn * 'fieldset' - used to group configuration settings, but is not itself a setting. To make this clear in 324fa2dffcSBen Coburn * the language files the keys for this type should start with '_'. 3360dd32d9SAndreas Gohr * 'array' - a simple (one dimensional) array of string values, shown as comma separated list in the 3460dd32d9SAndreas Gohr * config manager but saved as PHP array(). Values may not contain commas themselves. 3560dd32d9SAndreas Gohr * _pattern matching on the array values supported. 36*d110fb0dSChristopher Smith * 'regex' - regular expression string, normally without delimiters; as for string, in addition tested 37*d110fb0dSChristopher Smith * to see if will compile & run as a regex. in addition to _pattern, also accepts _delimiter 38*d110fb0dSChristopher Smith * (default '/') and _pregflags (default 'ui') 3910449332Schris * 40306ca8aaSchris * Single Setting (source: settings/extra.class.php) 41306ca8aaSchris * ------------------------------------------------- 4210449332Schris * 'savedir' - as 'setting', input tested against initpath() (inc/init.php) 4310449332Schris * 'sepchar' - as multichoice, selection constructed from string of valid values 4410449332Schris * 'authtype' - as 'setting', input validated against a valid php file at expected location for auth files 4510449332Schris * 'im_convert' - as 'setting', input must exist and be an im_convert module 46306ca8aaSchris * 'disableactions' - as 'setting' 471b95bfdfSChris Smith * 'compression' - no additional parameters. checks php installation supports possible compression alternatives 4851de8ca1SChristopher Smith * 'licence' - as multichoice, selection constructed from licence strings in language files 4951de8ca1SChristopher Smith * 'renderer' - as multichoice, selection constructed from enabled renderer plugins which canRender() 5010449332Schris * 5110449332Schris * Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output 5210449332Schris * 5310449332Schris * Defined parameters: 5410449332Schris * '_pattern' - string, a preg pattern. input is tested against this pattern before being accepted 55f7589b08SChris Smith * optional all classes, except onoff & multichoice which ignore it 5610449332Schris * '_choices' - array of choices. used to populate a selection box. choice will be replaced by a localised 5710449332Schris * language string, indexed by <setting name>_o_<choice>, if one exists 58306ca8aaSchris * required by 'multichoice' & 'multicheckbox' classes, ignored by others 5910449332Schris * '_dir' - location of directory to be used to populate choice list 6010449332Schris * required by 'dirchoice' class, ignored by other classes 61306ca8aaSchris * '_combine' - complimentary output setting values which can be combined into a single display checkbox 62306ca8aaSchris * optional for 'multicheckbox', ignored by other classes 633994772aSChris Smith * '_code' - encoding method to use, accepted values: 'base64','uuencode','plain'. defaults to plain. 6438dc5fa6SMichael Hamann * '_min' - minimum numeric value, optional for 'numeric' and 'numericopt', ignored by others 6538dc5fa6SMichael Hamann * '_max' - maximum numeric value, optional for 'numeric' and 'numericopt', ignored by others 66*d110fb0dSChristopher Smith * '_delimiter' - string, default '/', a single character used as a delimiter for testing regex input values 67*d110fb0dSChristopher Smith * '_pregflags' - string, default 'ui', valid preg pattern modifiers used when testing regex input values, for more 68*d110fb0dSChristopher Smith * information see http://uk1.php.net/manual/en/reference.pcre.pattern.modifiers.php 6910449332Schris * 7010449332Schris * @author Chris Smith <chris@jalakai.co.uk> 7110449332Schris */ 7210449332Schris// ---------------[ settings for settings ]------------------------------ 7310449332Schris$config['format'] = 'php'; // format of setting files, supported formats: php 7410449332Schris$config['varname'] = 'conf'; // name of the config variable, sans $ 7510449332Schris 7610449332Schris// this string is written at the top of the rewritten settings file, 7710449332Schris// !! do not include any comment indicators !! 7810449332Schris// this value can be overriden when calling save_settings() method 7910449332Schris$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings'; 8010449332Schris 8110449332Schris// test value (FIXME, remove before publishing) 8210449332Schris//$meta['test'] = array('multichoice','_choices' => array('')); 8310449332Schris 8410449332Schris// --------------[ setting metadata ]------------------------------------ 8510449332Schris// - for description of format and fields see top of file 8610449332Schris// - order the settings in the order you wish them to appear 8710449332Schris// - any settings not mentioned will come after the last setting listed and 8810449332Schris// will use the default class with no parameters 8910449332Schris 904fa2dffcSBen Coburn$meta['_basic'] = array('fieldset'); 9191f04971SAndreas Gohr$meta['title'] = array('string'); 9285313d6fSGina Haeussge$meta['start'] = array('string','_pattern' => '!^[^:;/]+$!'); // don't accept namespaces 9310449332Schris$meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/'); 94f7589b08SChris Smith$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/','_pattern' => '/^[\w-]+$/'); 9591e90457SAnika Henke$meta['tagline'] = array('string'); 9691e90457SAnika Henke$meta['sidebar'] = array('string'); 97066fee30SAndreas Gohr$meta['license'] = array('license'); 984fa2dffcSBen Coburn$meta['savedir'] = array('savedir'); 9991f04971SAndreas Gohr$meta['basedir'] = array('string'); 10091f04971SAndreas Gohr$meta['baseurl'] = array('string'); 1012f1d4a94SGabriel Birke$meta['cookiedir'] = array('string'); 1022f97bef5Schris$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation 1032f97bef5Schris$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation 1044fa2dffcSBen Coburn$meta['allowdebug'] = array('onoff'); 10510449332Schris 1064fa2dffcSBen Coburn$meta['_display'] = array('fieldset'); 10710449332Schris$meta['recent'] = array('numeric'); 1087cd0713eSAndreas Gohr$meta['recent_days'] = array('numeric'); 109359fab8bSMichael Hamann$meta['breadcrumbs'] = array('numeric','_min' => 0); 11091f04971SAndreas Gohr$meta['youarehere'] = array('onoff'); 1114fa2dffcSBen Coburn$meta['fullpath'] = array('onoff'); 1129426a41aSAndreas Gohr$meta['typography'] = array('multichoice','_choices' => array(0,1,2)); 11391f04971SAndreas Gohr$meta['dformat'] = array('string'); 11491f04971SAndreas Gohr$meta['signature'] = array('string'); 115dc58b6f4SAndy Webber$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','email','email_link')); 11610449332Schris$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels 117c69534d4SAnika Henke$meta['tocminheads'] = array('multichoice','_choices' => array(0,1,2,3,4,5,10,15,20)); 118220c8709Schris$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); 11910449332Schris$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons 12010449332Schris$meta['camelcase'] = array('onoff'); 1214de01997Schris$meta['deaccent'] = array('multichoice','_choices' => array(0,1,2)); 122fe9ec250SChris Smith$meta['useheading'] = array('multichoice','_choices' => array(0,'navigation','content',1)); 1237cd0713eSAndreas Gohr$meta['sneaky_index'] = array('onoff'); 124*d110fb0dSChristopher Smith$meta['hidepages'] = array('regex'); 12510449332Schris 1264fa2dffcSBen Coburn$meta['_authentication'] = array('fieldset'); 12710449332Schris$meta['useacl'] = array('onoff'); 12810449332Schris$meta['autopasswd'] = array('onoff'); 12910449332Schris$meta['authtype'] = array('authtype'); 13087bba75aSTom N Harris$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5','mediawiki','bcrypt','djangomd5','djangosha1','sha512')); 13191f04971SAndreas Gohr$meta['defaultgroup']= array('string'); 13291f04971SAndreas Gohr$meta['superuser'] = array('string'); 133f8cc712eSAndreas Gohr$meta['manager'] = array('string'); 13410449332Schris$meta['profileconfirm'] = array('onoff'); 1355430c4beSAndreas Gohr$meta['rememberme'] = array('onoff'); 136306ca8aaSchris$meta['disableactions'] = array('disableactions', 137f3718805SAdrian Lang '_choices' => array('backlink','index','recent','revisions','search','subscription','register','resendpwd','profile','edit','wikicode','check'), 138f3718805SAdrian Lang '_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw'))); 1394c989037SChris Smith$meta['auth_security_timeout'] = array('numeric'); 140f5c6743cSAndreas Gohr$meta['securecookie'] = array('onoff'); 141eb20307aSDominik Eckelmann$meta['remote'] = array('onoff'); 142eb20307aSDominik Eckelmann$meta['remoteuser'] = array('string'); 14310449332Schris 1444fa2dffcSBen Coburn$meta['_anti_spam'] = array('fieldset'); 1454fa2dffcSBen Coburn$meta['usewordblock']= array('onoff'); 1464fa2dffcSBen Coburn$meta['relnofollow'] = array('onoff'); 1474fa2dffcSBen Coburn$meta['indexdelay'] = array('numeric'); 1484fa2dffcSBen Coburn$meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none')); 14926ceae18SAndreas Gohr$meta['iexssprotect']= array('onoff'); 1504fa2dffcSBen Coburn 1514fa2dffcSBen Coburn$meta['_editing'] = array('fieldset'); 15217e7a281SBen Coburn$meta['usedraft'] = array('onoff'); 1534fa2dffcSBen Coburn$meta['htmlok'] = array('onoff'); 1544fa2dffcSBen Coburn$meta['phpok'] = array('onoff'); 15510449332Schris$meta['locktime'] = array('numeric'); 1564fa2dffcSBen Coburn$meta['cachetime'] = array('numeric'); 15710449332Schris 1584fa2dffcSBen Coburn$meta['_links'] = array('fieldset'); 15991f04971SAndreas Gohr$meta['target____wiki'] = array('string'); 16091f04971SAndreas Gohr$meta['target____interwiki'] = array('string'); 16191f04971SAndreas Gohr$meta['target____extern'] = array('string'); 16291f04971SAndreas Gohr$meta['target____media'] = array('string'); 16391f04971SAndreas Gohr$meta['target____windows'] = array('string'); 16410449332Schris 1652b03e74dSBen Coburn$meta['_media'] = array('fieldset'); 16637c23632SAndreas Gohr$meta['mediarevisions'] = array('onoff'); 1672b03e74dSBen Coburn$meta['gdlib'] = array('multichoice','_choices' => array(0,1,2)); 1682b03e74dSBen Coburn$meta['im_convert'] = array('im_convert'); 1692b03e74dSBen Coburn$meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100) 1708a1f5d50SAndreas Gohr$meta['fetchsize'] = array('numeric'); 1717cd0713eSAndreas Gohr$meta['refcheck'] = array('onoff'); 1727cd0713eSAndreas Gohr$meta['refshow'] = array('numeric'); 1737cd0713eSAndreas Gohr 1747cd0713eSAndreas Gohr$meta['_notifications'] = array('fieldset'); 1757cd0713eSAndreas Gohr$meta['subscribers'] = array('onoff'); 1767cd0713eSAndreas Gohr$meta['subscribe_time'] = array('numeric'); 1777cd0713eSAndreas Gohr$meta['notify'] = array('email', '_multiple' => true); 178a9b6a8b5SAndreas Gohr$meta['registernotify'] = array('email', '_multiple' => true); 179a9b6a8b5SAndreas Gohr$meta['mailfrom'] = array('email', '_placeholders' => true); 1807cd0713eSAndreas Gohr$meta['mailprefix'] = array('string'); 1818aea6381SAndreas Gohr$meta['htmlmail'] = array('onoff'); 1827cd0713eSAndreas Gohr 1837cd0713eSAndreas Gohr$meta['_syndication'] = array('fieldset'); 1847cd0713eSAndreas Gohr$meta['sitemap'] = array('numeric'); 1857cd0713eSAndreas Gohr$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1')); 1867cd0713eSAndreas Gohr$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current')); 1877cd0713eSAndreas Gohr$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html')); 1887cd0713eSAndreas Gohr$meta['rss_media'] = array('multichoice','_choices' => array('both','pages','media')); 1897cd0713eSAndreas Gohr$meta['rss_update'] = array('numeric'); 1907cd0713eSAndreas Gohr$meta['rss_show_summary'] = array('onoff'); 1912b03e74dSBen Coburn 1924fa2dffcSBen Coburn$meta['_advanced'] = array('fieldset'); 193c29dc6e4SAndreas Gohr$meta['updatecheck'] = array('onoff'); 1944fa2dffcSBen Coburn$meta['userewrite'] = array('multichoice','_choices' => array(0,1,2)); 1954fa2dffcSBen Coburn$meta['useslash'] = array('onoff'); 1964fa2dffcSBen Coburn$meta['sepchar'] = array('sepchar'); 1974fa2dffcSBen Coburn$meta['canonical'] = array('onoff'); 198f03fd957SAndreas Gohr$meta['fnencode'] = array('multichoice','_choices' => array('url','safe','utf-8')); 1994fa2dffcSBen Coburn$meta['autoplural'] = array('onoff'); 2004fa2dffcSBen Coburn$meta['compress'] = array('onoff'); 20128f4004cSAndreas Gohr$meta['cssdatauri'] = array('numeric','_pattern' => '/^\d+$/'); 202524be65dSBen Coburn$meta['gzip_output'] = array('onoff'); 2034fa2dffcSBen Coburn$meta['send404'] = array('onoff'); 2041b95bfdfSChris Smith$meta['compression'] = array('compression'); 205cde6a01bSAndreas Gohr$meta['broken_iua'] = array('onoff'); 206deec6eb9Spierre.pracht$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); 2070ceb549dSChris Smith$meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); 20822952965SYoBoY$meta['readdircache'] = array('numeric'); 2094fa2dffcSBen Coburn 2104fa2dffcSBen Coburn$meta['_network'] = array('fieldset'); 21122ef1e32SAndreas Gohr$meta['dnslookups'] = array('onoff'); 21276ae5803SAndreas Gohr$meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); 21376ae5803SAndreas Gohr$meta['proxy____port'] = array('numericopt'); 21491f04971SAndreas Gohr$meta['proxy____user'] = array('string'); 2153994772aSChris Smith$meta['proxy____pass'] = array('password','_code' => 'base64'); 21610449332Schris$meta['proxy____ssl'] = array('onoff'); 2177aeda574SAndreas Gohr$meta['proxy____except'] = array('string'); 21810449332Schris$meta['safemodehack'] = array('onoff'); 21976ae5803SAndreas Gohr$meta['ftp____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); 22076ae5803SAndreas Gohr$meta['ftp____port'] = array('numericopt'); 22191f04971SAndreas Gohr$meta['ftp____user'] = array('string'); 2223994772aSChris Smith$meta['ftp____pass'] = array('password','_code' => 'base64'); 22391f04971SAndreas Gohr$meta['ftp____root'] = array('string'); 22410449332Schris 225