Koozali.org: home of the SME Server

Horde, Turba shared addressbook

Offline bas

  • *
  • 31
  • +0/-0
Horde, Turba shared addressbook
« on: September 24, 2005, 01:38:15 AM »
I recently installed Horde3 on sme 6.0.1 using jbennett's install-script wich worked fine.

According to the turba help file i should be able to share an addressbook.
To bad, i don't know how.
Can anyone help me please?

Bas

helpfile text:
Add
Add a user to an address book. You can only add users to the address books to
which you have write access. If shared or public address books have been
enabled they are often read-only and you will not be able to add contacts to
them.
......

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Horde, Turba shared addressbook
« Reply #1 on: September 24, 2005, 10:41:25 PM »
I've yet to do this as well.  I believe you have to create another MySQL table for the shared address book.  I searched around the horde site and look at the archives and that is what I found.  I haven't had the time to see how to do this.  If you find out, please make sure to post your results.

JB
......

Offline bas

  • *
  • 31
  • +0/-0
Horde, Turba shared addressbook
« Reply #2 on: September 24, 2005, 11:56:08 PM »
Ok I had already searched through a few forums and posts and this is the best I found.

*****************
From: Palomäki Kai <Kai.Palomaki <at> vlp.fi>
Subject: RE: Can i have more than 1 address books
Newsgroups: gmane.comp.horde.imp
Date: 2004-09-21 06:11:12 GMT (1 year, 3 days, 9 hours and 1 minute ago)

> I use IMP/TURBA for my users address book.
>
> I want to setup a other centraly manage address book in mysql
> (read only for my users).
>
> Can i do this with IMP/TURBA

Absolutely.

> What should my IMP and TURBA configs look like

This is how I have done it.

Just create new table in database (copy of turba_objects) for
example turba_public_objects.

Declare new address book source in turba/config/sources.php.

$cfgSources['publicsql'] = array(
    'title' => 'Public addressbook',
    'type' => 'sql',
    'params' => array(
        'phptype' => 'mysql',
        'hostspec' => 'localhost',
        'username' => 'user',
        'password' => 'password',
        'database' => 'horde',
        'table' => 'turba_public_objects'
    ),
    'map' => array(
        '__key' => 'object_id',
        '__owner' => 'owner_id',
        '__type' => 'object_type',
        '__members' => 'object_members',
        'name' => 'object_name',
        'email' => 'object_email',
        'homeAddress' => 'object_homeaddress',
        'workAddress' => 'object_workaddress',
        'homePhone' => 'object_homephone',
        'workPhone' => 'object_workphone',
        'cellPhone' => 'object_cellphone',
        'fax' => 'object_fax',
        'title' => 'object_title',
        'company' => 'object_company',
        'notes' => 'object_notes'
    ),
    'search' => array(
        'name',
        'email'
    ),
    'strict' => array(
        'object_id'
    ),
    'public' => true,
    'readonly' => true,
    'admin' => array(),
    'export' => true
);

And then tweak imp/config/prefs.php a little bit.
(localsql is private addressbook)

$_prefs['search_sources'] = array(
    'value' => "localsql\tpublicsql",
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

$_prefs['search_fields'] = array(
    'value' => "localsql\tname\temail\npublicsql\tname\temail",
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);
*****************

I managed to copy the sql table 'turba_objects' to 'turba_public_objects' Only I don't know how to make a template for the 'turba/config/sources.php' which i should not edit because...

Last but not least in the php-code suggested is in the 'old-style' and I'm not sure how the 'new-style' is.
So that's we're I got stuck.
......

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
......