DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devel:configuration [2016-03-12 22:14] – Proposal enhancement formatting for Parameters torpedodevel:configuration [2019-07-11 16:18] (current) – [Classes] Remove deprecated richemail, add array phy25
Line 40: Line 40:
 ^ ''%%'onoff'%%''          | Checkbox input, setting output ''0'' or ''1'' (note that default values should be one of these integers, and not boolean).                                                                                                                 | ^ ''%%'onoff'%%''          | Checkbox input, setting output ''0'' or ''1'' (note that default values should be one of these integers, and not boolean).                                                                                                                 |
 ^ ''%%'multichoice'%%''    | Select input (single choice), setting output with quotes, required ''_choices'' parameter.                                                                                                                                             | ^ ''%%'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.                                                                                                                                                  | +^ ''%%'email'%%''          | Text input, input must conform to email address format, setting output in quotes.                                                                                                                                                                                                                                    |
-^ ''%%'richemail'%%''      | Text input, input must conform to email address header format, may include a text part and replacement patterns, setting output in quotes.                                                                                         |+
 ^ ''%%'password'%%''       | Password input, minimal input validation, setting output plain text in quotes. Once set the password is not shown in the config manager any more. Can be obfuscated in config through the ''_code'' parameter.                         | ^ ''%%'password'%%''       | Password input, minimal input validation, setting output plain text in quotes. Once set the password is not shown in the config manager any more. Can be obfuscated in config through the ''_code'' parameter.                         |
 ^ ''%%'dirchoice'%%''      | As ''multichoice'', selection choices based on folders found at location specified in ''_dir'' parameter (required).                                                                                                                       | ^ ''%%'dirchoice'%%''      | As ''multichoice'', selection choices based on folders found at location specified in ''_dir'' parameter (required).                                                                                                                       |
Line 47: Line 46:
 ^ ''%%'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 ''_''                                                                         | ^ ''%%'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 ''_''                                                                         |
 ^ ''%%'authtype'%%''       | Creates a selection of available authentication methods, based on the class names in ''inc/auth'' that match the ''authtype.class.php'' pattern.                                                                                           | ^ ''%%'authtype'%%''       | Creates a selection of available authentication methods, based on the class names in ''inc/auth'' that match the ''authtype.class.php'' pattern.                                                                                           |
 +^ ''%%'array'%%''          | a simple (one dimensional) array of string values, shown as comma separated list in the config manager but saved as PHP array(). Values may not contain commas themselves. ''_pattern'' matching on the array values supported.       |
 ^ ''%%'regex'%%''          | Regular expression string, normally without delimiters; as for ''string'', in addition tested to see if will compile and run as a regex.  In addition to ''_pattern'', also accepts ''_delimiter'' (default ''/'') and ''_pregflags'' (default ''ui'').  | ^ ''%%'regex'%%''          | Regular expression string, normally without delimiters; as for ''string'', in addition tested to see if will compile and run as a regex.  In addition to ''_pattern'', also accepts ''_delimiter'' (default ''/'') and ''_pregflags'' (default ''ui'').  |
  
Line 72: Line 72:
 Let's say initially a plugin uses the syntax: Let's say initially a plugin uses the syntax:
  
-<code php>$meta[multi'] = array('multicheckbox', '_choices' => array('a','b','c','d'));</code>+<code php>$meta['multi'] = array('multicheckbox', '_choices' => array('a','b','c','d'));</code>
  
 this means the multicheckbox will show four choices plus a string input. this means the multicheckbox will show four choices plus a string input.
Line 80: Line 80:
 In the next release of the plugin the author's plugin decides to use the multicheckbox without the extra string, but, in order to be backwardly compatible, adopts: In the next release of the plugin the author's plugin decides to use the multicheckbox without the extra string, but, in order to be backwardly compatible, adopts:
  
-<code php>$meta[multi'] = array('multicheckbox', '_other' => 'exists', '_choices' => array('a','b','c','d'));</code>+<code php>$meta['multi'] = array('multicheckbox', '_other' => 'exists', '_choices' => array('a','b','c','d'));</code>
  
 which means: which means:
devel/configuration.1457817296.txt.gz · Last modified: 2016-03-12 22:14 by torpedo

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki