We've created a new plugin for RoundCube called 'Recipient To Contact'. The idea is somewhat similar to automatic_addressbook plugin: after the email has been sent, it checks whether recipients (To/Cc/Bcc) already exist in address book, and if not, it shows a from to quickly add selected contacts to or different address books.
The plugin doesn't require additional database table (unlike automatic_addressbook) and uses address books, which are set in the config file.
Recipient To Contact requires jQuery UI plugin and is compatible with RoundCube v0.4.
You can obtain it from GitHub namesco's Roundcube-Plugin-Recipient-To-Contact at master - GitHub (http://github.com/namesco/Roundcube-Plugin-Recipient-To-Contact)
This is a first release, so feedback and patches are very welcome.
Recipient to contact v0.1.2 is released now. Primaraly it's a bugfix release. Full changelog: https://github.com/namesco/Roundcube-Plugin-Recipient-To-Contact/blob/master/recipient_to_contact/CHANGELOG
Hi!
I like this plugin. It works great.
Is there a way to have the groups that have been created in that list of address books so that you can automatically add them to a group?
I would imagine if a user added it to a group, that you would first have to add the contact to the parent address book, and then add it into the group...
That would be a great addition to this plugin!
Let me know if that is possible.
Thanks,
Tim
Thanks for this exellent Plugin.
Adding the contact to the adressbook is great, .. It would be awesome to add them to a specific group, as mentioned.
Hi!
Yes, I can do it. There shouldn't be any problems with that.
Hi Vlad!
I'am using '0.1.2' version and I have such PHP Warning in error_log file:
Missing argument 1 for recipient_to_contact::add_contact() in /usr/local/etc/httpd/webmail/plugins/recipient_to_contact/recipient_to_contact.php on line 210, referer: /?_task=mail&_mbox=mail%2FSent&_refresh=1
Hi toootooo,
this has been fixed in master branch. Actually, I'll probably rollout a new 0.1.3 release very soon.
v0.1.3 is out.
https://github.com/namesco/Roundcube-Plugin-Recipient-To-Contact/blob/master/recipient_to_contact/CHANGELOG
This is a minor bugifix release. Fixes a bug with warning in logs and handles properly 'read reciept' emails.
A new version, supporting contact groups, will be released soon as well.
Any news on this?
It works fine now. Have no warnings in logs.
Sorry, I was unprecise.
Vlad, are there any news about ...
QuoteA new version, supporting contact groups, will be released soon as well.
... ?
Quote from: Vlad;31155Recipient to contact v0.1.2 is released now. Primaraly it's a bugfix release. Full changelog: https://github.com/namesco/Roundcube-Plugin-Recipient-To-Contact/blob/master/recipient_to_contact/CHANGELOG
Thanks alot, its really helpful.
The plugin is incompatible with keyboard_shortcurts plugin. Shortcuts have to be disabled when adding contact dialog appears.
It also does not work properly along compose_newwindow plugin.
Sorry for the delay. Christmas, New Year, holidays => total chaos at work. However, the plugin hasn't been abandoned and new versions are coming.
And thanks for pointing out incompatibility bugs. I'll have a look
keyboard_shortcuts:
You should disable shortcuts when dialog is openend. Otherwise shortcuts are executed when filling the form.
compose_newwindow:
message_list hook does not work because composing goes in a popup window and message list stays without being refreshed as usual when composing in the main screen.
Everything else looks fine to me. Thanks for the great plugin.
EDIT: Your plugin will be a great replacement for my automatic_addressbook plugin!
I modified recipient_to_contact plugin in order to have some more capabilities:
1) you can now select an addressbook for each contact
2) you can now select a group for each contact
3) you can now write down a firstname for each contact
4) you can now write down a surname for each contact
This is a "very first release", so at now the plugin has some limitations:
1) it has the same problems of original recipient_to_contact plugin about compatibility so it doesnt work fine with compose_newwindow and keyboard_shortcuts
2) I stressed it only with SQL addressbook, so I dont know if it will work with ldap addressbook. At now I dont have time to setup a new enviroment for testing, but if someone is interested in ldap maybe I will do it in the future (or someone else could add the feature). I used Roundcube API, so I think there's no problem with ldap, but before I say anything I want to try it.
3) It doesnt work with global_addressbook plugin, or better it cannot recognize the "id" of the global addressbook: you can use globaladdressbook, but recipient_to_contact's dialog box doesnt show it as addressbook. This will be next develop step.
I want to emphasize that this is not "my plugin". This is Vladimir Minakov's plugin, modified by me. I sent a mail to the author of recipient_to_contact two days ago in order to inform him about the mods to his plugin.
The author (Vladimir) will decide if he want introduce my mods to his plugin.
Ps. Users' feedbacks are the most important help to develop, so please test it and post here your comments. Thank you very much.
PPs. if someone is interested I will try to solve problems about keyboard_shortcuts and compose_newwindow.
PPPs. sorry for my english
I'm very interested in getting it work work with compose_newwindow and keyboardshortcuts!
Quote from: rosali;32303I'm very interested in getting it work work with compose_newwindow and keyboardshortcuts!
Ok rosali. In the next week I will work on the plugin.
Hi guys,
I very welcome all contributions and I've already suggested diablo81 to push his changes to plugin's repo on github.
The only thing I'm concerned about are the input fields. I personally find it overcomplicated for plugin's main purpose: quickly add contacts. When I had sent an email, I want to get back to work/inbox as soon as I can, whereas a need to fill dozen of fields prevents me from that. So, the quicker the process is, the better. On the other hand, if you wish to manage contacts after email has been sent (in other words fill all relevant fields), we might make the displayed columns configurable from the user settings menu.
Apart from that, a compatibility fix for the keyboard_shortcuts is in trunk/master on github.
With compose_newwindow things aren't so clear for me. I include the needed javascript file only after the email has been sent. Compose_newwindow doesn't reload the page, that is, the JS isn't even loaded. And I don't feel that including recipient_to_contact's JS on every page is a good idea. Any thoughts on that?
UPDATE: Gianfelice's changes we'll make into trunk very soon. Great :)
I'm totally agree with Vlad about "quick add". I will make changes to my code in order to obtain customization about which fields a user want to add.
I will commit changes to github repository.
Unfortunately I didnt have time in this week because of my job, but I will do it in the we or in the next week.
Thank you Vlad!
Plugin compose_newwindow incompatibility
I have fixed it in the compose_newwindow plugin and will release it soon.
IMO, it is the best way to fix it there, because I needed a hack
in compose_newwindow.js which can't be injected by your plugin.
Two suggestions:
#1-
The loading message does not disappear from message list when adding a new contact (since v0.5).
I think ...
reciepient_to_contact.js ::: line 181
... should be removed or you should use set_busy with lock identifier (have a look on compose_addressbook plugin by Cor Bosman).
#2-
I'd appreciate to have a save button in the jquery dialog instead of saving the contact 'onchange' event of the selector.
Forgot to mention:
The method to save new contacts on change allows to add duplicates. IMO, a save button would solve this issue too.
I sent a pull request to Vladimir on github about my mods on recipient_to_contact.
As I said now users can select a firstname, surname and a group when they add new contacts. By Vladimir's suggestions I made firstname, surname and group not required, so if someone want to add a contact quickly he still can.
I also added a "Save" button in the dialog box.
I used the last version released by Vladimir, so we could not have problems with keyboard_shortcuts.
I'm reading now what rosali wrote down...
I will correct the problem with roundcube 0.5 soon as I can (I was really busy because of my job) and I will check the problem about duplicates. I thought that the api function insert take care of duplicate...maybe I didnt understand what rosali would say :D .
Actually plugin has another problem: global_addressbook plugin is not compatible. I will solve that soon as I can.
Again thanks to Vladimir for his kindness.
Ps. any test/suggestion is really desired!
Nice plugin ... plugin is broken in the current RC svn0.6
the issue is session checking in rc index.php fails ...
this is a new function in rc 0.6
if (!$RCMAIL->session->check_auth()) {
...
the check is indicated from recipient_to_contact.js line 32
rcmail.http_post('plugin.recipient_to_contact_get_contacts', {});
i found the issue...
in recipient_to_contact.php
public function get_contacts()
$this->rcmail->session->regenerate_id();
add after this line
$this->rcmail->session->set_auth_cookie();
to set new auth cookie
the issue is thats rc check the session and the regenerated session from recipient_to_contact plugin is not the same as in cookie set new auth cookie and all is fine :)
related to rosalis post loading message does not disappear
replace in recipient_to_contact.js in get_addressbook_groups: function(event) this linercmail.display_message(rcmail.gettext('loading'), 'loading', true);
withvar lock = rcmail.set_busy(true, 'loading');
and this line rcmail.http_post('plugin.recipient_to_contact_get_addressbook_groups', 'address_book_id=' + address_book_id + '&key=' + event.data.k);
withrcmail.http_post('plugin.recipient_to_contact_get_addressbook_groups', 'address_book_id=' + address_book_id + '&key=' + event.data.k, lock);
and remove in get_addressbook_groups_handler: function(response) this lines
// disable the "loading" message
rcmail.display_message(rcmail.gettext('loading'), 'loading', false);
i have used the last version from recipient_to_contact plugin from git ...
many greetz ;)
Any updates yet?
Issue 153 - myroundcube - recipient_to_contact: ajax wait keeps spinning / overlay doesn't close on save event - Project Hosting on Google Code (http://code.google.com/p/myroundcube/issues/detail?id=153)
Is there something basic missing from the instructions that a newbie could not be expected to know?
After sending to a new contact the 'loading' message appears but nothing further.
I have placed the jqueryui folder in the plugins directory - there are no instructions for a newbie to say where to load it.
*** BUMP ***
Vlad, are you still working on your plugin?
I tried Lacri's fix for the loading message, but when I made the changes, the plugin quit working (no error messages in the log, however).
Also, the plugin does not work with the latest update to Roundcube (0.5.2).
I really like this plugin. Will there be an updated version any time soon?
This plugin does not work in .5.2. Is there an upgrade available?
i have found the issue
remove this two lines in recipient_to_contact.php
in function get_contacts()
$this->rcmail->session->regenerate_id();
$this->rcmail->session->set_auth_cookie();now works in my rc 0.5.3 installation.
i hope this helps ;)
and the second issue is in recipient_to_contact.js
in the save_contacts: function()
search rcmail.display_message(rcmail.gettext('loading'), 'loading', true);
and replace with var lock = rcmail.set_busy(true, 'loading');
and search rcmail.http_post('plugin.recipient_to_contact_save_contacts', data);
and replace withrcmail.http_post('plugin.recipient_to_contact_save_contacts', data, lock);
now works fine for me
I made the changes. The loading message still remained, and the plugin was caught in an endless loop. Whenver I went to the e-mail page, the dialog box for saving the contact would appear.
The version of the plugin that I have did not have the line
$this->rcmail->session->set_auth_cookie();
Would you consider posting your version of the plugin as a zip file here?
I all so have this problem, i made the changes. The loading message still remained, and the plugin is caught in an endless loop.
Any one know how to fix it?
A question:
Why is the regenerate_id on line 189?
Following Rosali's lead, I disabled the regenerated_id line. The plugin now works, but I still cannot get rid of the Loading message that continues after the dialog box closes. I made the adjustments Lacri suggested and even tried disabling the loading lines in the js file, but no luck.
I solved it for me at least: https://github.com/namesco/Roundcube-Plugin-Recipient-To-Contact/issues/9
The package I downloaded must be numbered differently. Line 202 in the php file (regenerate_id) was line 200.
Can you tell me what is in the lines in the js file to remove, and what should precede the new lines to be added so I can be sure of making the correct changes?
recipient_to_contact.js diff patch
212c212
< rcmail.display_message(rcmail.gettext('loading'), 'loading', true);
---
> var msgid = rcmail.set_busy(true, 'loading');
214c214
< rcmail.http_post('plugin.recipient_to_contact_save_contacts', data);
---
> rcmail.http_post('plugin.recipient_to_contact_save_contacts', data+'&_unlock='+msgid);
266d265
<
319,320d317
< // enable the "loading" message
< rcmail.display_message(rcmail.gettext('loading'), 'loading', true);
345,347d341
<
< // disable the "loading" message
< rcmail.display_message(rcmail.gettext('loading'), 'loading', false);
recipient_to_contact.php diff patch
202d201
< $this->rcmail->session->regenerate_id();
If you don't know how to apply/read diff patches, or just don't have access to the shell, read How to read a patch or diff and understand its structure to apply it manually ยป markusbe.com (http://goo.gl/LtZf4). It will explain the basics of reading patch files.
These patches were made from a fresh download of the plugin.
Hi all,
is there anyone who use this plugin with the new roundcube (0.7)?
Thanks in advance
k.
I do, works fine. but needs updating