Hi,
Using Mysql:
Create a new table in the Horde db (copy my code between the ### and safe as "turba_shared.sql". Then import using mysqlfront or phpmyadmin or whatever)
#################################################
USE `horde`;
CREATE TABLE `turba_public` (
`object_id` varchar(32) NOT NULL default '',
`owner_id` varchar(255) NOT NULL default '',
`object_type` varchar(255) NOT NULL default 'Object',
`object_members` blob,
`object_name` varchar(255) default NULL,
`object_alias` varchar(32) default NULL,
`object_email` varchar(255) default NULL,
`object_homeaddress` varchar(255) default NULL,
`object_workaddress` varchar(255) default NULL,
`object_homephone` varchar(25) default NULL,
`object_workphone` varchar(25) default NULL,
`object_cellphone` varchar(25) default NULL,
`object_fax` varchar(25) default NULL,
`object_title` varchar(255) default NULL,
`object_company` varchar(255) default NULL,
`object_notes` text,
`object_uid` varchar(255) default NULL,
`object_freebusyurl` varchar(255) default NULL,
`object_smimepublickey` text,
`object_pgppublickey` text,
PRIMARY KEY (`object_id`),
KEY `turba_owner_idx` (`owner_id`)
) TYPE=MyISAM;
/*!40101 SET NAMES latin1 */;
#################################################
Next, open /etc/psa-horde/turba/sources.php and add everything what I insered between the next ### after the last line of the file
#################################################
IF _(preg_replace('/^webmail./', '', $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']) ) = 'domain.com' {
$cfgSources['localsqlpublic'] = array(
'title' => _("Shared addressbook"),
'type' => 'sql',
'params' => array_merge($conf['sql'], array('table' => 'turba_public')),
'map' => array(
'__key' => 'object_id',
'__owner' => 'owner_id',
'__type' => 'object_type',
'__members' => 'object_members',
'__uid' => 'object_uid',
'name' => 'object_name',
'email' => 'object_email',
'alias' => 'object_alias',
'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('*@domain.com'),
'export' => true
);
}
##################################################
Change "*@domain.com" to your needs.
Now open in the same directory the prefs.php file and change it to the following:
// Default directory
$_prefs['default_dir'] = array(
'value' => 'localsql',
'locked' => false,
'shared' => true,
'type' => 'select',
'desc' => _("Default directory for your personal addressbook, contact lists, and searches.")
);
Now you have a shared adressbook. To restrict access only to one domain I have put it in a IF routine (I'll hope the syntax is ok, if not other readers may correct me)
...and don't forget to change all the 'domain.com' in the code !
Hope this will help you
Regards
Bart