Hello,
I installed "Roundcube" 0.5 and I set a "LDAP" addressbook.
All works fine but I can not find how to add additional fields to display in the address book. As the phone number or address.
I found examples on the forum for version 0.3 but the file structure of the 0.5 seems to be different.
Thank you in advance for your help :-)
You have to modify several files:
To add, address, zip-code, city, phone, mobile, birthday, company and website
./config/main.inc.php (part from the LDAP config)
'firstname_field' => 'gn', // this field represents contact's first name
'address_field' => 'street',
'zip_field' => 'postalCode',
'city_field' => 'l',
'phone_field' => 'homePhone',
'mobile_field' => 'mobile',
'birthday_field' => 'birthDate',
'company_field' => 'o',
'url_field' => 'url',
'sort' => 'cn', // The field to sort the listing by.
./program/steps/addresbook/show.inc:
$form = array(
'info' => array(
'name' => rcube_label('contactproperties'),
'content' => array(
'name' => array('type' => 'text', 'size' => $i_size),
'firstname' => array('type' => 'text', 'size' => $i_size),
'surname' => array('type' => 'text', 'size' => $i_size),
'address' => array('type' => 'text', 'size' => $i_size),
'zip' => array('type' => 'text', 'size' => $i_size),
'city' => array('type' => 'text', 'size' => $i_size),
'phone' => array('type' => 'text', 'size' => $i_size),
'mobile' => array('type' => 'text', 'size' => $i_size),
'birthday' => array('type' => 'text', 'size' => $i_size),
'company' => array('type' => 'text', 'size' => $i_size),
'url' => array('type' => 'text', 'size' => $i_size),
'email' => array('type' => 'text', 'size' => $i_size),
),
),
'groups' => array(
'name' => rcube_label('groups'),
'content' => '',
),
);
./program/steps/addresbook/edit.inc:
$form = array(
'info' => array(
'name' => rcube_label('contactproperties'),
'content' => array(
'name' => array('type' => 'text', 'size' => $i_size),
'firstname' => array('type' => 'text', 'size' => $i_size),
'surname' => array('type' => 'text', 'size' => $i_size),
'address' => array('type' => 'text', 'size' => $i_size),
'zip' => array('type' => 'text', 'size' => $i_size),
'city' => array('type' => 'text', 'size' => $i_size),
'phone' => array('type' => 'text', 'size' => $i_size),
'mobile' => array('type' => 'text', 'size' => $i_size),
'birthday' => array('type' => 'text', 'size' => $i_size),
'company' => array('type' => 'text', 'size' => $i_size),
'url' => array('type' => 'text', 'size' => $i_size),
'email' => array('type' => 'text', 'size' => $i_size),
),
),
'groups' => array(
'name' => rcube_label('groups'),
'content' => '',
),
);
./program/steps/addresbook/save.inc:
$a_save_cols = array('name', 'firstname', 'surname', 'address', 'zip', 'city', 'phone', 'mobile', 'birthday', 'company', 'url','email');
And the localization files, I.E:
./program/localization/en_US/labels.inc
$labels['address'] = 'Address';
$labels['zip'] = 'ZIP';
$labels['city'] = 'City';
$labels['phone'] = 'Phone';
$labels['mobile'] = 'Mobile';
$labels['birthday'] = 'Birthday';
$labels['company'] = 'Company';
$labels['url'] = 'Homepage';
Easy to use!!!
Works fine :-)
My own additional fields in main.inc.php
// additional fields
'company_field' => 'o',
'department_field' => 'ou',
'address_field' => 'postaladdress',
'zip_field' => 'postalcode',
'city_field' => 'l',
'country_field' => 'c',
'workphone_field' => 'telephonenumber',
'cellphone_field' => 'mobile',
'homephone_field' => 'homephone',
'fax_field' => 'facsimiletelephonenumber',
'notes_field' => 'comment',
Thank you Julius!