Add Custom Fields Horde Turba

When you need to add custom fields in Horde (Turba) for additional fields from an Outlook Address Book Export.

Here are the default sections in horde:

Personal

Location

Communication

Organization

Other

Lets say that we need additional fields. We are importing from Outlook and need 2 more email fields as Outlook has the Email fields  – “E-mail Address, E-mail 2 Address and E-mail 3 Address. As you can see in the Communication screenshot, there is only 1 Email field. So, we will be adding 2 fields to Horde.

Modifying fields in the Turba addressbook

There are three easy steps to adding the fields you would like in Turba:

  1. Define an attribute (e.g.  “E-mail 2 Address and E-mail 3 Address” and is of type “email”).
  2. Add it to list of fields that Turba uses (so it is displayed in the right place).
  3. Add to  the back end storage (database), if not there,  (so Turba can query/save the values).

Plesk server. Files of Interest:

Path – /usr/share/psa-horde/turba/config
attributes.php – copy this to attributes.local.php
backends.php – copy this file to backends.local.php

Open the attributes.local.php file and locate the following. As you note, we do not need to change anything except the label as the fields are there:

/* Additional attributes supported by some SyncML clients */
$attributes['workEmail'] = array(
    'label' => _(""Work Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_compose' => true, 'link_name' => null, 'delimiters' => ',', 'size' => null)
);
$attributes['homeEmail'] = array(
    'label' => _("Home Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_compose' => true, 'link_name' => null, 'delimiters' => ',', 'size' => null)
);

Let’s change the label to the Outlook labels:

/* Additional attributes supported by some SyncML clients */
$attributes['workEmail'] = array(
    'label' => _("E-mail 3 Address"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_compose' => true, 'link_name' => null, 'delimiters' => ',', 'size' => null)
);
$attributes['homeEmail'] = array(
    'label' => _("E-mail 2 Address"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_compose' => true, 'link_name' => null, 'delimiters' => ',', 'size' => null)
);

Now open the backends.local.php file an dlocate the following section:

// 'homeEmail' => 'object_homeemail',
// 'workEmail' => 'object_workemail',

Change to this:

'homeEmail' => 'object_homeemail',
'workEmail' => 'object_workemail',

And save the file.
Now reload the Communications section.

Other Sources:
https://edeca.net/post/2010/01/modifying-fields-in-the-turba-addressbook/

Add Custom Fields Horde 5 Turba


https://support.plesk.com/hc/en-us/articles/213945205-Where-does-Horde-keep-its-address-book-How-to-restore-it-