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.