till wrote:
> On Tue, Oct 28, 2008 at 5:39 PM, Ziba Scott <[EMAIL PROTECTED]> wrote:
>
>> till wrote:
>>
>>>> In our environment, we have modified the autocomplete to do an ajax
>>>> request because we wanted to provide our users with a list of their
>>>> personal contacts combined with contacts pulled from a very large ldap
>>>> system. We have plenty of extra LDAP server muscle, so repeated queries
>>>> aren't a concern (and we're doing caching in php as a part of our patch).
>>>>
>>>>
>>> Do you want to provide your patch
>>>
>> I really, really do. Unfortunately, the ldap part of it is very
>> specific to our ldap schema. I will work on making it work for a more
>> generic ldap address book.
>>
>> To really make one patch work for both roundcube general and for people
>> like us with wacky addressbooks, I'd like to make it a patch against
>> devel-api and somewhere inside have a call to something like:
>>
>> $RCMAIL->plugins->exec_hook('addressbook-autocomplete', array('search
>> terms . . . .
>>
>> Then address books could implement that call. Then that hook could be
>> called either by ajax or to pre-populate the client like we do currently.
>>
>
> Making it an "action" sounds about right to me.
>
> Till
>
"Action" fits here very nicely, and that is indeed how we implemented
it. I've posted a patch against svn trunk here:
http://trac.roundcube.net/ticket/1485531
In short it has:
* A new action: mail/autocomplete.
* Javascript to call mail/autocomplete when appropriate
* A config. line for switching between server-side or the existing
client-side auto-complete.
* A config. line for specifying which addressbooks to search and in what
order
Let me know if you'd like something changed.
Thinking some time down the road, it might be nice to see the
mail/autocomplete action take advantage of devel-api. That is, if
addressbooks were reimplemented as plugins. Is that desirable? If so,
I'd be happy to work on that.
Addressbooks are pretty modular now, but we would love it if they were
even more so using the devel-api plugin interface. We've got a horde
read/write addressbook class. We haven't posted a patch for it because
we assumed it's not appealing to most roundcube users, but we'd love to
contribute it as a plugin for those who do care.
Thanks,
Ziba
University of Michigan
_______________________________________________
List info: http://lists.roundcube.net/dev/