Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: corbosman on October 28, 2009, 03:42:19 PM

Title: addressbook in compose window
Post by: corbosman on October 28, 2009, 03:42:19 PM
Latest version of this plugin:  2.2  (only works with RC 0.4+,  use 1.5.1 for RC  0.3.1 and lower)

REQUIRED: jqueryui plugin  (http://underwa.ter.net/roundcube-plugins/)

Important information:  as of version 2.0 it's no longer necessary to configure addressbooks. Just comment out the $rcmail_config['compose_addressbooks'] and the plugin will autodetect all available addressbooks. If you dont want that, then add addressbooks manually.

This plugin is compatible with any other plugin that behaves like an addressbook. Just make sure you either comment out $rcmail_config['compose_addressbooks'] or add the extra addressbooks manually. The global addressbook for example is named 'global' and can be added as such:

$rcmail_config['compose_addressbooks'] = array('global', 'sql');

You can download the plugin here:  http://underwa.ter.net/roundcube-plugins/
Title: addressbook in compose window
Post by: SKaero on October 29, 2009, 02:45:28 AM
Sound like a good plugin, please publish it when you get done with it.
1. I would just have a setting for it
2. How about a alphabetical list (a|b|c|d|e|...) by First or Last name (maybe a setting to choice) its a great way to find some one quickly.
3. I think that is the simplest way to do it, you should have some sort of message to let the user know that the contacts where added so they don't get added twice.
Title: addressbook in compose window
Post by: corbosman on October 29, 2009, 04:09:50 AM
I definately want to publish it, thats why im asking feedback, to bring in as many things people would like. Im already as far as being able to click names and have them enter into one of the fields, so the actual bulk is done. It's just a matter of UI/presentation.

I'm not sure a first/last name would work, as many contacts only use 'name', and not first/last names. Like, the contact add button in the message display doesnt do anything with first/last name when it enters a contact.

I think im just going to start with a scroll list, and see what happens and sort it exactly like the normal adres book screen.
Title: addressbook in compose window
Post by: corbosman on October 30, 2009, 11:39:27 AM
I have a first beta version available of this plugin. If anyone wants to check it out, you can download it  here (http://wa.ter.net/download/compose_addressbook.tgz)

Some features:



I have tested this with Firefox 3, IE8, Safari 4, and Chrome. I welcome feedback, remarks, translations, bugreports, patches, additions, and anything else you can think of.

Known issues:

Title: addressbook in compose window
Post by: rosali on October 31, 2009, 02:18:32 AM
Good job! Here is the German localization (de_DE):



$labels = array();
$labels['compose_addressbook_buttontitle'] = 'Adressbuch anzeigen';
$labels['compose_addressbook_title'] = 'Adressbuch';
$labels['compose_addressbook_close'] = 'Schließen';
$labels['compose_addressbook_noselect'] = 'Sie haben keine Adresse ausgewählt';
$labels['compose_addressbook_added'] = 'Adresse wurde hinzugefügt';

?>


Regarding the icon, please mail to devs list. I always find a volunteer there when it comes to designing an image.
Title: addressbook in compose window
Post by: corbosman on October 31, 2009, 04:10:53 AM
Thanks for the translation!

I dont need a new icon. I want to use the existing task icon, but i need it bigger for the toolbar. It's a standard Thunderbird icon, but i cant find the source. I can find Firefox icon sources, but not Thunderbird.  I mailed the dev list about it a few days ago.
Title: addressbook in compose window
Post by: corbosman on October 31, 2009, 05:01:13 AM
I updated the plugin to version 0.2 to add the german translation and a bugfix.
Title: addressbook in compose window
Post by: SKaero on October 31, 2009, 05:50:06 AM
Thanks for releasing it :D I will try it out as soon as I get time. I have attached the address book icon in its 32x32 size. Hope its what you were looking for!
Title: addressbook in compose window
Post by: corbosman on October 31, 2009, 07:12:31 AM
Perfect! Exactly what I needed. Where did you find it? I really have to know :)

I'll update the tar to 0.3 soon and post a notice here. Gotta go for a long run first.
Title: addressbook in compose window
Post by: SKaero on October 31, 2009, 07:37:08 AM
The icons where made by Stephen Horlander and Kevin Gerich (http://kmgerich.com/) So I checked out were they had used there icons, and then took it out of the the Thunderbird skin files.
Title: addressbook in compose window
Post by: corbosman on October 31, 2009, 07:54:33 PM
Ive added the correct icon to the tar file, thanks. 0.3 now.
Title: addressbook in compose window
Post by: corbosman on November 01, 2009, 05:12:24 PM
I checked my plugin with 0.3.1, and it seems to work fine so I added it to the plugin repository as version 1.0
Title: addressbook in compose window
Post by: corbosman on November 09, 2009, 04:05:58 PM
I just released version 1.1 of this plugin. It fixes a problem with LDAP addressbooks.

You can get it here:  Downloads - roundcube-plugins - Project Hosting on Google Code (http://code.google.com/p/roundcube-plugins/downloads/list)
Title: addressbook in compose window
Post by: corbosman on November 21, 2009, 01:15:21 AM
Version 1.2 is now available. (http://code.google.com/p/roundcube-plugins/downloads/list). It adds a swedish translation provided by Joans Nasholm.

More translations are very welcome. Also, if you have any feature requests or remarks feel free to post here.

This plugin makes it much easier to add addressbook entries to your emails during composing by creating an addressbook window on request.
Title: addressbook in compose window
Post by: epinter on December 01, 2009, 04:31:43 PM
The plugin(version 1.2) don't work with ldap. I see only the contacts from SQL.
Title: addressbook in compose window
Post by: corbosman on December 07, 2009, 02:00:00 AM
Does 1.1 work? if so, I may have packaged the wrong version in 1.2.

In 1.1 i did some testing with ldap and it worked. But I have very rudimentary access to ldap, so I may have missed things. I could really use some help debugging the ldap code.

Im currently on a scuba diving expedition in papua new guinea, and wont be back with some kind of modern internet access until end of december. At that time I'll look at this if no one else has figured it out before then..
Title: addressbook in compose window
Post by: epinter on December 08, 2009, 07:02:52 AM
I think the problem is with the search... The program only calls listrecords method, but with ldap no records are returned. I think a true search must be implemented (for SQL and LDAP).


Quote from: corbosman;23701
Does 1.1 work? if so, I may have packaged the wrong version in 1.2.

In 1.1 i did some testing with ldap and it worked. But I have very rudimentary access to ldap, so I may have missed things. I could really use some help debugging the ldap code.

Im currently on a scuba diving expedition in papua new guinea, and wont be back with some kind of modern internet access until end of december. At that time I'll look at this if no one else has figured it out before then..
Title: can't get it to work !
Post by: cafeolai on December 08, 2009, 10:31:48 AM
Help !!  can't get the compose_addressbook to work !!  I am new with Roundcube/PHP.:confused:

I copied the whole 'compose_addressbook' folder under \plugins\
and  then I added
// which addressbook do we show. this can contain any addressbooks you use, including those set by plugins.
// by default it's the same as the autocomplete_addressbooks setting.

// $rcmail_config['compose_addressbooks'] = array('ldap');
// $rcmail_config['compose_addressbooks'] = array('sql', 'static');
$rcmail_config['compose_addressbooks'] = array('sql');

at the bottom of config\main.inc.php

anything else I need to do ??

Thanks for your help :)
Title: French Translation
Post by: cafeolai on December 08, 2009, 10:40:13 AM
If it helps..



$labels = array();
$labels['compose_addressbook_buttontitle'] = 'Afficher le Carnet d'Adresses';
$labels['compose_addressbook_title'] = 'Carnet d'Adresses';
$labels['compose_addressbook_close'] = 'Fermer';
$labels['compose_addressbook_noselect'] = 'Vous n'avez pas sélectionné d'adresse';
$labels['compose_addressbook_added'] = 'Adresse ajoutée';

?>
Title: addressbook in compose window
Post by: SKaero on December 08, 2009, 10:45:46 AM
Did you add the plugin to the plugins array in the [RC root]/config/main.inc.php?

Code: [Select]

$rcmail_config['plugins'] = array('compose_addressbook');
Title: addressbook in compose window
Post by: cafeolai on December 08, 2009, 10:54:26 AM
Thank you !!!!!!!!   Now it works !!!  :)
Title: addressbook in compose window
Post by: epinter on December 08, 2009, 11:20:02 AM
@corbosman
I did some improments in you great plugin (visual, ldap and sql search). Now the LDAP search is working fine. I think you can make this the 1.3 :).

I tested with RC r2602, it's working fine with LDAP and SQL (I have 2 LDAP databases working with RC).


Thank you for the plugin development, is a great feature for rcmail.
Title: Thank you
Post by: cafeolai on December 08, 2009, 11:29:57 AM
It works !!   Thank you very much for your help :)
Title: addressbook in compose window
Post by: siulee88 on December 16, 2009, 10:03:30 PM
hi

do u think your plugin can seach "global address book"?
thanx  :D
Title: addressbook in compose window
Post by: corbosman on December 19, 2009, 06:05:25 AM
Thanks epinter for your patch. I'll be back in civilization in a few days and will take a look at your patches. At first glance they look great! I'll post a 1.3 soon after.
Title: addressbook in compose window
Post by: siulee88 on December 22, 2009, 12:07:21 AM
Here is the Hong Kong and Taiwan localization (zh_TW):


$labels = array();
$labels['compose_addressbook_buttontitle'] = '顯示地址簿';
$labels['compose_addressbook_title'] = '地址簿';
$labels['compose_addressbook_close'] = '關閉';
$labels['compose_addressbook_noselect'] = '沒有選擇電郵地址';
$labels['compose_addressbook_added'] = '已加入電郵地址';

?>
Title: addressbook in compose window
Post by: corbosman on December 23, 2009, 07:07:26 AM
siulee88, in theory it should work with globaladdressbook. If it just behaves like a normal addressbook. You may have to define that plugin before mine though, and configure my plugin to use the global addressbook. Try adding 'global' to the list of used addressbooks.
Title: addressbook in compose window
Post by: corbosman on December 23, 2009, 07:17:20 AM
Quote from: epinter;23760
@corbosman
I did some improments in you great plugin (visual, ldap and sql search). Now the LDAP search is working fine. I think you can make this the 1.3 :).

