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