[turba] Adding Custom Communication Fields to Turba

Simon Brereton simon.brereton at dada.net
Thu Apr 21 15:40:58 UTC 2011


> From: turba-bounces at lists.horde.org [mailto:turba-
> bounces at lists.horde.org] On Behalf Of Michael Rubinsky
> Quoting Simon Brereton <simon.brereton at dada.net>:
> 
> > Hi
> >
> > Previously with Horde3, to add a custom field I had to manually
> edit
> > sources.php and attributes.php in the turba/config directory like
> > this:
> >
> > $attributes['homeEmail'] = array(
> >         'label' => _("Home Email"),
> >         'type' => 'email',
> >         'required' => false,
> >         'params' => array('allow_multi' => false, 'strip_domain' =>
> > false, 'link_compose' => true) );
> >
> > In Horde4 there is no sources.php for me edit.  Is the process
> still 
> > the same?  How does one add a Work Email and Work Cell field?
> 
> sources.php is now called backends.php

I may be too stupid but how do I add something to this file?

For example to add a Work Email and Work Cell Number to the back end I'm looking at this part of the file:

289         'email' => 'object_email',
290         'homePhone' => 'object_homephone',
291         'workPhone' => 'object_workphone',
292         'cellPhone' => 'object_cellphone',


Do I just want to add:
289         'email' => 'object_email',
		'workEmail' => object_email',
290         'homePhone' => 'object_homephone',
291         'workPhone' => 'object_workphone',
292         'cellPhone' => 'object_cellphone',
		'workcellPhone' => 'object_cellphone',

What's the format for adding this then to attributes.php?

$attributes['workEmail'] = array(
        'label' => _("Work Email"),
        'type' => 'email',
        'required' => false,
        'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_compose' => true)
);

and

$attributes['workCellPhone'] = array(
    'label' => _("Work Mobile Phone"),
    'type' => 'cellphone',
    'required' => false
);

Presumably then I also have to add this to the DB?


Thanks.

Simon




More information about the turba mailing list