I tested with RC r2602, it's working fine with LDAP and SQL (I have 2 LDAP databases working with RC).


Thank you for the plugin development, is a great feature for rcmail.


Hi, again thanks for your patch! Im not sure though I agree with some of the changes you made. I incorporated the visual changes as they're nice, but the main issue, LDAP support, is imho not the right way to do it.

I think by far the most people will not be using LDAP, but just the default SQL. Your changes now force them, and everyone else, to always have to enter a search to find any address. Originally, this wasnt necessary as you'd immediately get a list of all addresses and you could immediately double click one. Very fast, unlike your version imho.

Also, i think there must be a way to make it work with list_records. See, if you go to the normal addressbook task, top-right, it also shows a list with all your contacts without having to search right? This uses the list_records method as well. Id rather find out why this isnt working for you. For me it actually is, im using FreeLDAP.org to test, and im seeing all my contacts.

Maybe you can put some debug calls in the code and find out whats going on.

Regards,

Cor
Title: version 1.3 available
Post by: corbosman on December 24, 2009, 01:39:24 AM
I just upgraded the compose addressbook plugin to version 1.3 (http://code.google.com/p/roundcube-plugins/downloads/list). This includes a taiwanese translation and some ui fixes proposed in this thread by epinter.

There may be issues with using this plugin with ldap. I can as of yet not reproduce them. If you have issues with ldap addressbooks let me know in this thread.

Please submit translations as well. Now made even easier by going here (http://wa.ter.net/translator/index.php?plugin=compose_addressbook).
Title: addressbook in compose window
Post by: siulee88 on December 28, 2009, 07:01:34 PM
ok and thz, i will try it

Quote from: corbosman;24163
siulee88, in theory it should work with globaladdressbook. If it just behaves like a normal addressbook. You may have to define that plugin before mine though, and configure my plugin to use the global addressbook. Try adding 'global' to the list of used addressbooks.
Title: Global address book is normal can reveal
Post by: haocheng on January 09, 2010, 12:29:59 AM
Dear corbosman :

i according to your instruction , Add global on config  ,

$rcmail_config['compose_addressbooks'] = array('sql','global');

"global address book" is correct display is in compose _ addressbook
Title: addressbook in compose window
Post by: corbosman on January 09, 2010, 12:33:54 AM
So you're saying it works?
Title: addressbook in compose window
Post by: haocheng on January 09, 2010, 01:09:39 AM
Yes it is work
Title: addressbook in compose window
Post by: corbosman on January 10, 2010, 09:01:58 AM
Good to hear. I thought it would work as it's just a normal addressbook.
Title: addressbook in compose window
Post by: epinter on January 12, 2010, 06:25:29 AM
Quote from: corbosman;24164
Hi, again thanks for your patch! Im not sure though I agree with some of the changes you made. I incorporated the visual changes as they're nice, but the main issue, LDAP support, is imho not the right way to do it.

I think by far the most people will not be using LDAP, but just the default SQL. Your changes now force them, and everyone else, to always have to enter a search to find any address. Originally, this wasnt necessary as you'd immediately get a list of all addresses and you could immediately double click one. Very fast, unlike your version imho.

Also, i think there must be a way to make it work with list_records. See, if you go to the normal addressbook task, top-right, it also shows a list with all your contacts without having to search right? This uses the list_records method as well. Id rather find out why this isnt working for you. For me it actually is, im using FreeLDAP.org to test, and im seeing all my contacts.

Maybe you can put some debug calls in the code and find out whats going on.

Regards,

Cor


Good to know, you are open to suggestions. :)

I've done the search this way because I have a large email infrastructure (ISP). I have some domains with 2000/3000 email accounts (all accounts using LDAP). Imagine a large number of users getting 3000 addresses from LDAP to compose a message... I agree with you about the search, but only for small addressbooks... I don't think I'm the only using large addressbooks.

You can create an configuration option to control de behavior ...

When I click in my normal addressbook, I get a list of all records when I go to the SQL addressbook. But when I click in LDAP addressbook I need to search. My "filter" option in LDAP configuration is empty.


Cheers.
Title: addressbook in compose window
Post by: corbosman on January 12, 2010, 06:35:55 AM
Yeah, initially I also wondered about what to do about large addressbooks. I guess I could make it an option. Either you get your whole addressbook, or you have to search. I'll have to think about how to combine those 2.
Title: addressbook in compose window
Post by: ABerglund on January 25, 2010, 04:01:23 PM
I've been using this plugin for quite some time, but just added a global LDAP book over the weekend. I have not been able to get the LDAP book to show up in the compose window as the normal SQL book does. Any ideas?
Title: addressbook in compose window
Post by: corbosman on January 25, 2010, 04:49:24 PM
Ive had reports that LDAP doesnt work. Unfortunately I dont have access to LDAP except for a very basic free one that does work for me.

If you read the thread you'll see that there is a solution, but i havent been able to implement it. You could ask epinter to send you the patch he made, which will probably work for you.
Title: addressbook in compose window
Post by: ABerglund on January 25, 2010, 10:09:00 PM
OK, after playing with the config file parameter a bit, I got it working. I don't care for how the LDAP search returns entries that have matches in the middle of the string, but that's how RC does LDAP searches, even in the main address book. Has nothing to do with this plugin.
Title: addressbook in compose window
Post by: corbosman on January 25, 2010, 10:19:13 PM
Could you elaborate on what you changed? It might help others.
Title: addressbook in compose window
Post by: ABerglund on January 26, 2010, 12:08:20 AM
Might not help others, depending on their LDAP setup. I could not specify the LDAP directory by name, or by 'ldap'. A had to use:

Code: [Select]
$rcmail_config['compose_addressbooks'] = array('public_ldap');
Title: addressbook in compose window
Post by: corbosman on January 27, 2010, 07:07:43 AM
Hmm, interesting. Thats a new one for me. Wonder why it had to be called that. How did you found out?
Title: addressbook in compose window
Post by: ABerglund on January 27, 2010, 11:02:31 AM
Quote from: corbosman;24944
Hmm, interesting. Thats a new one for me. Wonder why it had to be called that. How did you found out?
Has to do with how I had to define the various LDAP directories I'm adding to my system, I suspect. Although it seems to me that I had to define it differently in your plugin than I did to put it in the main addressbook page.

I'll play around with it when I get time and confirm what it's doing.
Title: addressbook in compose window
Post by: bagu on February 01, 2010, 02:47:17 PM
Hello,

Nice plugin.
Here is the french translation :
Code: [Select]
<?php

$labels 
= array();
$labels['compose_addressbook_buttontitle'] = 'Afficher le carnet d\'adresse';
$labels['compose_addressbook_title'] = 'Carnet d\'adresse';
$labels['compose_addressbook_close'] = 'Fermer';
$labels['compose_addressbook_noselect'] = 'Vous n\'avez pas sélectionné d\'adresse';
$labels['compose_addressbook_added'] = 'Adresses ajoutées';

?>

Title: addressbook in compose window
Post by: corbosman on February 01, 2010, 05:44:20 PM
Thank you, i will update it when I get home. Im currently on an expedition photographing Sperm Whales in Dominica.
Title: addressbook in compose window
Post by: corbosman on February 05, 2010, 10:54:43 AM
There is a new version 1.3.1.

This is a minor update, only includes a new french translation thanks to bagu. I also got one emailed from Adrien, but they were sufficiently similar.

Get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: z3ntinela on February 05, 2010, 01:05:21 PM
Here is my Spanish translation :)


$labels = array();
$labels['compose_addressbook_buttontitle'] = 'Mostrar Contactos';
$labels['compose_addressbook_title'] = 'Contactos';
$labels['compose_addressbook_close'] = 'Cerrar';
$labels['compose_addressbook_noselect'] = 'No ha seleccionado ningún contacto';
$labels['compose_addressbook_added'] = 'Dirección añadida';

?>
Title: addressbook in compose window
Post by: corbosman on February 05, 2010, 01:10:06 PM
Thanks. If anyone has any more translations, please post them as well. It's easier to add multiple languages in 1 go. It's very easy to create a translation. Just go to the link below and select the language you'd like to translate from the dropdown box. It takes 1 minute for someone thats fluent in a specific language.

