[horde] [turba]: a Cisco phone book for Horde Turba

Carsten horde-groupware at familie-lahme.de
Fri Mar 2 09:11:26 UTC 2018


As by my questions about this, here is the first working outcome of my 
Hopefully some one else can make use of it, too ;-)

Have fun and thanks for Your help on this!!


Am 01.03.2018 um 21:13 schrieb Jan Schneider:
> Zitat von Carsten <horde-groupware at familie-lahme.de>:
>> "recall" ;-)
>> I think, I found it:
>> https://dev.horde.org/api/FRAMEWORK_4/app/turba/class-Turba_Api.html
> This is from an older version of Horde, but it should still be the 
> same more or less.
>> At least there are the functions to call explained.
>> As far as I understand, I have to write some scripts in php with a 
>> hughe include statement to the horde libs.
> No, you can use the JSON API endpoint at /horde/rpc (or /horde/rpc.php).
>> And I also have to create a user for each phone, to get the correct 
>> phonebook for each, including the authentication in the php script.
> Not sure what you originally intended to do, since you stripped all 
> context from the reply.
>> If I get it right, the functions
>> "sources()" and "getContacts($source,$objectID)"
>> would then be the next things to call.
>> I would expect something like this (abstract):
>> foreach phonebook in sources()
>>  foreach contact in 
>> getContacts($phonebook,"object_firstname,object_lastname,object_homephone,object_workphone,[a.s.o]")
>>   print "Firstname: ". at contact['object_firstname']
>>   print "Lastname: ". at contact['object_lastname']
>>   print "Homephone: ". at contact['object_homephone']
>>   print "workphone: ". at contact['object_workphone']
>> [a.s.o]
>>  next
>> next
>> Am I correct?
> Sound about almost right. You would use the generic attribute names 
> though, not the mapped database column names. I.e. 'firstname', 
> 'lastname', 'homePhone' etc.
>> Quoting Carsten <horde-groupware at familie-lahme.de>:
>>>> If the user is to be able to have multiple address books, you MUST 
>>>> use the share system. I.e., 'use_shares' => true in $cfgSources. In 
>>>> that case, as you mention, turba_objects.owner_id is mapped to the 
>>>> share. What you are seeing when the turba_objects.owner_id is the 
>>>> horde username instead of a share_id - this is the user's original, 
>>>> default address book. The reasons for this are 
>>>> historical/backwards-compatibility/flexibility.
>>>> The database tables in Turba, and Horde in general, are not really 
>>>> designed to be accessed from outside applications. For that, you 
>>>> should be using the external API.
>>> Hi all,
>>> I see that some of you pointing out this "API".
>>> Could You point out the documentation about it, too, please?
>>> I have searched a while, but could not locate it.
>>> Even so, I rather talk to my SQL Server than to some other strange 
>>> abstraction layer, it maybe worth to have a look.
>>> thanks
>>> Carsten

More information about the horde mailing list