Author Topic: Recipient To Contacts Plugin  (Read 21915 times)

Offline diablo81

  • Newbie
  • *
  • Posts: 8
Recipient To Contacts Plugin
« Reply #15 on: January 08, 2011, 08:43:15 AM »
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
« Last Edit: January 08, 2011, 09:35:56 AM by diablo81 »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Recipient To Contacts Plugin
« Reply #16 on: January 09, 2011, 12:15:43 AM »
I'm very interested in getting it work work with compose_newwindow and keyboardshortcuts!
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline diablo81

  • Newbie
  • *
  • Posts: 8
Recipient To Contacts Plugin
« Reply #17 on: January 09, 2011, 05:28:46 AM »
Quote from: rosali;32303
I'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.

Offline Vlad

  • Jr. Member
  • **
  • Posts: 12
Recipient To Contacts Plugin
« Reply #18 on: January 10, 2011, 07:38:32 AM »
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 :)
« Last Edit: January 10, 2011, 07:45:29 AM by Vlad »

Offline diablo81

  • Newbie
  • *
  • Posts: 8
Recipient To Contacts Plugin
« Reply #19 on: January 14, 2011, 10:04:57 AM »
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!

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Recipient To Contacts Plugin
« Reply #20 on: January 16, 2011, 03:08:37 AM »
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.
« Last Edit: January 17, 2011, 04:12:06 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Recipient To Contacts Plugin
« Reply #21 on: January 16, 2011, 04:51:16 AM »
Forgot to mention:

The method to save new contacts on change allows to add duplicates. IMO, a save button would solve this issue too.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline diablo81

  • Newbie
  • *
  • Posts: 8
Recipient To Contacts Plugin
« Reply #22 on: January 17, 2011, 04:14:32 PM »
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!

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Recipient To Contacts Plugin
« Reply #23 on: February 07, 2011, 07:43:26 AM »
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', {});

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Recipient To Contacts Plugin
« Reply #24 on: February 07, 2011, 08:33:28 AM »
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 :)

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Recipient To Contacts Plugin
« Reply #25 on: February 07, 2011, 08:49:44 AM »
related to rosalis post loading message does not disappear

replace in recipient_to_contact.js in get_addressbook_groups: function(event) this line
Code: [Select]
rcmail.display_message(rcmail.gettext('loading'), 'loading', true);with
Code: [Select]
var lock = rcmail.set_busy(true, 'loading');
and this line
Code: [Select]
rcmail.http_post('plugin.recipient_to_contact_get_addressbook_groups', 'address_book_id=' + address_book_id + '&key=' + event.data.k);with
Code: [Select]
rcmail.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

Code: [Select]
// 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 ;)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline dmcleman

  • Newbie
  • *
  • Posts: 2
What have I done wrong?
« Reply #27 on: April 12, 2011, 04:42:08 AM »
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.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Recipient To Contacts Plugin
« Reply #28 on: April 12, 2011, 04:58:38 AM »
*** BUMP ***

Vlad, are you still working on your plugin?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Loading message
« Reply #29 on: April 26, 2011, 09:13:00 AM »
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?