RoundCube Translator (http://wa.ter.net/translator/index.php?plugin=compose_addressbook)
Title: addressbook in compose window
Post by: bagu on February 05, 2010, 02:54:53 PM
If you add more plugin, i can translate them into french.
This way is easier for me than post in many subjet in the forum.

Thank for this tool
Title: addressbook in compose window
Post by: corbosman on February 05, 2010, 02:56:30 PM
All my plugins can be translated the same way. See this page: Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: bagu on February 05, 2010, 02:59:16 PM
Yes, but what i mean is if there is other plugin than yours (f.e. : myroundcube plugins) i would appreciate...But i don't know if it's possible.
Title: addressbook in compose window
Post by: corbosman on February 05, 2010, 03:04:36 PM
It's upto the authors of those plugins to handle translations. Maybe if the final plugin repository is launched, there will be some way to handle translations.
Title: addressbook in compose window
Post by: bagu on February 05, 2010, 03:51:32 PM
That's what i mean and expect ;)
Title: addressbook in compose window
Post by: rosali on February 06, 2010, 04:16:45 AM
Cor,

Could you please send me a zip of your online translator scripts. I know, there are on the Roundcube package anywhere. It would help me to save time just to adjust your scripts for MyRoundcube plugins.

myroundcube at mail4us dot net
Title: addressbook in compose window
Post by: corbosman on February 06, 2010, 08:06:55 AM
Sure, I'll send them your way. I got them from Phil Weir anyways, although I had to modify it a bit to make it work.

Im thinking of setting up an SVN repo for translations, so every plugin author could use my repo for translations and automatically have a modified version of this script be able to provide this translation service.
Title: addressbook in compose window
Post by: corbosman on February 14, 2010, 09:33:53 AM
I released version 1.3.2, this includes a spanish and polish translation, and a typo fix for the english translation

Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: lacri on February 22, 2010, 09:01:24 AM
thanks corbosman,

with the current RC svn drag and drop of compose addressbook dont work.

compose addressbook need jquery 1.3 with jquery 1.4 dont work.

a quick and dirty fix is search in program/include/rcube_template.php

$this->include_script('jquery-1.4.min.js');

and replace with

if($_GET['_action'] == 'compose')
            $this->include_script('jquery-1.3.min.js');
        else
            $this->include_script('jquery-1.4.min.js');

you need jquery-1.3.min.js in /program/js/ folder

I dont know how to solve it with the plugin api

its related to the jquery calender plugin.
Title: addressbook in compose window
Post by: bagu on February 25, 2010, 09:39:03 AM
Quote from: corbosman;25253
Thanks. If anyone has any more translations, please post them as well. It's easier to add multiple languages in 1 go. It's very easy to create a translation. Just go to the link below and select the language you'd like to translate from the dropdown box. It takes 1 minute for someone thats fluent in a specific language.

RoundCube Translator (http://wa.ter.net/translator/index.php?plugin=compose_addressbook)


when i submit new translation, it don't save the change.
i submit many time translation for listcommand, and nothing was saved.
Title: addressbook in compose window
Post by: rosali on February 25, 2010, 09:43:47 AM
You have to save the translation file locally and to mail it to the plugin author.
Title: addressbook in compose window
Post by: bagu on February 25, 2010, 09:52:54 AM
oh, so it's not so usefull then...

I believe it was saved automatically...
Title: addressbook in compose window
Post by: corbosman on February 25, 2010, 10:57:57 AM
of course it's not saved automatically. in no time idiots would fill it with translations of body parts and really funny bodily functions.

it just gives you an easy way to translate the strings. you mail the saved file to me, and i'll release a new version with updates translations
Title: server error! (ok)
Post by: jvp on March 05, 2010, 01:36:54 PM
using #57's work-around, i am getting the subject displayed, supra, in the page after every action taken. the compose part seems to work fine and it goes back to the 'sent' box and updates the mail pane to include the just-sent mail.

however, clicking from folder to folder on the main page neither reads the appropriate mail nor displays the mail within the pane ... which becomes blank. does anyone have a clue.

i am using 1.4.2.min jquery and going back to 1.3.min alleviates the problem.
Title: addressbook in compose window
Post by: corbosman on March 05, 2010, 02:49:43 PM
I uploaded a new version, 1.4.0. This fixes the drag problem of the window. This is due to a bug in the jquery plugin that I use. I fixed the bug, should work now for 1.4. No need to use a different jquery version.

Find it here:  Downloads - roundcube-plugins - Project Hosting on Google Code (http://code.google.com/p/roundcube-plugins/downloads/list?saved=1&ts=1267818361)
Title: addressbook in compose window
Post by: jvp on March 05, 2010, 08:11:05 PM
these are my plugins: array('admin_api','compose_addressbook')

it seems to have nothing to do with your plugin, but i cannot get 1.4, 1.4.1, or 1.4.2 to work as indicated previously. with 1.3 normal actions work just fine ... except for your pop-over which then does not read the book and is blank.
Title: addressbook in compose window
Post by: corbosman on March 06, 2010, 12:59:56 PM
You'd better put that in a different post, as it has nothing to do with my plugin I think and people may not see your questions now.
Title: addressbook in compose window
Post by: jvp on March 06, 2010, 05:26:46 PM
i agree there are >= 1.4  jquery problems, but everyone else is using 1.3 AND now going back to 1.3 and your plugin does not work.

so, yes, others should be warned that updating jquery past 1.3 will break much of roundcube. but, i believe -- until those problems are solved -- it seems judicious to make your plugin back-compatible with 1.3.
Title: addressbook in compose window
Post by: corbosman on March 06, 2010, 05:38:07 PM
Thats pretty easy, just dont upgrade to version 1.4 of my plugin. Use 1.3.2. You can download that here:

Downloads - roundcube-plugins - Project Hosting on Google Code (http://tinyurl.com/yjcka8t)
Title: addressbook in compose window
Post by: jvp on March 06, 2010, 06:22:11 PM
the problem with 1.3.2 is that you get the 'server error (ok)' and the pop-up also comes up blank ... while using jquery 1.3.

this is the problem. one cannot use anything beyond jquery 1.3 and have other things work and your plugin does not work with with 1.3. this make your plugin mutually exclusive with the rest of roundcube.
Title: addressbook in compose window
Post by: corbosman on March 06, 2010, 06:35:54 PM
Im confused as to what you're trying to do.

Im currently at SVN 3252, and at that version RC is using jquery 1.4.1. My 1.4.0 version of this plugin works there.  1.3.2 works there too, except that the dragging of the popup doesnt work. Im running this in production with about 20,000 people.

If you're at an older release, before RC started using jquery 1.4.x, you should probably use my 1.3.2 version, i havent tested what my 1.4.0 version does there. The difference between the 2 versions of my plugin is minor and can be seen here:  Diff of jqDnR.js r28 - roundcube-plugins - Project Hosting on Google Code (http://tinyurl.com/ybsbgvy)

If you are having problems with anything else than my plugin, like in your original post you mentioned not being able to read mail. That obviously has nothing to do with my plugin, and you should start a new thread so people can see whats up with it.
Title: addressbook in compose window
Post by: corbosman on March 06, 2010, 06:45:30 PM
Im confused as to what you're trying to do.

Im currently at SVN 3252, and at that version RC is using jquery 1.4.1. My 1.4.0 version of this plugin works there.  1.3.2 works there too, except that the dragging of the popup doesnt work. Im running this in production with about 20,000 people.

If you're at an older release, before RC started using jquery 1.4.x, you should probably use my 1.3.2 version, i havent tested what my 1.4.0 version does there. The difference between the 2 versions of my plugin is minor and can be seen here:  Diff of jqDnR.js r28 - roundcube-plugins - Project Hosting on Google Code (http://tinyurl.com/ybsbgvy)

If you are having problems with anything else than my plugin, like in your original post you mentioned not being able to read mail. That obviously has nothing to do with my plugin, and you should start a new thread so people can see whats up with it.
Title: addressbook in compose window
Post by: jvp on March 06, 2010, 06:48:05 PM
please pardon me. i am using the last stable release 0.3.1. i guess i should have been aware that your plugin only works with latest svn against the new 0.4.0.

i guess i will have to await the release of 0.4.0 to enjoy your plugin.

once again, i am sorry i did not catch the stage of development you were in earlier.
Title: addressbook in compose window
Post by: corbosman on March 06, 2010, 07:11:39 PM
My plugin works fine with release 0.3.1. I just tested it. I downloaded a fresh 0.3.1, then installed my 1.3.2 plugin. Works fine. Release 0.3.1 uses jquery 1.3.2. This is packaged with roundcube, in programs/js/jquery-1.3.min.js.

I also tested my 1.4.0 version on 0.3.1, works fine as well. I see no problems as you're describing.  That doesnt mean there arent problems, just that I dont see them. Do you get any errors in your error log?

Why are you trying to install jquery 1.4.2 on roundcube 0.3.1? That probably does not work at all, as roundcube may use features that are deprecated or not working in jquery 1.4.x.  With roundcube 0.3.1, you do not need jquery 1.4, and should be able to use my 1.4.0 version without problems.
Title: addressbook in compose window
Post by: jvp on March 06, 2010, 07:53:42 PM
i will reload a fresh 0.3.1 to double check. i downloaded some other plugins, but have not implemented any of them. perhaps something else outside the plugin dir got over-lain.

i do get the following error:
PHP Error: Failed to load config from /home/4ssl.us/web/box/plugins//compose_addressbook/config.inc.php (POST /box/?_task=mail&_action=plugin.get_addressbook?_task=&_action=)

although your .php calls for config.inc.php.dist, i made a copy as config.inc.php and this does not eliminate this error.

jquery versions:
when i saw #57's work-around, i just dropped in a link to 'jquery.latest.min.js' which is what i use to eliminate the need to change versions all over the place. the version was 1.4.2 and then i stepped back to 1.4.1 and 1.4.0 until i matched the #57 version. as explained, these did not work with what i have.
Title: addressbook in compose window
Post by: jvp on March 06, 2010, 11:13:57 PM
fresh 3.1 setup: blank addressbook pop-up.

[06-Mar-2010 20:08:57 -0800]: PHP Error: Failed to load config from /home/4ssl.us/web/box/3.1/plugins//compose_addressbook/config.inc.php (POST /box/3.1/?_task=mail&_action=plugin.get_addressbook?_task=&_action=)
Title: addressbook in compose window
Post by: corbosman on March 07, 2010, 05:13:36 AM
So, give it a config.php. And make sure you have addressbook configured in the plugin if you're not using the default sql one.

I get the error too, but im seeing my addressbook. The error shouldnt cause it to be empty.

Are you using ldap by any chance? There are problems with ldap that i havent fixed yet.
Title: addressbook in compose window
Post by: jvp on March 07, 2010, 02:21:28 PM
after creating the previously requested 'config.inc.php' file dupped from 'config.inc.php.dist'.

A.) suddenly there is a new folder structure. where once i had the std boxes plus added folders/subs on the same level, now all my old tree structure has been put under INBOX. there are now new std Drafts, Junk, Sent, and Trash and a bunch of new ones added [see the last eight (8) folders, infra]:
C: lmb LIST "" "*"
S: * LIST (\HasChildren) "." "INBOX"
S: * LIST (\HasChildren) "." "INBOX.Sent"
S: * LIST (\HasNoChildren) "." "INBOX.Sent.Sent - VF"
S: * LIST (\HasNoChildren) "." "INBOX.2secure-us"
S: * LIST (\HasNoChildren) "." "INBOX.VF"
S: * LIST (\HasChildren) "." "INBOX.webdev"
S: * LIST (\HasNoChildren) "." "INBOX.webdev.php"
S: * LIST (\HasNoChildren) "." "INBOX.MTA Notices"
S: * LIST (\HasNoChildren) "." "INBOX.vetsorders-com"
S: * LIST (\HasNoChildren) "." "INBOX.Junk"
S: * LIST (\HasNoChildren) "." "INBOX.ACCOUNTS"
S: * LIST (\HasNoChildren) "." "INBOX.Trash"
S: * LIST (\HasNoChildren) "." "INBOX.Drafts"
S: * LIST (\HasNoChildren) "." "Trash"
S: * LIST (\HasNoChildren) "." "Drafts"
S: * LIST (\HasNoChildren) "." "gnupg"
S: * LIST (\HasNoChildren) "." "spamassassin"
S: * LIST (\HasNoChildren) "." "usermin"
S: * LIST (\HasNoChildren) "." "tmp"
S: * LIST (\HasNoChildren) "." "Sent"
S: * LIST (\HasNoChildren) "." "Junk"
S: lmb OK List completed.

going to the settings⇒preferences⇒special folders panel shows only '--' without any drop-down, so the new folder tree does not seem to come through.

B.) here are the logged errors:
   1. IMAP Error: Authentication for *** user *** failed (LOGIN): "a001 NO [AUTHENTICATIONFAILED] Authentication failed." (GET *** doc path ***3.1/?_task=settings&_action=)
   2. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
   3. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
   4. IMAP Error: Authentication for *** user *** failed (LOGIN): "a001 NO [AUTHENTICATIONFAILED] Authentication failed." (GET *** doc path ***3.1/?_task=settings&_action=edit-prefs&_section=folders&_framed=1)
   5. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
   6. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
   7. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
   8. IMAP Error: Authentication for *** user *** failed (LOGIN): "a001 NO [AUTHENTICATIONFAILED] Authentication failed." (GET *** doc path ***3.1/?_task=settings&_action=edit-prefs&_section=folders&_framed=1)
   9. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
  10. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
  11. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
  12. IMAP Error: Authentication for *** user *** failed (LOGIN): "a001 NO [AUTHENTICATIONFAILED] Authentication failed." (GET *** doc path ***3.1/?_task=settings&_action=edit-prefs&_section=folders&_framed=1)
  13. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205
  14. PHP Warning:  fputs(): supplied argument is not a valid stream resource in *** full path ***3.1/program/lib/imap.inc on line 205

these errors resulted from my nosing about the settings to see what was going on with the folders.

C.) please note that the imap non-auth's, supra, are bogus since the front-end login, infra, for the user obviously succeeds.   C: a001 LOGIN "*** user ***" "*** encoding ***"
S: a001 NO [AUTHENTICATIONFAILED] Authentication failed.
S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
C: cp01 CAPABILITY
S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH STARTTLS AUTH=PLAIN AUTH=LOGIN
S: cp01 OK Capability completed.
C: a001 LOGIN "*** user@domain.tld ***" "*** login plain ***"
S: a001 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
however, subsequent auth's only use the auth=login method and fail since they do not follow-up with the auth=plain method.

C.) i still have the blank pop-list. i am not using ldap ... only the std sql. perhaps i am not seeing the sql results because you are using an api query hook that fails and the error is getting smothered.
Title: addressbook in compose window
Post by: corbosman on March 07, 2010, 02:29:42 PM
A and B and C1 have nothing to do with my plugin. I dont know why C2 doesnt work. It works fine for me and probably others or Id have heard about it. It works with RC 0.3.1.  I have no idea whats going on there.
Title: addressbook in compose window
Post by: jvp on March 07, 2010, 02:42:35 PM
i realize that much of what i reported has, seemingly, nothing to do with you. i am just letting you know what others must be seeing on a 'step-back' 3.1 install.

