Author Topic: addressbook in compose window  (Read 88812 times)

Offline dshepherd

  • Jr. Member
  • **
  • Posts: 87
addressbook in compose window
« Reply #195 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.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
addressbook in compose window
« Reply #196 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.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
addressbook in compose window
« Reply #197 on: May 13, 2011, 03:39:17 AM »
I see the same issue. I'll fix this soonish.

Offline dshepherd

  • Jr. Member
  • **
  • Posts: 87
addressbook in compose window
« Reply #198 on: May 13, 2011, 05:44:21 AM »
That would be fantastic, many thanks.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
addressbook in compose window
« Reply #199 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?
« Last Edit: August 20, 2011, 09:43:07 PM by ABerglund »
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline aszalea

  • Newbie
  • *
  • Posts: 1
addressbook in compose window
« Reply #200 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

Offline xajh

  • Newbie
  • *
  • Posts: 6
    • http://blog.dvxj.com
addressbook in compose window
« Reply #201 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 .

Offline meubeukeu

  • Newbie
  • *
  • Posts: 2
addressbook in compose window
« Reply #202 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,
« Last Edit: December 09, 2011, 08:16:25 AM by meubeukeu »

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
addressbook in compose window
« Reply #203 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?
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
addressbook in compose window
« Reply #204 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']);


Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
addressbook in compose window
« Reply #205 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.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
addressbook in compose window
« Reply #206 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.

Offline corbosman

  • Sr. Member
  • ****
  • Posts: 260
Re: addressbook in compose window
« Reply #207 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

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: addressbook in compose window
« Reply #208 on: October 16, 2012, 02:13:40 PM »
Thanks just had someone asking for it.