Creare campi email aggiuntivi nell'Addressbook Turba di Horde: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
m Created page with "* We are adding two fields Home Email Work Email * Check if these attributes are already defined in turba/config/attributes.php * Fortunately, they are. If not we need to c…"
 
mNo edit summary
 
Line 59: Line 59:


==References==
==References==
*[http://wiki.horde.org/TurbaExtraFields Wiki :: TurbaExtraFields]
*[http://wiki.horde.org/TurbaOutlook2003 Wiki :: TurbaOutlook2003]
*[http://edeca.net/wp/2010/01/modifying-fields-in-the-turba-addressbook/comment-page-1/#comment-1084 Modifying fields in the Turba addressbook | edeca.net]
*[http://edeca.net/wp/2010/01/modifying-fields-in-the-turba-addressbook/comment-page-1/#comment-1084 Modifying fields in the Turba addressbook | edeca.net]
*[http://msdn.microsoft.com/en-us/library/ee160254(v=exchg.80).aspx Microsoft ActiveSync Addressbook Elements]
*[http://msdn.microsoft.com/en-us/library/ee160254(v=exchg.80).aspx Microsoft ActiveSync Addressbook Elements]

Latest revision as of 12:44, 23 November 2012

  • We are adding two fields
Home Email
Work Email
  • Check if these attributes are already defined in
turba/config/attributes.php
  • Fortunately, they are. If not we need to create a copy of attributes.php named attributes.local.php and add the new attributes here
$attributes['workEmail'] = array(
    'label' => _("Work Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_com
);
$attributes['homeEmail'] = array(
    'label' => _("Home Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => false, 'strip_domain' => false, 'link_com
);
  • Now we need to create the new attributes fields in the turba_objects table:
ALTER TABLE `turba_objects`
ADD `object_homeemail` VARCHAR( 255 ) NOT NULL AFTER `object_email`,
ADD `object_workemail` VARCHAR( 255 ) NOT NULL AFTER `object_homeemail`
  • After this, we need to define how the new attributes are showed in the user interface.
  • Create a copy of turba/config/backends.php
sudo cp turba/config/backends.php turba/config/backends.local.php
  • Add the new attributes:
...
          'homeEmail' => 'object_homeemail',
          'workEmail' => 'object_workemail',
...
  • Define where they have to be shown:
          _("Communications") => array('email', 'homeEmail','workEmail',

  • And if you want to search these fileds too, add them:
       'search' => array(                
          'name',                       
          'email',
          'homeEmail',
          'workEmail'
      ), 

References