of course, cannot yet make your plugin work for my working version of 3.1 using jquery 1.3.2.min either.

just wondering, but would it not be easier for you to hook into the auto-complete code wherein the whole gamut of addressbook reading/parsing is already a done deal?
Title: addressbook in compose window
Post by: corbosman on March 09, 2010, 10:11:18 AM
I released a new version of this plugin, 1.5.0. This has a major new component. It is now possible to set two different modes of operation:

full      = as it was before. nothing different. this is the default
search = the popup window will be empty, and you need to search for addresses in the backend addressbook. This is especially useful for large LDAP setups or people with huge addressbooks.  

This should fix the issues that epinter noticed with his ldap setup. Let me know if this helps.

It can be found here:   http://underwa.ter.net/roundcube-plugins/
Title: addressbook in compose window
Post by: Seanster on March 17, 2010, 12:36:53 PM
I tried to set the config variable "compose_addressbooks" to use the global address list in addition to sql but it refused to show the global list.

After a lot of messing around I renamed the variable to "compose_addressbooks_list" and the problem was solved. Perhaps it's an issue with the variable having the same name as the plugin?

$rcmail_config['compose_addressbooks_list'] = array('sql', 'global');

I have an svn version from January & your 1.5 code.

I also added this little tidbit:

Code: [Select]

        if ($id == 'global') {
            $contacts[] = array('name' => '-* GLOBAL ADDRESSES *-', 'email' => '');
        } else if ($id == 'sql') {
            $contacts[] = array('name' => '-* PERSONAL ADDRESSES *-', 'email' => '');
        } else {
            $contacts[] = array('name' => '-* '.strtoupper($id).' ADDRESSES *-', 'email' => '');
        }

Title: addressbook in compose window
Post by: corbosman on March 17, 2010, 03:33:02 PM
Renaming it to 'compose_addressbooks_list' only 'fixed' it by accident. What happens is that my plugin is still looking for compose_addressbooks, and if it cant find it, it uses 'autocomplete_addressbooks. So right now it's using autocomplete_addressbooks from your global main.php.

If you set compose_addressbooks to the exact same value as autocomplete_addressbooks it should work. Someone else in this thread is doing that as well.
Title: Thx for nice plugin
Post by: freeman1doma on April 21, 2010, 09:02:55 AM
First of all to developer - thanks for super plugin )) It will be nice to see this plugin in future releases of rcube out of the box.

My conf:
last rcube 0.3.1
last compose addressbook plugin 1.5.0

For all who use portable LDAP address books: if you want have visible all of your ldap and personal books, variable $rcmail_config['compose_addressbooks'] in plugin config file must be such as

 $rcmail_config['compose_addressbooks'] = array('myldapbook1', 'myldapbook2', 'sql');

where myldapbook1,2 from variables $rcmail_config['ldap_public']['myldapbook1'] = array(...  in config/main.inc.php of rcube. Good luck!
Title: addressbook in compose window
Post by: Julius Caesar on April 27, 2010, 03:51:31 AM
@corbosman

This is a great plug-in.
I just have one request: Can you make this plug-in skin aware?
Title: addressbook in compose window
Post by: corbosman on April 27, 2010, 04:04:20 AM
Depends on what you mean with skin aware. If you mean having a skin directory inside my plugin, so the 1 css file I have can be changed depending on skin, that's not that hard. Is that what you mean?

Cor
Title: addressbook in compose window
Post by: Julius Caesar on April 27, 2010, 04:11:27 AM
Yes, just like I.E. the 'markasjunk' and the 'archive' plug-ins.

Of course I can change it myself, but it is better when the original is updated.
Title: addressbook in compose window
Post by: corbosman on April 27, 2010, 04:13:04 AM
Shouldnt be too difficult. I'll give it a go soonish.
Title: addressbook in compose window
Post by: corbosman on April 27, 2010, 05:16:25 AM
I just released version 1.5.1. This adds support for skins, and i added a section in the config.php.dist file that I forgot before. It allows you to set the mode parameter.

Please test the skin section, and let me know if it works. Seems to work with default skin :)

Get it here:  http://underwa.ter.net/roundcube-plugins/
Title: addressbook in compose window
Post by: Julius Caesar on April 27, 2010, 05:58:24 AM
Quote from: corbosman;27090
Please test the skin section, and let me know if it works. Seems to work with default skin :)

Just tested it, and the skin selection works.
Title: addressbook in compose window
Post by: Granada on April 28, 2010, 10:00:09 AM
It would be nice if the plugin would display address groups as introduced with RC0.4beta.

Apart from that it's a quite nice plugin! Keep up the good work!

Regards
Ruediger
Title: addressbook in compose window
Post by: bagu on April 28, 2010, 10:03:43 AM
Is there any way to get adresse AND groups when using this plugin ?
Thanks.
Title: addressbook in compose window
Post by: corbosman on April 28, 2010, 01:14:36 PM
As soon as I find time I'll add groups. I'll aim for this weekend.
Title: addressbook in compose window
Post by: bagu on April 28, 2010, 01:32:47 PM
Thanks a lot, it will be really usefull ;)
Title: addressbook in compose window
Post by: tim4dev on April 29, 2010, 10:05:41 AM
Here is the Russian localization ru_RU

Code: [Select]

<?php
// tim4dev

$labels = array();                   
$labels['compose_addressbook_buttontitle'] = '&#1055;&#1086;&#1082;&#1072;&#1079;&#1072;&#1090;&#1100; &#1072;&#1076;&#1088;&#1077;&#1089;&#1085;&#1091;&#1102; &#1082;&#1085;&#1080;&#1075;&#1091;';
$labels['compose_addressbook_title'] = '&#1040;&#1076;&#1088;&#1077;&#1089;&#1085;&#1072;&#1103; &#1082;&#1085;&#1080;&#1075;&#1072;';
$labels['compose_addressbook_close'] = '&#1047;&#1072;&#1082;&#1088;&#1099;&#1090;&#1100;';
$labels['compose_addressbook_noselect'] = '&#1042;&#1099; &#1085;&#1077; &#1074;&#1099;&#1073;&#1088;&#1072;&#1083;&#1080; &#1072;&#1076;&#1088;&#1077;&#1089;';
$labels['compose_addressbook_added'] = '&#1040;&#1076;&#1088;&#1077;&#1089;&#1072; &#1076;&#1086;&#1073;&#1072;&#1074;&#1083;&#1077;&#1085;&#1099;';

?>

Title: addressbook in compose window
Post by: corbosman on April 30, 2010, 12:59:01 PM
Question for those using this plugin.

Im working on address group support, and im wondering what to do with picking multiple groups, and having overlapping addresses in groups. Lets say you pick 2 groups

