Author Topic: Address Book  (Read 3324 times)

Offline projectmyst

  • Jr. Member
  • **
  • Posts: 30
Address Book
« on: September 10, 2010, 09:00:47 AM »
Hi

I want to add more filed to the address book, dose any one know how to do it? I'm using 0.4 Stable

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Address Book
« Reply #1 on: September 10, 2010, 11:06:11 AM »
You could try using the patch attached to this ticket: http://trac.roundcube.net/ticket/1486377

Offline projectmyst

  • Jr. Member
  • **
  • Posts: 30
Address Book
« Reply #2 on: September 10, 2010, 11:21:27 AM »
Is this patch for the sql contacts?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Address Book
« Reply #3 on: September 10, 2010, 11:50:28 AM »
Yes, as far as I know its only MySQL.

Offline xrxca

  • Jr. Member
  • **
  • Posts: 22
Address Book
« Reply #4 on: September 18, 2010, 07:34:03 PM »
Quote from: skaero;29978
Yes, as far as I know its only MySQL.

Actually based on the changes in the SQL directory it looks like it may work for sqlite and postgres as well.

This is one patch that I hope makes it into the next release, but the search routines (search field on Address book page and autosearch on email entry) need to have the option of searching more than just Display name and email address.
« Last Edit: September 18, 2010, 07:39:37 PM by xrxca »

Offline yurayko

  • Newbie
  • *
  • Posts: 3
    • http://www.carmine.eu
[0.5] SQLite additional fileds
« Reply #5 on: April 01, 2011, 09:09:36 PM »
Hi,
for now, not working or partially and I need little help :)
I edited these files:

/program/steps/addresbook/show.inc
Code: [Select]
$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
Code: [Select]
$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
Code: [Select]
$a_save_cols = array('name', 'firstname', 'surname', 'address', 'zip', 'city', 'phone', 'mobile', 'birthday', 'company', 'url','email');
I have added to -
/program/localization/en_US/labels.inc
Code: [Select]
$labels['address']   = 'Address';
$labels['zip']       = 'ZIP';
$labels['city']      = 'City';
$labels['phone']     = 'Phone';
$labels['mobile']    = 'Mobile';
$labels['birthday']  = 'Birthday';
$labels['company']   = 'Company';
$labels['url']       = 'Homepage';

My problems are: I can edit contacts, but changes are not saved :( message speech --> ALL was saved ... :D and second problem, I can't add contact -->

DB Error in /var/www/google.xxx/roundcube/program/include/rcube_mdb2.php (650): MDB2 Error: null value violates not-null constraint Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO contacts (user_id, changed, del, "name", "email", "firstname", "surname") VALUES (1, now(), 0, 'a', 'test@test.com', 'a', 'a')] [Native code: 19] [Native message: contacts.vcard may not be NULL]

MANY THANKS
« Last Edit: April 01, 2011, 09:11:32 PM by yurayko »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Address Book
« Reply #6 on: April 02, 2011, 01:16:11 AM »
At this point it would be better to update to the SVN which has support for more address book fields.