2006-01-25 01:15:46 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Metadata for configuration manager plugin
|
|
|
|
*
|
2006-03-04 16:40:38 +01:00
|
|
|
* Note: This file should be included within a function to ensure it
|
2006-04-30 18:09:00 +02:00
|
|
|
* doesn't clash with the settings it is describing.
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
|
|
|
* Format:
|
|
|
|
* $meta[<setting name>] = array(<handler class id>,<param name> => <param value>);
|
|
|
|
*
|
|
|
|
* <handler class id> is the handler class name without the "setting_" prefix
|
|
|
|
*
|
|
|
|
* Defined classes:
|
2006-07-05 03:21:42 +02:00
|
|
|
* Generic (source: settings/config.class.php)
|
|
|
|
* -------------------------------------------
|
2006-05-11 10:32:09 +02:00
|
|
|
* '' - default class ('setting'), textarea, minimal input validation, setting output in quotes
|
|
|
|
* 'string' - single line text input, minimal input validation, setting output in quotes
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'numeric' - text input, accepts numbers and arithmetic operators, setting output without quotes
|
2007-05-13 11:03:09 +02:00
|
|
|
* 'numericopt' - like above, but accepts empty values
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'onoff' - checkbox input, setting output 0|1
|
|
|
|
* 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter
|
|
|
|
* 'email' - text input, input must conform to email address format, setting output in quotes
|
2008-05-04 11:05:26 +02:00
|
|
|
* 'richemail' - text input, input must conform to email address format but accepts variables and
|
|
|
|
* emails with a real name prepended (when email address is given in <>)
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'password' - password input, minimal input validation, setting output plain text in quotes
|
|
|
|
* 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir
|
2008-04-01 21:40:32 +02:00
|
|
|
* parameter (required). A pattern can be used to restrict the folders to only those which
|
|
|
|
* match the pattern.
|
2006-07-05 03:21:42 +02:00
|
|
|
* 'multicheckbox'- a checkbox for each choice plus an "other" string input, config file setting is a comma
|
|
|
|
* separated list of checked choices
|
2006-05-10 08:57:32 +02:00
|
|
|
* 'fieldset' - used to group configuration settings, but is not itself a setting. To make this clear in
|
|
|
|
* the language files the keys for this type should start with '_'.
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
2006-07-05 03:21:42 +02:00
|
|
|
* Single Setting (source: settings/extra.class.php)
|
|
|
|
* -------------------------------------------------
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'savedir' - as 'setting', input tested against initpath() (inc/init.php)
|
|
|
|
* 'sepchar' - as multichoice, selection constructed from string of valid values
|
|
|
|
* 'authtype' - as 'setting', input validated against a valid php file at expected location for auth files
|
|
|
|
* 'im_convert' - as 'setting', input must exist and be an im_convert module
|
2006-07-05 03:21:42 +02:00
|
|
|
* 'disableactions' - as 'setting'
|
2007-08-05 21:36:38 +02:00
|
|
|
* 'compression' - no additional parameters. checks php installation supports possible compression alternatives
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
|
|
|
* Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output
|
|
|
|
*
|
|
|
|
* Defined parameters:
|
|
|
|
* '_pattern' - string, a preg pattern. input is tested against this pattern before being accepted
|
2008-04-01 21:40:32 +02:00
|
|
|
* optional all classes, except onoff & multichoice which ignore it
|
2006-01-25 01:15:46 +01:00
|
|
|
* '_choices' - array of choices. used to populate a selection box. choice will be replaced by a localised
|
|
|
|
* language string, indexed by <setting name>_o_<choice>, if one exists
|
2006-07-05 03:21:42 +02:00
|
|
|
* required by 'multichoice' & 'multicheckbox' classes, ignored by others
|
2006-01-25 01:15:46 +01:00
|
|
|
* '_dir' - location of directory to be used to populate choice list
|
|
|
|
* required by 'dirchoice' class, ignored by other classes
|
2006-07-05 03:21:42 +02:00
|
|
|
* '_combine' - complimentary output setting values which can be combined into a single display checkbox
|
|
|
|
* optional for 'multicheckbox', ignored by other classes
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
|
|
|
* @author Chris Smith <chris@jalakai.co.uk>
|
|
|
|
*/
|
|
|
|
// ---------------[ settings for settings ]------------------------------
|
|
|
|
$config['format'] = 'php'; // format of setting files, supported formats: php
|
|
|
|
$config['varname'] = 'conf'; // name of the config variable, sans $
|
|
|
|
|
|
|
|
// this string is written at the top of the rewritten settings file,
|
|
|
|
// !! do not include any comment indicators !!
|
|
|
|
// this value can be overriden when calling save_settings() method
|
|
|
|
$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings';
|
|
|
|
|
|
|
|
// ---------------[ setting files ]--------------------------------------
|
|
|
|
// these values can be string expressions, they will be eval'd before use
|
|
|
|
$file['local'] = "DOKU_CONF.'local.php'"; // mandatory (file doesn't have to exist)
|
|
|
|
$file['default'] = "DOKU_CONF.'dokuwiki.php'"; // optional
|
|
|
|
$file['protected'] = "DOKU_CONF.'local.protected.php'"; // optional
|
|
|
|
|
|
|
|
// test value (FIXME, remove before publishing)
|
2006-03-04 16:40:38 +01:00
|
|
|
//$meta['test'] = array('multichoice','_choices' => array(''));
|
|
|
|
|
2006-01-25 01:15:46 +01:00
|
|
|
// --------------[ setting metadata ]------------------------------------
|
|
|
|
// - for description of format and fields see top of file
|
|
|
|
// - order the settings in the order you wish them to appear
|
2006-03-04 16:40:38 +01:00
|
|
|
// - any settings not mentioned will come after the last setting listed and
|
2006-01-25 01:15:46 +01:00
|
|
|
// will use the default class with no parameters
|
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_basic'] = array('fieldset');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['title'] = array('string');
|
2008-10-11 14:14:50 +02:00
|
|
|
$meta['start'] = array('string','_pattern' => '!^[^:;/]+$!'); // don't accept namespaces
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/');
|
2008-04-01 21:40:32 +02:00
|
|
|
$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/','_pattern' => '/^[\w-]+$/');
|
2008-10-12 13:31:50 +02:00
|
|
|
$meta['license'] = array('license');
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['savedir'] = array('savedir');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['basedir'] = array('string');
|
|
|
|
$meta['baseurl'] = array('string');
|
2006-10-06 00:31:41 +02:00
|
|
|
$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
|
|
|
|
$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['allowdebug'] = array('onoff');
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_display'] = array('fieldset');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['recent'] = array('numeric');
|
|
|
|
$meta['breadcrumbs'] = array('numeric');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['youarehere'] = array('onoff');
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['fullpath'] = array('onoff');
|
2007-06-13 20:40:15 +02:00
|
|
|
$meta['typography'] = array('multichoice','_choices' => array(0,1,2));
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['dformat'] = array('string');
|
|
|
|
$meta['signature'] = array('string');
|
2008-10-01 17:29:14 +02:00
|
|
|
$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','email','email_link'));
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels
|
2006-02-24 00:00:53 +01:00
|
|
|
$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5));
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons
|
|
|
|
$meta['camelcase'] = array('onoff');
|
2006-03-03 01:10:07 +01:00
|
|
|
$meta['deaccent'] = array('multichoice','_choices' => array(0,1,2));
|
2008-11-19 15:07:58 +01:00
|
|
|
$meta['useheading'] = array('multichoice','_choices' => array(0,'navigation','content',1));
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['refcheck'] = array('onoff');
|
|
|
|
$meta['refshow'] = array('numeric');
|
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_authentication'] = array('fieldset');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['useacl'] = array('onoff');
|
|
|
|
$meta['autopasswd'] = array('onoff');
|
|
|
|
$meta['authtype'] = array('authtype');
|
2008-08-10 21:26:32 +02:00
|
|
|
$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','crypt','mysql','my411'));
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['defaultgroup']= array('string');
|
|
|
|
$meta['superuser'] = array('string');
|
2006-12-03 14:41:04 +01:00
|
|
|
$meta['manager'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['profileconfirm'] = array('onoff');
|
2008-10-14 20:56:11 +02:00
|
|
|
$meta['rememberme'] = array('onoff');
|
2006-06-16 14:45:39 +02:00
|
|
|
$meta['registernotify'] = array('email');
|
2006-07-05 03:21:42 +02:00
|
|
|
$meta['disableactions'] = array('disableactions',
|
2008-03-09 21:15:27 +01:00
|
|
|
'_choices' => array('backlink','index','recent','revisions','search','subscription','nssubscription','register','resendpwd','profile','edit','wikicode','check'),
|
|
|
|
'_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw'), 'nssubscription' => array('subscribens','unsubscribens')));
|
2007-05-11 22:02:35 +02:00
|
|
|
$meta['sneaky_index'] = array('onoff');
|
2007-05-28 21:47:47 +02:00
|
|
|
$meta['auth_security_timeout'] = array('numeric');
|
2008-09-13 00:49:22 +02:00
|
|
|
$meta['securecookie'] = array('onoff');
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_anti_spam'] = array('fieldset');
|
|
|
|
$meta['usewordblock']= array('onoff');
|
|
|
|
$meta['relnofollow'] = array('onoff');
|
|
|
|
$meta['indexdelay'] = array('numeric');
|
|
|
|
$meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none'));
|
2007-02-24 13:44:58 +01:00
|
|
|
$meta['iexssprotect']= array('onoff');
|
2006-05-10 08:57:32 +02:00
|
|
|
|
|
|
|
$meta['_editing'] = array('fieldset');
|
|
|
|
$meta['usedraft'] = array('onoff');
|
|
|
|
$meta['htmlok'] = array('onoff');
|
|
|
|
$meta['phpok'] = array('onoff');
|
|
|
|
$meta['notify'] = array('email');
|
|
|
|
$meta['subscribers'] = array('onoff');
|
|
|
|
$meta['locktime'] = array('numeric');
|
|
|
|
$meta['cachetime'] = array('numeric');
|
|
|
|
|
|
|
|
$meta['_links'] = array('fieldset');
|
|
|
|
$meta['target____wiki'] = array('string');
|
|
|
|
$meta['target____interwiki'] = array('string');
|
|
|
|
$meta['target____extern'] = array('string');
|
|
|
|
$meta['target____media'] = array('string');
|
|
|
|
$meta['target____windows'] = array('string');
|
|
|
|
|
2006-05-16 08:23:21 +02:00
|
|
|
$meta['_media'] = array('fieldset');
|
|
|
|
$meta['gdlib'] = array('multichoice','_choices' => array(0,1,2));
|
|
|
|
$meta['im_convert'] = array('im_convert');
|
|
|
|
$meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100)
|
2006-06-16 14:45:39 +02:00
|
|
|
$meta['fetchsize'] = array('numeric');
|
2006-05-16 08:23:21 +02:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_advanced'] = array('fieldset');
|
2006-09-16 23:02:29 +02:00
|
|
|
$meta['updatecheck'] = array('onoff');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['userewrite'] = array('multichoice','_choices' => array(0,1,2));
|
|
|
|
$meta['useslash'] = array('onoff');
|
|
|
|
$meta['sepchar'] = array('sepchar');
|
|
|
|
$meta['canonical'] = array('onoff');
|
|
|
|
$meta['autoplural'] = array('onoff');
|
2008-05-04 11:05:26 +02:00
|
|
|
$meta['mailfrom'] = array('richemail');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['compress'] = array('onoff');
|
2006-05-16 10:41:32 +02:00
|
|
|
$meta['gzip_output'] = array('onoff');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['hidepages'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['send404'] = array('onoff');
|
2007-08-05 21:36:38 +02:00
|
|
|
$meta['compression'] = array('compression');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['sitemap'] = array('numeric');
|
2007-07-11 23:36:24 +02:00
|
|
|
$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1'));
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current'));
|
2007-07-11 23:36:24 +02:00
|
|
|
$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html'));
|
2006-03-27 20:10:05 +02:00
|
|
|
$meta['rss_update'] = array('numeric');
|
2006-08-30 20:27:53 +02:00
|
|
|
$meta['recent_days'] = array('numeric');
|
2006-11-27 23:33:56 +01:00
|
|
|
$meta['rss_show_summary'] = array('onoff');
|
2007-02-08 20:51:45 +01:00
|
|
|
$meta['broken_iua'] = array('onoff');
|
2008-03-15 16:56:31 +01:00
|
|
|
$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3));
|
2008-02-27 22:30:50 +01:00
|
|
|
$meta['xmlrpc'] = array('onoff');
|
2008-03-13 21:45:05 +01:00
|
|
|
$meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml'));
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_network'] = array('fieldset');
|
2007-05-13 11:03:09 +02:00
|
|
|
$meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i');
|
|
|
|
$meta['proxy____port'] = array('numericopt');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['proxy____user'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['proxy____pass'] = array('password');
|
|
|
|
$meta['proxy____ssl'] = array('onoff');
|
|
|
|
$meta['safemodehack'] = array('onoff');
|
2007-05-13 11:03:09 +02:00
|
|
|
$meta['ftp____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i');
|
|
|
|
$meta['ftp____port'] = array('numericopt');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['ftp____user'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['ftp____pass'] = array('password');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['ftp____root'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
|