group1 { test@test.com, foo@bar.com }
group2 { foo@bar.com, xyzzy@bar.com }

What should I do? add foo@bar.com twice? Or once? Id say once, but then again, no where in RC does the code prevent you from adding the same address multiple times.

It's quite complicated to add this to my plugin. There is no core support for asking to expand multiple groups, as RC doesnt do it anywhere. And I also dont want to be doing a lot of ajax calls. Suppose I pick 85 groups I want to mail, I want to do 1 ajax call, and return the whole expanded set in 1 go. But, its getting there slowly..
Title: addressbook in compose window
Post by: corbosman on May 03, 2010, 09:21:34 AM
I just released version 2.0 of my plugin. This version is compatible with RC 0.4, and especially with address groups. Ive also changed how it grabs the addressbooks to use. You either configure it in the plugin's config.inc.php, or if you dont, it uses all available address books. Finally, I changed how it hooks into the compose window's toolbar. This used to be done through a template hook, but now I use add_button, as the developers have added a toolbar container to the compose window on my request.

All this combined makes for a rather large change in my plugin code. Hence the 2.0 version. It would be nice to get feedback, if things work as expected.

You can get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: ABerglund on May 03, 2010, 11:30:10 AM
Installed v.2.0 on my test install, now at 3588. Config'd to connect to a large global LDAP directory (~2k users) and Search as the behavior. Seems to work just fine in my initial testing. Will post back if I come across any bugs.
Title: addressbook in compose window
Post by: bagu on May 03, 2010, 01:28:17 PM
Work well for me.
Thanks again
Title: Service currently unavailable
Post by: alsyka on May 08, 2010, 06:11:54 PM
I installed compose_addressbook, and the icon show up, and the pop up address book appears, but I get an error message:

SERVICE CURRENTLY NOT AVAILABLE!
Error No. [500]

Help?:(
Title: addressbook in compose window
Post by: corbosman on May 08, 2010, 06:15:36 PM
did you use my plugin 2.0 on RC 0.3? That doesnt work.  2.0 works with 0.4 only. For 0.3 you need RC 0.3
Title: Version...
Post by: alsyka on May 08, 2010, 06:47:55 PM
Hi.. I am using 2.0 with 0.4.....



Quote from: corbosman;27332
did you use my plugin 2.0 on RC 0.3? That doesnt work.  2.0 works with 0.4 only. For 0.3 you need RC 0.3
Title: addressbook in compose window
Post by: corbosman on May 08, 2010, 06:52:50 PM
did you actually upgrade the SQL database as per the directions in the ugrading readme of RC 0.4?
Title: addressbook in compose window
Post by: alsyka on May 08, 2010, 07:38:24 PM
yes, that was updated.
Title: addressbook in compose window
Post by: alsyka on May 08, 2010, 09:16:42 PM
You hit it right on.. the mysql update did not take.. I manually updated it and now all works fine..

Thanks for your speedy replies.
Title: addressbook in compose window
Post by: corbosman on July 02, 2010, 03:52:45 AM
Does anyone think it's a problem if I replaced the current dialog window with the default jquery-ui dialog window?

In latest SVN versions my plugin doesnt work anymore due to an incompatibility between roundcube javascript and the modal plugin javascript. Instead of trying to fix someone elses plugin that hasnt been worked on in 2 years, i figured i might as well just move to the jquery dialog window.
Title: addressbook in compose window
Post by: rosali on July 02, 2010, 01:03:27 PM
IMO, it is a good idea to use jquery-ui.
Title: addressbook in compose window
Post by: corbosman on July 02, 2010, 01:07:31 PM
I wonder what happens if multiple plugins use different versions of jquery-ui :)
Title: addressbook in compose window
Post by: SKaero on July 02, 2010, 02:53:23 PM
Quote from: corbosman;28456
I wonder what happens if multiple plugins use different versions of jquery-ui :)

Firebug hell, good luck ;D
Title: addressbook in compose window
Post by: corbosman on July 02, 2010, 03:57:27 PM
I really think RC should provide jquery-ui from core, because plugins are starting to use jquery-ui and who knows what kind of weird interaction that gives if people end up using multiple (ancient) versions with badly managed plugins.

Maybe some hook where you can tell the core to load jquery-ui. Possibly even specifically for each sub library.

ps: in some other project I massively use jquery-ui and especially dialog, so I know it rocks, but at the time I wrote compose_addressbook I just happened to be using the one I use now in another project. so i'll just be moving it to jquery-ui and be done with it.
Title: addressbook in compose window
Post by: SKaero on July 03, 2010, 02:02:51 AM
I'm not a fan of JQuery UI but I agree with you that it should be part of the core because so many plugins do use it.
Title: addressbook in compose window
Post by: rosali on July 03, 2010, 09:20:17 AM
Why not to have a plugin for that?

On startup hook:

      $rcmail = rcmail::get_instance();
      $skin = $rcmail->config->get('skin');
      $this->include_stylesheet('skins/' . $skin . '/jquery-ui-1.8.2.custom.css');
      $this->include_script('jquery-ui-1.8.2.custom.min.js');
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 10:17:26 AM
Heh, I was just thinking the same rosali. Would be nice if the plugin had hooks to load specific sub elements of jquery-ui, but i suppose it's not a big deal.

You do it or shall i do it? :)
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 10:19:33 AM
I just released a new version 2.1 of compose_addressbook. I have moved from jqmodal to jquery-ui dialog. This meant quite a few changes, so some testing would be nice. I have tested it on FF, safari, chrome, IE and it seems to all work fine.

Also a small bugfix for search mode. It always added address groups even in search mode. Fixed.

You can get it here:  http://underwa.ter.net/roundcube-plugins/
Title: addressbook in compose window
Post by: rosali on July 03, 2010, 10:28:41 AM
It would be great if you code the plugin to include jquery stuff. Do you really think it makes a big performance difference not to include the whole bundle?
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 10:45:02 AM
I think i wont worry too much about what to include. Im just going to include the whole bundle, effects and all.
Title: addressbook in compose window
Post by: ABerglund on July 03, 2010, 11:52:12 AM
Quote from: corbosman;28482
I just released a new version 2.1 of compose_addressbook. I have moved from jqmodal to jquery-ui dialog. This meant quite a few changes, so some testing would be nice. I have tested it on FF, safari, chrome, IE and it seems to all work fine.

Also a small bugfix for search mode. It always added address groups even in search mode. Fixed.

You can get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Seems fine in my pre-production test environment, set for Search mode on a 2000 user LDAP. I like the appearance better, too.
Title: addressbook in compose window
Post by: rosali on July 03, 2010, 12:44:44 PM
It does not work nice for me (IE8, FF3.6.3). Jquery dialog buttons overlap search box. Also there are scrollbars in the dialog div.
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 04:12:36 PM
I noticed that as well, but only if I had set IE8 in IE7 compatibility mode. If I set it to be normal IE8, it worked for me. I'll play with it some more later to see whats going on with that mode.
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 04:14:18 PM
Would it be strange if the search box was on top of the div instead of the bottom?
Title: addressbook in compose window
Post by: ABerglund on July 03, 2010, 04:40:36 PM
Quote from: corbosman;28489
Would it be strange if the search box was on top of the div instead of the bottom?
I think I would prefer it that way.
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 05:34:54 PM
Rosali, im surprised you have a problem with FF. Although I dont have 3.6.3, but 3.6.4/5/6 work ok it seems.

Anyways, could you try if this fixes the scrollbar?

#compose_addressbook_container {
  height: 365px;
  overflow: auto;
  overflow-x: hidden;
}

Should be changed in skins/default/compose_addressbook.css , i added the overflow-x.

