[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turba
Subject:    [turba] Extra email addresses in Turba4
From:       Simon Brereton <simon.buongiorno () gmail ! com>
Date:       2012-07-11 18:23:30
Message-ID: CAOmHMuEPn-QKJ7Pbi1JLzxUMF7j0kTjSDDqAH2q6dKtLO=CPVg () mail ! gmail ! com
[Download RAW message or body]

Hi

In Horde 3 and 4 I was used to making some changes to allow more than
one email and (later as it became more common) more than one cell
phone number.

I did this by doing the following custom changes and also make
lastname not required.

vim /usr/share/horde4/turba/config/attributes.php
//Added by SPB
$attributes['workEmail'] = array(
        'label' => _("Work Email"),
        'type' => 'email',
        'required' => false,
        'params' => array('allow_multi' => false, 'strip_domain' =>
false, 'link_compose' => true)
);

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

cp /usr/share/horde4/turba/config/attributes.php
/usr/share/horde4/turba/config/attributes.local.php
cp /usr/share/horde4/turba/config/backends.php
/usr/share/horde4/turba/config/backends.local.php
vim /usr/share/horde4/turba/config/backends.local.php
//Added by SPB
        'workEmail' => 'object_workemail',
        'homePhone' => 'object_homephone',
        'workPhone' => 'object_workphone',
        'cellPhone' => 'object_cellphone',
        'workCellPhone' => 'object_cellphone',

//Added by SPB
                _("Communications") => array('email', 'workEmail',
'homePhone', 'workPhone',
		'cellPhone', 'workCellPhone', 'fax', 'pager''imaddress',
		'imaddress2', 'imaddress3'),

Run the following SQL commands from the panel
ALTER TABLE `turba_objects`
ADD `object_workemail` VARCHAR( 255 ) NOT NULL AFTER `object_email`,
ADD `object_workcellphone` VARCHAR( 25 ) NOT NULL AFTER `object_cellphone`

In Horde5/Turba4, I noticed that this has changed somewhat.  Firstly
there are two Email arrays, both of which appear to take multiple
email addresses (comma separated)..

274 /* Communication. */
275 $attributes['email'] = array(
276     'label' => _("Email"),
277     'type' => 'email',
278     'required' => false,
279     'params' => array('allow_multi' => false, 'strip_domain' =>
false, 'link_compose' => true, 'link_name' => null, 'delimiters' =>
',', 'size' => null)
280 );
281 $attributes['emails'] = array(
282     'label' => _("Emails"),
283     'type' => 'email',
284     'required' => false,
285     'params' => array('allow_multi' => true, 'strip_domain' =>
false, 'link_compose' => true, 'link_name' => null, 'delimiters' =>
',', 'size' => null)
286 );

Old style
287 //Added by SPB
288 $attributes['workEmail'] = array(
289         'label' => _("Work Email"),
290         'type' => 'email',
291         'required' => false,
292         'params' => array('allow_multi' => false, 'strip_domain'
=> false, 'link_compose' => true)
294 );

However the Contact display page still only shows Email and not
Emails, and attempting to add in a second email address separated by a
comma resulted in an error (Please enter an email address).

Before I proceed and break this totally - is this field now intended
to support multiple addresses?  How does this work with ActiveSync
where addresses are marked as work, home or other?

Is my method above still the correct way to do this?  Does the SQL
line need updating?

Thanks.
Simon
-- 
turba mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: turba-unsubscribe@lists.horde.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic