conf.xml

The XML file is layed out using several sections. These sections relate to variables that are used within horde. Here is an example XML snippet and the resulting configuration file entries:

<?xml version="1.0"?>
<!-- $Horde: $ -->
<configuration>
 <configsection name="wicked">
  <configheader>Application Settings</configheader>

  <configstring name="notify_address" desc="The email address to which changes
   on pages should be mailed. Leave empty if you don't want notification
   messages to be sent." required="false" />
  <configenum name="diff_format" desc="The diff format that should be used when
   sending notifications.">unified
   <values>
    <value desc="Unified context">unified</value>
    <value desc="Copied context">context</value>
    <value desc="Side by side">sidebyside</value>
   </values>
  </configenum>
 </configsection>
</configuration>

<configuration> is the start of the config file.

Sections

<configsection name="wicked"> produces first level $conf['wicked'] variables.
Multiple configsection names produces multiple levels.

<configsection name="level1">
 <configsection name="level2">
...
 </configsection>
<configsection>

produces $conf['level1']['level2'] variables.

Headers

<configheader> puts text to help organize the screen

Descriptions

        <configdescription>
            Standalone informational text which does not affect the generated configuration.
            This might be helpful at the top of a configsection, configswitch or configtab
        </configdescription>

Strings

<configstring ...> for selecting an item from a list

Passwords

<configpassword ...> for allowing masked input (show only stars)

Secrets

<configsecret ...> Autogenerates a random ID if empty and no default provided

Verbatim PHP

<configphp ...> Allows administrators to convey arbitrary PHP code. Use with care and provide a sane default.

       <configphp name="custom" quote="false" desc="A custom function to modify the calculated $foo"/>

Supported attributes

Booleans

<configboolean ...>value</configboolean>

Enums (Select From a List)

<configenum ...>default_entry to provide a list of choices

within configenum section use:

 <values>
  <value desc="List entry1">list1</value>
  <value desc="List entry2">list2</value>
 </values>

Multi-Enums (Select Any Number From a List)

<configmultienum ...> for selecting multiple items from a list

Special Values

<configspecial application="horde" name="apps" /> - "values" list of active horde apps

See http://www.ralf-lang.de/2012/02/22/horde-config-how-to-fill-dropdowns-with-application-data-with-configspecial/ for a detailed explanation.

Predefined Specials

TODO: More detail on usage. For now, just a heads up so users don't reinvent the wheel

<configsql ...> for configuring an SQL backend or using the default defined in the horde base app
<confignosql ...> for configuring a NoSQL (Mongo etc) backend or using the default defined in the horde base app
<configldap ...> for configuring an LDAP backend or using the default defined in the horde base app
<configvfs ...> for configuring Virtual Filesystem Storage or using the default defined in the horde base app
<configtab ...> Organize your config screen into tabs

Switches

<configswitch ...> - mechanism for grouping sets of options
Use config entries from above to populate option choices.

<case ...> provides value for configswitch statement
Must reside within <configswitch> section