I cant reproduce the overlap :(  Hmm, maybe a font issue?
Title: addressbook in compose window
Post by: corbosman on July 03, 2010, 06:45:14 PM
Just to see if this works, is this any better. Has search on top, and some css changes.

http://wa.ter.net/download/compose_addressbook-2.11.tgz
Title: addressbook in compose window
Post by: ABerglund on July 03, 2010, 09:40:37 PM
Quote from: corbosman;28492
Just to see if this works, is this any better. Has search on top, and some css changes.

http://wa.ter.net/download/compose_addressbook-2.11.tgz
The Copy and BCC buttons don't work for me - Safari 5 on Mac.

Edit - Just retested 2.1 - same there, no Copy or BCC function.
Title: addressbook in compose window
Post by: rosali on July 04, 2010, 01:08:48 AM
v2.11 looks fine to me.

Edit: I got cs_CZ translation from a user:


$labels = array();
$labels['compose_addressbook_buttontitle'] = 'Zobrazit adresář';
$labels['compose_addressbook_title'] = 'Adresář';
$labels['compose_addressbook_close'] = 'Zavřít';
$labels['compose_addressbook_noselect'] = 'Nevybral(a) jste adresu';
$labels['compose_addressbook_added'] = 'Adresy byly přidány';
?>
Title: addressbook in compose window
Post by: corbosman on July 04, 2010, 05:43:57 AM
Arne, let me guess, thats the latest SVN?  There is something around 3798 that seems to mess things up. At 3797 it works fine for me on safari 5 on mac.
Title: addressbook in compose window
Post by: corbosman on July 04, 2010, 06:09:14 AM
Actually Arne, I cant reproduce this. I have Safari on a mac as well, and for me it works fine with latest SVN.  What version of RC are you using?
Title: addressbook in compose window
Post by: corbosman on July 04, 2010, 07:44:33 AM
Rosali, I think something simple like this would work. Since you also use it for your calendar plugins, just want to make sure this would work for you. This includes the whole jquery UI package, and im using the smoothness theme since I think it looks almost identical to the roundcube default theme.


class jqueryui extends rcube_plugin
{
 
  public function init()
  {    
    $this->add_hook('render_page', array($this, 'add_jqueryui'));
  }
 
  function add_jqueryui($args)
  {
    $skin_path = $this->local_skin_path();
   
    // jquery UI
    $this->include_script('js/jquery-ui-1.8.2.custom.min.js');
 
    // jquery UI stylesheet
    $this->include_stylesheet("$skin_path/css/smoothness/jquery-ui-1.8.2.custom.css");
  }
}
Title: addressbook in compose window
Post by: rosali on July 04, 2010, 07:56:40 AM
Thanks, this will do the job.

Do you have any idea how to solve css conflicts on a top level way? F.e. keyboard_shortcuts uses the darkness theme and I like that. Your compose_addressbook and my calendar plugin use smoothness theme.

I have no idea how to solve it on a top level. Currently I decide what css is included by checking _task / _action. There must be a way to change the css on the client side by js. But I'm not very skilled in js ...
Title: addressbook in compose window
Post by: corbosman on July 04, 2010, 08:17:09 AM
I think we should pick a default theme as the general theme. I think that should be smoothness as it's very very close to default RC theme.

If a plugin wants to use a different theme, I think it's possible by overriding the theme with their own, like this:

(http://grab.by/5ghu)

They can download their theme, and in advanced settings provide a scope. In this example I added the scope '.keyboard_shortcuts'. Then, the plugin would need to add the class .keyboard_shortcuts' to all their UI elements. Then they add that css from their own plugin.

I havent tested this, but this is how you should do this according to the jquery site.
Title: addressbook in compose window
Post by: corbosman on July 04, 2010, 08:37:51 AM
Ok, I have tested this at it seems to work at least for my specific test. I downloaded a jquery-ui theme with scope 'compose_addressbook_ui', and then added this to the dialog javascript:

dialogClass: 'compose_addressbook_ui'

And now my dialog uses the ui-lightness theme instead of smoothness, even though both themes are loaded. I can see in firebug that my dialogs are using the lightness scope (.compose_addressbook_ui .ui_dialog ... ) and are overriding the smoothness theme.

Im not sure about other jquery-UI elements, but as long as you can provide a class to your UI elements, you can use this method.

(http://grab.by/5ghQ)
Title: addressbook in compose window
Post by: corbosman on July 04, 2010, 09:14:38 AM
I've released the jqueryui plugin, here's the thread:

http://www.roundcubeforum.net/7-third-party-contributions/46-api-based-plugins/6959-jquery-ui-roundcube-plugins.html
Title: addressbook in compose window
Post by: ABerglund on July 04, 2010, 11:52:25 AM
Quote from: corbosman;28502
Arne, let me guess, thats the latest SVN?  There is something around 3798 that seems to mess things up. At 3797 it works fine for me on safari 5 on mac.


Quote from: corbosman;28503
Actually Arne, I cant reproduce this. I have Safari on a mac as well, and for me it works fine with latest SVN.  What version of RC are you using?
Actually, I'm holding my almost-production system at r3786, until the compose window/attachment bug in the newer releases (Safari5 on Windows) is corrected. I do have a later SVN I can test on, but I'm having some problems today VPNing into the network core. I'll try on the newer version when I get a chance.
Title: addressbook in compose window
Post by: ABerglund on July 04, 2010, 12:22:10 PM
Duplicate post deleted.
Title: addressbook in compose window
Post by: corbosman on July 07, 2010, 04:25:50 AM
rosali, can you mail me the cs_CZ translation? I cant cut/paste those characters. I dont want to run the risk that they get mangled in copying.

cor at in.ter.net
Title: addressbook in compose window
Post by: corbosman on July 07, 2010, 04:30:15 AM
I just released version 2.2 of this plugin with some layout changes.  IMPORTANT: this version depends on the jqueryui plugin, which you can get at the same download link

Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: rosali on July 07, 2010, 04:55:30 AM
Sure, I'll mail you the file.
Title: addressbook in compose window
Post by: martook on July 07, 2010, 08:26:43 AM
Thanks for the plugin, but it might be a good plan to add to the README that admins have to download the jqueryui plugin as well if they want this one to work... took me a while to figure out :)

Also, I can only add recipients, the copy and bcc buttons don't work for me.
Title: addressbook in compose window
Post by: corbosman on July 07, 2010, 10:07:17 AM
Ah yeah, totally forgot I moved to the jqueryui plugin :) thanks, i'll add that now.
Title: addressbook in compose window
Post by: rosali on July 07, 2010, 10:43:57 AM
Cor, you still bundle the js folder. This should not be necessary anymore. Did you receive the cs_CZ file?

@martook: Do you use recent Roundcube SVN version?
Title: addressbook in compose window
Post by: corbosman on July 07, 2010, 10:55:25 AM
martook, for version 2.2 you need a recent SVN because roundcube renamed some internal functions.

I did get the cs_CZ, it'll be included in the next version. Also, next version wont have the js files bundled.
Title: addressbook in compose window
Post by: ABerglund on July 07, 2010, 01:32:37 PM
Quote from: corbosman;28619
martook, for version 2.2 you need a recent SVN because roundcube renamed some internal functions.
Version 2.21 works fine in r3802+. Unfortunately, I'm still sitting on r3785 for my production instance, as I have numerous people using Safari for Windows and can't lose the attachment upload for them. See #1486823 (Upload form disapears when user selects a file on Safari) ? Roundcube Webmail (http://trac.roundcube.net/ticket/1486823)
Title: addressbook in compose window
Post by: corbosman on July 07, 2010, 02:15:44 PM
Hmm, wonder if i'll get complaints about that as well.  Im running 3803 in production now ;) Living on the edge of chaos.

The problem im having lately is that a few changes inside RC itself are limiting my own reach of versions. Like, for some reason they changed a function called rcmail_show_header_form() (that opens up the CC/BCC forms), to rcmail_ui.show_header_form(). So my versions then get limited to specific SVN versions.  Hoping for a 0.4-stable soon so i can lock a version into place.

You may want to try out slightly older versions if things arent working.
Title: addressbook in compose window
Post by: ABerglund on July 07, 2010, 03:57:55 PM
Yeah, I've got version 1.5 running fine in my "production" instance (we don't actually go live with it until this weekend). Unless they fix that bug tomorrow, that's where I'll stay until 0.4-stable is released.
Title: addressbook in compose window
Post by: martook on July 08, 2010, 07:13:56 AM
Quote from: rosali;28617
@martook: Do you use recent Roundcube SVN version?



Ah, that explains it, I'm running the 0.4b from the front page.


Guess I should get an older version of the plugin then, I suppose running SVN version isn't really a great idea for a production server? =)
Title: addressbook in compose window
Post by: dziobak on July 09, 2010, 05:27:01 AM
1. This plugin could check if in every addressbook are the same contacts and display only one.
OR
2. It would be nice if in this plugin the will be section for addressbook, so I will know if a contact is in global addressbook or in personal addressbook

I think #2. would look better :)
Title: addressbook in compose window
Post by: corbosman on July 09, 2010, 05:34:02 AM
#1 is trivial. I asked about that before in this thread but got no response :)

I can easily weed out doubles, so if thats what people want, thats fine with me.

#2 is not so easy, and not really what i intended this plugin to be for. Who cares what addressbook a contact is in?
Title: addressbook in compose window
Post by: dziobak on July 09, 2010, 08:02:48 AM
#2. What for? In global addressbook you have official "company" address, in personal you have to person from "company" and in automatic you have somebody from "company" you have send email. Now search with domain name and you get crazy :D
Title: addressbook in compose window
Post by: corbosman on July 11, 2010, 02:21:42 AM
I just dont see a way to make it look nice separating the different addressbooks (and remember, a user may have 15 addressbooks).  The list of addresses is a roundcube internal list.js based list object, which allows for a consistent UI experience. I dont think I can make addressbook headers for each addressbook without a huge hassle.

I will remove duplicates, and you'll just have to know if you want to mail george, obama or bill.

Cor
Title: addressbook in compose window
Post by: jeffshead on July 28, 2010, 03:20:24 AM
Copy and bcc do not work with 0.4-beta from front page.
Title: addressbook in compose window
Post by: SKaero on July 28, 2010, 03:44:38 AM
It only works with the SVN.
Title: addressbook in compose window
Post by: rosali on July 28, 2010, 03:45:50 AM
The width setting of 285px for the addressbook dialog box in
compose_addressbook.js is too small. F.e. German localization wraps the
dialog buttons and they overlap addressbook rows at the bottom of the
box.
350px for German localization is fine. Do you have an idea how to
calculate the width dynamically?
Title: addressbook in compose window
Post by: corbosman on July 28, 2010, 04:06:53 AM
Jeffshead, you could try a slightly older version. The latest version needs a recent SVN because of modifications in the roundcube JS library.

I think a dynamic width is very hard, if not impossible. An idea might be to make the button font smaller. Maybe 10px.
Title: Default Behavior?
Post by: guitmanjo on July 28, 2010, 02:16:02 PM
I'm new to Roundcube and have installed the 0.3.1 stable version online for family use (figured it was the safest route, I don't have time or knowledge to provide much tech support). I've installed the 1.5.1 version of Compose Addressbook, and it's a great plugin ... does everything I want, except I assumed the address list would self populate. My installation requires me to do a search for the addresses to show up in the window. (I'm using SQL addressbook setting w/ RC).

Is this default behavior, or is there something wrong with my setup? If it's default, can I cause the window to self-populate w/o a search?

Thanks in advance.
Title: addressbook in compose window
Post by: corbosman on July 28, 2010, 04:23:04 PM
This is a config setting. By default it should auto-populate. Make sure you set:

$rcmail_config['compose_addressbook_mode'] = 'full';
Title: addressbook in compose window
Post by: guitmanjo on July 29, 2010, 08:12:39 AM
Quote from: corbosman;29010
This is a config setting. By default it should auto-populate. Make sure you set:

$rcmail_config['compose_addressbook_mode'] = 'full';

Thanks, that worked. I had it set to 'sql' thinking it had to match the RC addressbook setting.
Title: addressbook in compose window
Post by: jeffshead on July 29, 2010, 11:48:08 AM
Quote from: skaero;28992
It only works with the SVN.


Thanks.

Got it to work with trunk-r3836 (http://www.roundcubeforum.net/6-svn-releases/19-svn-discussion/3921-d-l-latest-svn.html).
Title: addressbook in compose window
Post by: corbosman on August 01, 2010, 06:39:54 AM
I have released version 3.0. This version should be compatible with the upcoming 0.4-stable release which is scheduled for wednesday.  

You can get it here: Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: talvins on September 30, 2010, 11:51:51 AM
Hi,

I've just installed your plugin on my 0.4-stable (and jqueryui plugin, activated too) but nothing works. I only saw the address book when I click on addres book icon.
My AB is SQL, so I choose
$rcmail_config['compose_addressbooks'] = array('sql');
and
$rcmail_config['compose_addressbook_mode'] = 'full';

- doubleclick to quickly add a contact to your To field : doesn't work.
- select multiple contacts and click one of the buttons to add to the
  specific field : none contact shown
- config option lets you select which addressbooks to use : nothing like this
- use the search field to search in your addressbook : nothing appears

Thanks.
Title: addressbook in compose window
Post by: corbosman on September 30, 2010, 05:28:53 PM
It's supposed to only work when you click on the addressbook button.  The rest does work for many people, so i need more information. Which version of my plugin, what OS and browser/version.
Title: addressbook in compose window
Post by: talvins on October 01, 2010, 03:28:20 AM
Debian Lenny, Version 3.0, RC 0.4.1.
Title: addressbook in compose window
Post by: corbosman on October 01, 2010, 04:27:59 AM
What browser and browser version?
Title: addressbook in compose window
Post by: serg_b on October 01, 2010, 07:59:26 AM
Hi all.

Here is ru_RU translation for this plugin.



$labels = array();
$labels['compose_addressbook_buttontitle'] = 'Показать адресную книгу';
$labels['compose_addressbook_title'] = 'Адресная книга';
$labels['compose_addressbook_close'] = 'Закрыть';
$labels['compose_addressbook_noselect'] = 'Вы не выбрали адресата';
$labels['compose_addressbook_added'] = 'Адресат добавлен';

?>


Thanks a lot for plugin.
Title: addressbook in compose window
Post by: corbosman on October 29, 2010, 09:40:00 AM
I released a new version 3.1 for use with RC 0.4.2 and up. Do not use this with versions below 0.4.2. This version fixes a minor issue related to changes in RC.

Get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: paZ on November 14, 2010, 09:08:52 PM
hi,
i try your plugins and is a very good idea, but seems not work for me.
When I write a new message and i go to Address Book the link change
from:
http://xxxxx.xxx/mail/?_task=mail&_id=XXXXXXXXXXXXXX&_action=compose
to:
http://xxxxx.xxx/mail/?_task=mail&_id=XXXXXXXXXXXXXX&_action=compose#

i successufully add the address but I can't send the message, i click all the buttons but any work for me.

OS: ubuntu 10.10
browser: firefox 3.6.1best regards2
RC: 0.4.2
plugins: compose_addressbook-3.1

nicola

Edit:
btw i attach the translation of the plugin in Italian :)
Title: addressbook in compose window
Post by: corbosman on November 14, 2010, 10:30:54 PM
With 0.4.2, use compose_addressbook-3.0, not 3.1. The 3.1 version works only with recent development versions.
Title: addressbook in compose window
Post by: paZ on November 15, 2010, 01:54:03 PM
thanks!! works!!
Title: addressbook in compose window
Post by: chichi on November 25, 2010, 09:11:08 AM
With 0.4, I use compose_addressbook-3.0, not 3.1.

No actions on the Icon-Link :confused:

I added this to main.inc.php

// List of active plugins (in plugins/ directory)

$rcmail_config['plugins'] = array();
$rcmail_config['plugins'] = array('jqueryui');
$rcmail_config['plugins'] = array('compose_addressbook');

and placed both folders (adressbook and jqueryui) to the plugin-folder

How can I get it working.
Title: addressbook in compose window
Post by: SKaero on November 25, 2010, 10:43:31 AM
Your $rcmail_config['plugins'] array in /config/main.inc.php should be:
$rcmail_config['plugins'] = array('jqueryui', 'compose_addressbook');  
Title: addressbook in compose window
Post by: chichi on November 26, 2010, 06:44:15 AM
Thank you, this works fine.
Title: 0.5 beta
Post by: acolson on December 14, 2010, 12:53:55 PM
Anyone got compose_addressbook working on 0.5beta or advice on how to debug?

Thanks!
Title: addressbook in compose window
Post by: corbosman on December 15, 2010, 02:38:32 AM
So i take it the latest version doesnt work?  What goes wrong? I havent had time to install 0.5 beta yet
Title: addressbook in compose window
Post by: acolson on December 15, 2010, 02:47:05 AM
Correct. I installed compose_addressbook-3.1.tgz and jqueryui-1.8.2.1.tgz. Renamed the config files in both plugins. Added jqueryui and compose_addressbook to the plugin list (jqueryui first) but the icons are just not showing up.
Title: addressbook in compose window
Post by: ABerglund on December 17, 2010, 07:03:18 PM
I have version 3.1 running in both my production 0.4.2, and in today's 0.5-rc. The plugin works on 0.5-rc, but there is a bug.

When you click the button, you get the warning that you are leaving the compose window! (See attached) Obviously, if you cancel nothing happens. If you click OK, you do NOT leave the compose window, but instead the addressbook search opens.

Once past the false alarm warning dialog, it works as expected.
Title: addressbook in compose window
Post by: corbosman on December 18, 2010, 05:19:24 AM
This is due to changes in RC core. They now want you to add your buttons to a list of compose buttons, just to keep us plugins developers on our toes.

I'll upload a new version soon.
Title: addressbook in compose window
Post by: corbosman on December 18, 2010, 05:33:20 AM
I uploaded version 4.0 of this plugin that should work with 0.5rc.

Get it here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: splitti on December 18, 2010, 02:31:43 PM
Works perfect for me. :) Thanks for the great plugin!
Title: addressbook in compose window
Post by: ABerglund on December 18, 2010, 03:03:07 PM
I can confirm - 4.0 works with 0.5-rc as intended.
Title: addressbook in compose window
Post by: roentgen on March 13, 2011, 08:13:39 AM
Hi.

I'm using the latest svn RC and inserting addresses is not working anymore.

It puts something like 'First Last <>' into the TO field.

Thanks!
Title: addressbook in compose window
Post by: sckramer on March 29, 2011, 10:20:46 AM
confirmed that it shows Username <> in the current svn, had to disable the plug-in for now, please update :) people miss it

Thanks!
Title: addressbook in compose window
Post by: corbosman on March 30, 2011, 05:43:28 AM
RC keeps changing everything :) A nightmare for plugin authors.

Ive got a beta version of the compose_addressbook plugin that should work with svn but ive not tested in thoroughly. 0.6 adds a much expanded vcard/contact database, so I had to modify the plugin to use that. Im mirroring the behavior of RC itself. For instance, if you add a group, and the group contains contacts with multiple addresses, it only adds the first email address.

Get the latest beta version here:  Roundcube Plugins | Underwater World (http://underwa.ter.net/roundcube-plugins/)
Title: addressbook in compose window
Post by: roentgen on April 28, 2011, 12:41:14 PM
Seems to be working fine so far here with the 0.6 beta.
Thanks.
Title: addressbook in compose window
Post by: jeffshead on May 02, 2011, 03:26:07 PM
Quote from: sckramer;33961
confirmed that it shows Username <> in...


Can you please provide a fix for 0.5.2?
Title: addressbook in compose window
Post by: corbosman on May 02, 2011, 04:45:01 PM
Did you try the latest version to see if it works?
Title: addressbook in compose window
Post by: jeffshead on May 02, 2011, 04:58:54 PM
Quote from: corbosman;34561
Did you try the latest version to see if it works?


Do you mean try compose_addressbook-5.0beta1.tgz with RoundCube 0.5.2 or try RoundCube 0.6?

I did not want to use RC 0.6 because I believe some of the other plugins I use have not been updated to work with 0.6.

I did not try compose_addressbook-5.0beta1.tgz with RoundCube 0.5.2 because of your warning (only use with roundcube 0.6 svn+, do NOT use with roundcube 0.5.x)
Title: addressbook in compose window
Post by: corbosman on May 02, 2011, 05:00:53 PM
You can try compose_addressbook-5.0beta1.tgz to see if it works for 0.5.2. Probably not.

and compose_addressbook-4.0 doesnt work?  What's not working?
Title: addressbook in compose window
Post by: ABerglund on May 02, 2011, 05:06:32 PM
compose_addressbook-4.0 is working for me just fine in roundcube 0.5.2.
Title: addressbook in compose window
Post by: jeffshead on May 02, 2011, 05:29:08 PM
Quote from: corbosman;34568
You can try compose_addressbook-5.0beta1.tgz to see if it works for 0.5.2. Probably not.

and compose_addressbook-4.0 doesnt work?  What's not working?


When using the 'compose_addressbook-4.0.tgz' with RC 0.5.2 trunk 4713, I have the same issue as others. When I select someone from the address book, it adds Displayname<> to the To field. It does not add the email address.

I just tested 'compose_addressbook-5.0beta1.tgz' with RC 0.5.2 trunk 4713 and that seems to have fixed that particular issue but I'm wondering if any other issues will become evident since this version is designed for RC 0.6.
Title: addressbook in compose window
Post by: corbosman on May 02, 2011, 05:35:55 PM
4713 is newer than 0.5.2 (4699). You must have gotten 0.6 beta code, because the only changes between 4.0 and 5.0 of my plugin are vcard changes that were done in RC 0.6. If 5.0beta1 works, then you're safe to use it.
Title: addressbook in compose window
Post by: jeffshead on May 02, 2011, 06:00:25 PM
Quote from: corbosman;34576
4713 is newer than 0.5.2 (4699). You must have gotten 0.6 beta code, because the only changes between 4.0 and 5.0 of my plugin are vcard changes that were done in RC 0.6. If 5.0beta1 works, then you're safe to use it.


Thanks! I'll keep testing.
Title: addressbook in compose window
Post by: corbosman on May 10, 2011, 02:33:33 AM
I uploaded a new version of compose_addressbook, 5.0b2 that uses roundcube's version of jqueryui instead of my version by requiring it as per the new plugin_require function. No need to configure jqueryui in the main config anymore. Remember to stop using my jqueryui plugin, and use the one from roundcube core instead!

You can get the new compose_addressbook here:  Downloads - roundcube-plugins - Roundcube Plugins - Google Project Hosting (http://code.google.com/p/roundcube-plugins/downloads/list)
Title: addressbook in compose window
Post by: ABerglund on May 10, 2011, 11:10:33 AM
Quote from: ABerglund;34570
compose_addressbook-4.0 is working for me just fine in roundcube 0.5.2.
Just a quick note - while compose_addressbook-4.0 does function for me in RC 0.5.2, further testing has revealed one anomaly. Once the "Loading..." dialog drops down when the search begins, it never goes away throughout the remainder of the compose session.

I'm not certain if this is strictly a compose_addressbook issue, or part of a larger bug in RC 0.5.2. In general, I see a lot more "Loading", "Moving" and "Deleting" dialogs that are reluctant to go away in RC 0.5.2. And I've already gone into the code and disabled a few of the dialog prompts.

EDIT - I think this is in RC, not the plugin. I get the hanging "Loading..." too often in other places as well.
Title: addressbook in compose window
Post by: corbosman on May 10, 2011, 06:34:21 PM
Try version 4.1, is that better?
Title: addressbook in compose window
Post by: corbosman on May 10, 2011, 06:40:02 PM
Oh, btw, it is the plugin. Multiple plugins. Every plugin that tries to show the spinning busy ball. This is because RC a few versions ago changed the way you have to call that function, and in the process broke every plugin using it, resulting in the sticky loading msg.

Old code:

    rcmail.set_busy(true, 'loading');
    rcmail.http_post('plugin.get_addressbook', '', true);


New code:

    lock = rcmail.set_busy(true, 'loading');
    rcmail.http_post('plugin.get_addressbook', '', lock);
Title: addressbook in compose window
Post by: ABerglund on May 10, 2011, 06:56:34 PM
Ahh! That makes sense. I searched my install for the rcmail.set_busy string, and found it in two plugins. The version of compose_addressbook I'm using had two instance that were correct, but one that was not. After changing that, it works perfectly.

I also found the old code in contextmenu. I corrected that one too, we'll see if that makes me any happier with 0.5.2 in general. The spinning wheel has been very annoying.
Title: addressbook in compose window
Post by: cityhunter on May 11, 2011, 10:54:24 AM
thanks for the nice plugin , have plan to add check box for address list choice?
Title: addressbook in compose window
Post by: corbosman on May 11, 2011, 10:58:26 AM
I dont understand what you mean.
Title: addressbook in compose window
Post by: dshepherd on May 12, 2011, 05:19:33 AM
Just added this plugin after using RC for a long while and it's great.

One thing I have noticed is that when you reply to a message, RC does not automatically add a comma after the last recipient address (neither does the plugin) so when you add a recipient via the plugin there is no comma before the last address you just added.

Perhaps it may be better for this to be added to the RC core, although the plugin could check that there is a comma after the last address and if not then adds one.

The same issue happens for cc and bcc fields.
Title: addressbook in compose window
Post by: ABerglund on May 12, 2011, 03:06:40 PM
Odd. The commas are added for me. I'm using 0.5.2 with v. 4.0 of the plugin.
Title: addressbook in compose window
Post by: corbosman on May 13, 2011, 03:39:17 AM
I see the same issue. I'll fix this soonish.
Title: addressbook in compose window
Post by: dshepherd on May 13, 2011, 05:44:21 AM
That would be fantastic, many thanks.
Title: addressbook in compose window
Post by: ABerglund on August 20, 2011, 09:14:12 PM
EDIT - Never mind, I had an error in my LDAP config. 5.0b3 works fine in the new Beta release.

Getting a "Server Error" dialog when attempting to use compose_addressbook-5.0b3 in the newly released rc-0.6-beta. Does it need updated, or am I doing something wrong?
Title: addressbook in compose window
Post by: aszalea on November 17, 2011, 09:30:17 AM
Hi,

I'm having problems with roundcube 0.6.
Contacts are displaying twice. I think it's due to the new format of contacts. Contact object contains email and email:other keys.
I've written a patch to deduplicate the email list before displaying.

Regards.

--- compose_addressbook.php_origin      2011-11-17 15:12:35.000000000 +0100
+++ compose_addressbook.php     2011-11-17 15:11:53.000000000 +0100
@@ -130,6 +130,15 @@
       }
     }

+    foreach ($contacts as &$mycontact){
+        $mycontact=serialize($mycontact);
+    }
+
+    $contacts=array_unique($contacts);
+
+    foreach ($contacts as &$mycontact){
+        $mycontact=unserialize($mycontact);
+    }
     sort($contacts);

     // send the addressbook back to javascript
Title: addressbook in compose window
Post by: xajh on November 26, 2011, 03:52:52 AM
thanks for the nice plugin.


have plan to display address group in compose addressbook list, such as personal address group or gloubal address group and others . if click address group name , display address list in group. When i select one address group ,click add button in compose addressbook window ,all address in group can be added to recipients .
Title: addressbook in compose window
Post by: meubeukeu on December 09, 2011, 08:02:17 AM
Hi !

there is a little bug :o

configuration file say :

Code: [Select]
// which addressbook do we show. this can contain any addressbooks you use, including those set by plugins.
// by default it's the same as the autocomplete_addressbooks setting.


it's a lie :( . By default it get all contacts in all addressbook, even if addressbook is not registered for autocompletion

here is a little patch, the lie become reality :D

Code: [Select]
--- compose_addressbook.php_orig        2011-12-09 13:54:17.000000000 +0100
+++ compose_addressbook.php     2011-12-09 13:35:17.000000000 +0100
@@ -80,7 +80,7 @@
     $mode = $rcmail->config->get('compose_addressbook_mode', 'full');

     // get the addressbooks, or default to all address sources
-    $book_types = (array) $rcmail->config->get('compose_addressbooks', array_keys($rcmail->get_address_sources()));
+    $book_types = (array) $rcmail->config->get('compose_addressbooks', $rcmail->config->get('autocomplete_addressbooks', array_keys($rcmail->get_address_sources())));

     foreach ($book_types as $id) {
       $abook = $rcmail->get_address_book($id);

thanks !

Best regards,
Title: addressbook in compose window
Post by: ABerglund on December 14, 2011, 02:14:42 PM
Compose_addressbook 5.0b3 does not honor the new $rcmail_config['addressbook_search_mode'] in 0.7-stable. When I set

$rcmail_config['addressbook_search_mode'] = 2;

to restrict searches and autocomplete to the format "prefix (abc*)", the compose_addressbook search still performs searches as "partial (*abc*)"

Can this be dealt with reasonably easily?
Title: addressbook in compose window
Post by: corbosman on December 14, 2011, 02:58:57 PM
It's easy in 'search' mode of my plugin.  Not so easy in the full mode. That search is simply done in JS with regexps.

Cor


Code: [Select]

*** ../roundcube-plugins/plugins/compose_addressbook/compose_addressbook.php Tue May 10 08:23:23 2011
--- plugins/compose_addressbook/compose_addressbook.php Wed Dec 14 20:41:07 2011
***************
*** 78,86 ****
      $rcmail = rcmail::get_instance();
     
      $mode = $rcmail->config->get('compose_addressbook_mode', 'full');
!        
      // get the addressbooks, or default to all address sources
!     $book_types = (array) $rcmail->config->get('compose_addressbooks', array_keys($rcmail->get_address_sources()));
         
      foreach ($book_types as $id) {
        $abook = $rcmail->get_address_book($id);
--- 78,87 ----
      $rcmail = rcmail::get_instance();
     
      $mode = $rcmail->config->get('compose_addressbook_mode', 'full');
!     $search_mode = $rcmail->config->get('addressbook_search_mode');
!        
      // get the addressbooks, or default to all address sources
!     $book_types = (array) $rcmail->config->get('compose_addressbooks', $rcmail->config->get('autocomplete_addressbooks', array_keys($rcmail->get_address_sources())));
         
      foreach ($book_types as $id) {
        $abook = $rcmail->get_address_book($id);
***************
*** 109,115 ****
          $search=trim(get_input_value('_search', RCUBE_INPUT_POST));
         
          if(!empty($search)) {
!           $result = $abook->search(array('name','email'),$search, false, true, true, 'email');
            while ($sql_arr = $result->iterate()) {
              foreach ((array)$abook->get_col_values('email', $sql_arr, true) as $email) {
                $contact = format_email_recipient($email, $sql_arr['name']);
--- 110,116 ----
          $search=trim(get_input_value('_search', RCUBE_INPUT_POST));
         
          if(!empty($search)) {
!           $result = $abook->search(array('name','email'),$search, $search_mode, true, true, 'email');
            while ($sql_arr = $result->iterate()) {
              foreach ((array)$abook->get_col_values('email', $sql_arr, true) as $email) {
                $contact = format_email_recipient($email, $sql_arr['name']);

Title: addressbook in compose window
Post by: ABerglund on December 14, 2011, 03:11:52 PM
Since our global LDAP is too large to be convenient in "full" mode, we do use "search" mode. I applied your changes, works perfectly.

Now I go back to do more testing.
Title: addressbook in compose window
Post by: corbosman on February 25, 2012, 10:01:01 AM
I will discontinue development of this plugin. In the latest version of RC, the devs have included an address book picker, making this plugin unnecessary. They did tell me a while ago, so it was no surprise, and im happy they added it.  Hope everyone found this plugin useful.
Title: Re: addressbook in compose window
Post by: corbosman on October 16, 2012, 06:28:12 AM
Hi all, I have changed my mind and have added a 0.8+ version of this plugin for use with the classic skin in 0.8+. It will not work with the Larry skin, only the Classic skin. There will never be a version for the Larry skin as it has its own addressbook inside the compose screen.

I have moved this project to github. As of this version, please use the github repo. Older versions ( pre-0.8 ) are still in Google Code.

https://github.com/corbosman/compose_addressbook
Title: Re: addressbook in compose window
Post by: SKaero on October 16, 2012, 02:13:40 PM
Thanks just had someone asking for it.