+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast
Results 21 to 30 of 50

Thread: Global Address Book with additional fields and additional email addresses

  1. #21
    henlon is offline Registered User
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    40
    Downloads
    6
    Uploads
    0

    Default Error in Addressbook

    Hi
    I have just installed rc02-beta and it works fine.
    I installed the Plug in Global addressbook with additional fields and got en error when trying to edit/insert a new contact.

    I have made the db conversion and the update of the files.

    When I try to add a new contact my browser gives me the http 500 error.
    I can read this line in my error log:

    [02-Nov-2008 11:53:21] PHP Fatal error: Class 'textarea' not found in C:\Inetpub\wwwroot\rc02\program\include\main.inc on line 665

    What's wrong?

  2. #22
    browndrake is offline Registered User
    Join Date
    Nov 2008
    Posts
    1
    Downloads
    3
    Uploads
    0

    Default saves all as global, also problem adding address from emails

    I am very new to this type of code but I managed to make the changes from this thread and most things seem to be working well. There are two issues that I have not been able to fix.

    I am using version: v.0.1.1

    Wup.nu stated:
    I cannot added the addresses from my e-mail. when I press in the plus button, a message box tell me that I cannot save the receiver...
    When I click the pluse (+) I don't get an error message or anything else. However, it fails to let me add the address. Nothing seems to happen.

    I would appreciate it if somebody could send me in the right direction to find a solution for that.

    Also, when adding new contacts everything works well EXCEPT: it adds everybody as global. It does not matter wether I enter 0 or 1, it saves it as global and upon edit shows a "1" . Upon editing the entry and re-saving, it saves correctly. I believe that this is the code that affects it but I can not see why it is behaving as it is:

    Code:
    // read POST values into hash array
    foreach ($a_save_cols as $col)
    {
      $fname = '_'.$col;
       if($col == 'global_contact'){
    	if(isset($_POST[$fname])){
    	 $a_record[$col] = 1;
    	}else{
    	 $a_record[$col] = 0;
    	}
     }	else if (isset($_POST[$fname])){
      $a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
     }
        $a_record[$col] = get_input_value($fname, RCUBE_INPUT_POST);
    }
    .......................
    note: until somebody figures out how to make a drop down to select yes or no, as to wether a contact is global or not, I edited the html so that it reads:
    Global Contact (1 for yes, 0 for no)
    That way users know they need to enter 0 or 1.
    .......................

    Thanks to anybody that can help with the above issues.

    browndrake
    Last edited by browndrake; 11-10-2008 at 04:24 AM.

  3. #23
    Wazooka is offline Registered User
    Join Date
    Sep 2008
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by jonsjava View Post
    Here's a compressed version of my patch. It's the latest SVN release already patched.
    Could you explain what's different from your non-Global plugin posted and this patched RC?

  4. #24
    moody_styley is offline Registered User
    Join Date
    Sep 2008
    Location
    France
    Posts
    2
    Downloads
    1
    Uploads
    0

    Default 2.0 Stable ?

    Hi all,

    I have tried to apply the Global Address Book script for 0.2 Stable and nothing worked.

    I was running 0.2 Beta before and script was OK.

    Can anybody help me to apply this great plugin to 0.2 Stable ?

    Thanks in davance for your help.
    Last edited by moody_styley; 01-20-2009 at 02:46 PM.

  5. #25
    lacri's Avatar
    lacri is offline Registered User
    Join Date
    Jan 2009
    Location
    Lutherstadt Wittenberg, Germany
    Posts
    179
    Downloads
    5
    Uploads
    0

    Default

    Hi all,

    plz modify this plugin to RC 0.2 Stable ?

    yea my english is bad

    Thx

  6. #26
    tfyisupportteam is offline Registered User
    Join Date
    Nov 2008
    Posts
    4
    Downloads
    13
    Uploads
    0

    Default GAL for 0.2 Stable

    Is any going to be working on a mod for 0.2 stable, also i was wondering if anyone has figured out a way to only allow admins access to change information in the global address list.

    Thanks

  7. #27
    BruderTack is offline Registered User
    Join Date
    Feb 2009
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by jonsjava View Post
    Here's a compressed version of my patch. It's the latest SVN release already patched.
    Thanks for your package! It works fine, but I found one bug in the code. The database fields email2, email3, email4 don't popup in the autocomplete list when you enter an recipient. (only email is shown)

    File: /program/steps/mail/compose.inc
    Line: 915
    PHP Code:
    // search for
    while ($sql_arr $result->iterate())
    if (
    $sql_arr['email'])$a_contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
    if (
    $sql_arr['email2'])$a_contacts[] = format_email_recipient($sql_arr['email2'], $sql_arr['name']);
    if (
    $sql_arr['email3'])$a_contacts[] = format_email_recipient($sql_arr['email3'], $sql_arr['name']);
    if (
    $sql_arr['email4'])$a_contacts[] = format_email_recipient($sql_arr['email4'], $sql_arr['name']);

    // and change this to (took be about an hour to find this *lol*):
    while ($sql_arr $result->iterate()) {
        if (
    $sql_arr['email'])$a_contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
        if (
    $sql_arr['email2'])$a_contacts[] = format_email_recipient($sql_arr['email2'], $sql_arr['name']);
        if (
    $sql_arr['email3'])$a_contacts[] = format_email_recipient($sql_arr['email3'], $sql_arr['name']);
        if (
    $sql_arr['email4'])$a_contacts[] = format_email_recipient($sql_arr['email4'], $sql_arr['name']);


  8. #28
    jonsjava is offline Registered User
    Join Date
    Jul 2008
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default

    I noticed that issue as well. I'll work on it when I get a chance. I just noticed this post, so I apologize for the delay in response.

  9. #29
    lacri's Avatar
    lacri is offline Registered User
    Join Date
    Jan 2009
    Location
    Lutherstadt Wittenberg, Germany
    Posts
    179
    Downloads
    5
    Uploads
    0

    Default port to 0.2 stable / 0.2.1 part 1

    i have modiefied this for RC 0.2 stable / 0.2.1

    Global Contacts can not add edit or delete, global contacts must insert edit or delete in the DB directly via phpMyAdmin ... i will add feature thats user with configureable ID can add edit delete global contacts.

    the addressbook view edit and add pages have now fieldsets.

    add new file /skins/default/templates/noedit_showcontact.html
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    title><roundcube:object name="pagetitle" /></title>
    <
    roundcube:include file="/includes/links.html" />
    <
    link rel="stylesheet" type="text/css" href="/addresses.css" />
    </
    head>
    <
    body class="iframe">

    <
    div id="contact-title" class="boxtitle"><roundcube:object name="contactdetails" part="name" /></div>

    <
    div id="contactdetails-box">
    <
    div style="padding:15px 0 15px 15px">
    <
    roundcube:object name="contactdetails" />
    <
    div style="clear:left"></div>
    </
    div>
    </
    div>

    </
    body>
    </
    html
    modiefie /skins/default/templates/showcontact.html
    search for
    PHP Code:
    <div id="contact-details">
     <
    roundcube:object name="contactdetails" />
     <
    p><br /><roundcube:button command="edit" type="input" class="button" label="editcontact" condition="!ENV:readonly" /></p>
     </
    div
    and replace with
    PHP Code:
    <div id="contactdetails-box">
    <
    div style="padding:15px 0 15px 15px">
    <
    roundcube:object name="contactdetails" />
     
     <
    p><br /><roundcube:button command="edit" type="input" class="button" label="editcontact" condition="!ENV:readonly" /></p>
    <
    div style="clear:left"></div>
    </
    div>
    </
    div
    add new file /skins/default/templates/noedit_editcontact.html
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    title><roundcube:object name="pagetitle" /></title>
    <
    roundcube:include file="/includes/links.html" />
    <
    link rel="stylesheet" type="text/css" href="/addresses.css" />
    </
    head>
    <
    body class="iframe">

    <
    div id="contact-title" class="boxtitle"><roundcube:label name="editcontact" /></div>

    <
    div id="contactdetails-box">
    <
    div style="padding:15px 0 15px 15px">
    <
    roundcube:object name="contacteditform" size="40" />

    </
    form>
    <
    div style="clear:left"></div>
    </
    div></div>

    </
    body>
    </
    html
    modiefie /skins/default/templates/editcontact.html
    search for
    PHP Code:
    <div id="contact-details"
    and replace with
    PHP Code:
    <div id="contactdetails-box">
    <
    div style="padding:15px 0 15px 15px"
    search for
    PHP Code:
    </form>
     </
    div
    and replace with
    PHP Code:
    </form>
    <
    div style="clear:left"></div>
     </
    div>
    </
    div
    modiefie /skins/default/addresses.css
    add the lines
    PHP Code:
    fieldset
    {
      
    margin-bottom0.5em;
      
    border1px solid #999999;
      
    padding4px 8px 9px 8px;
    }

    legend
    {
      
    color#999999;
    }

    #contactdetails-box
    {
      
    top0px;
      
    left20px;
      
    bottom60px;
      
    right20px;
      
    overflowauto;
    }

    #contactdetails-box table td.title
    {
      
    color#666666;
      
    padding-right10px;
      
    white-spacenowrap;
    }

    .
    contactdetails-block
    {
      
    floatleft;
      
    margin-right14px;
      
    min-width460px;
      
    /* css hack for IE */
        
    widthexpression(Math.min(460parseInt(document.documentElement.clientWidth))+'px');

    modifie /program/include/rcube_contacts.php
    search for
    PHP Code:
    function delete($ids)
      {
      if (
    is_array($ids))
        
    $ids join(','$ids);
        
        
    $this->db->query(
        
    "UPDATE ".$this->db_name."
          SET    del=1
          WHERE  user_id=?
          AND    contact_id IN ("
    .$ids.")",
          
    $this->user_id);
        
        return 
    $this->db->affected_rows();
      } 
    and replace with
    PHP Code:
    function delete($ids)
      {
        if (
    is_array($ids))
          
    $ids join(','$ids);

        
    $excid explode(',',$ids);
            foreach(
    $excid as $key => $val)
                {
              
    $onecid $this->get_record($valtrue);
                if(
    $onecid['global_contact'] == 1)
                return 
    FALSE;
          }

        
    $query $this->db->query(
          
    "UPDATE ".$this->db_name."
           SET    del=1
           WHERE  global_contact!=1
           AND    contact_id IN ("
    .$ids.")
           AND    user_id=?"
    ,
          
    $this->user_id);

      if(!
    $query)
          return 
    FALSE;
      else
          return 
    $this->db->affected_rows();
      } 
    search for
    PHP Code:
    var $table_cols = array('name''email''firstname''surname'); 
    and replace with
    PHP Code:
    var $table_cols = array('name''firstname''surname''email''email2''email3''email4''global_contact''firm''position''p_tel''p_fax''p_mob''p_address''w_tel''w_fax''w_mob''w_address''notice'); 
    search for
    PHP Code:
    $sql_result $this->db->limitquery(
             
    "SELECT * FROM ".$this->db_name."
              WHERE  del<>1
             AND    user_id=?" 
    .
             (
    $this->filter " AND (".$this->filter.")" "") .
             
    " ORDER BY name",
             
    $start_row
    replace with
    PHP Code:
    $sql_result $this->db->limitquery(
             
    "SELECT * FROM ".$this->db_name."
              WHERE  del<>1
             AND  (user_id=? OR global_contact = 1)"
    .
             (
    $this->filter " AND (".$this->filter.")" "") .
             
    " ORDER BY name",
             
    $start_row
    search for
    PHP Code:
    "SELECT COUNT(contact_id) AS rows
            FROM "
    .$this->db_name."
            WHERE  del<>1
           AND    user_id=?"
    .
            (
    $this->filter " AND (".$this->filter.")" ""),
           
    $this->user_id); 
    and replace with
    PHP Code:
    "SELECT COUNT(contact_id) AS rows
            FROM "
    .$this->db_name."
            WHERE  del<>1
           AND  (user_id=? OR global_contact = 1)"
    .
            (
    $this->filter " AND (".$this->filter.")" ""),
           
    $this->user_id); 
    search for
    PHP Code:
    $this->db->query(
           
    "SELECT * FROM ".$this->db_name."
            WHERE  contact_id=?
            AND    user_id=?
            AND    del<>1"
    ,
           
    $id,
           
    $this->user_id); 
    and replace with
    PHP Code:
    $this->db->query(
           
    "SELECT * FROM ".$this->db_name."
            WHERE  contact_id=?
            AND  (user_id=? OR global_contact = 1)
            AND    del<>1"
    ,
           
    $id,
           
    $this->user_id); 
    search for
    PHP Code:
    "UPDATE ".$this->db_name."
              SET    changed="
    .$this->db->now().", ".join(', '$write_sql)."
              WHERE  contact_id=?
              AND    user_id=?
              AND    del<>1"
    ,
             
    $id,
             
    $this->user_id); 
    and replace with
    PHP Code:
    "UPDATE ".$this->db_name."
              SET    changed="
    .$this->db->now().", ".join(', '$write_sql)."
              WHERE  contact_id=?
              AND  (user_id=? OR global_contact = 1)
              AND    del<>1"
    ,
             
    $id,
             
    $this->user_id); 
    search for
    PHP Code:
           "UPDATE ".$this->db_name."
            SET    del=1
            WHERE  user_id=?
           AND    contact_id IN ("
    .$ids.")",
           
    $this->user_id); 
    and replace with
    PHP Code:
           "UPDATE ".$this->db_name."
            SET    del=1
            WHERE  user_id=?
           AND    contact_id IN ("
    .$ids.")
           AND    global_contact=0"
    ,
           
    $this->user_id); 
    modiefie /program/include/main.inc
    search for
    PHP Code:
    if ($type=='checkbox')
         {
         
    $attrib['value'] = '1';
         
    $input = new html_checkbox($attrib); 
    and replace with
    PHP Code:
    if($col == "notice")
          {
            
    $attrib['rows'] = "5";
            
    $attrib['size'] = "40";
            
    $attrib['cols'] = "40";
            
    $input = new html_textarea($attrib);
            }
         else if(
    $col == "p_address" $col == "w_address")
          {
            
    $attrib['rows'] = "4";
            
    $attrib['size'] = "40";
            
    $attrib['cols'] = "40";
            
    $input = new html_textarea($attrib);
            }
         else if (
    $type=='checkbox')
         {
         
    $attrib['value'] = '1';
         
    $input = new html_checkbox($attrib); 

    modiefie /program/localization/de_DE/messages.inc

    add the lines
    PHP Code:
    $messages['contacterrorsaved'] = 'Kontakt konnte nicht gelöscht werden';
    $messages['addressisreadonly'] = 'Der Eintrag kann nicht verändert werden'
    modiefie /program/localization/de_DE/labels.inc
    add the lines
    PHP Code:
    $labels['global_contact']  = 'Globaler Kontakt';
    $labels['firm']   = 'Firma';
    $labels['position']   = 'Position';
    $labels['p_tel']   = 'Telefon';
    $labels['p_fax']   = 'Fax';
    $labels['p_mob']   = 'Mobil';
    $labels['p_address']   = 'Adresse';
    $labels['w_tel']   = 'Telefon';
    $labels['w_fax']   = 'Fax';
    $labels['w_mob']   = 'Mobil';
    $labels['w_address']   = 'Adresse';
    $labels['notice']   = 'Bemerkung';
    $labels['email2']  = 'zweite E-Mail';
    $labels['email3']  = 'dritte E-Mail';
    $labels['email4']  = 'vierte E-Mail';
    $labels['globalyes']  = 'ja';
    $labels['globalno']  = 'nein';
    $labels['noticelegend'] = $labels['namelegend'] = 'Kontakt';
    $labels['email4legend']  = $labels['email2legend'] = 'weitere E-Mail Adressen';
    $labels['w_moblegend']  = $labels['firmlegend'] = 'Kontaktdaten Geschäftlich';
    $labels['p_moblegend']  = $labels['p_addresslegend'] = 'Kontaktdaten Privat'
    modiefie /program/steps/addressbook/save.inc
    search for
    PHP Code:
    $a_save_cols = array('name''firstname''surname''email'); 
    and replace with
    PHP Code:
    $a_save_cols = array('name''firstname''surname''email''email2''email3''email4''firm''position''p_tel''p_fax''p_mob''p_address''w_tel''w_fax''w_mob''w_address''notice'); 
    search for
    PHP Code:
    if (isset($_POST[$fname]))
       
    $a_record[$col] = get_input_value($fnameRCUBE_INPUT_POST); 
    and replace with
    PHP Code:
    if($col == 'global_contact'){
        if(isset(
    $_POST[$fname])){
         
    $a_record[$col] = 0;
        }else{
         
    $a_record[$col] = 0;
        }
     }    else if (isset(
    $_POST[$fname])){
      
    $a_record[$col] = get_input_value($fnameRCUBE_INPUT_POST);
     } 
    Attached Images
    Last edited by lacri; 03-11-2009 at 10:20 AM.

  10. #30
    lacri's Avatar
    lacri is offline Registered User
    Join Date
    Jan 2009
    Location
    Lutherstadt Wittenberg, Germany
    Posts
    179
    Downloads
    5
    Uploads
    0

    Default port to 0.2 stable / 0.2.1 part 2

    modiefie /program/steps/addressbook/show.inc
    search for
    PHP Code:
    $a_show_cols = array('name''firstname''surname''email'); 
    and replace with
    PHP Code:
    $a_show_cols = array('global_contact''name''firstname''surname''email''notice''firm''position''w_address''w_tel''w_fax''w_mob''email2''email3''email4''p_address''p_tel''p_fax''p_mob'); 
    search for and delete
    PHP Code:
    $table = new html_table(array('cols' => 2)); 
    search for
    PHP Code:
    $microformats = array('name' => 'fn''email' => 'email'); 
    and add after
    PHP Code:
    $i 1;
     foreach (
    $a_show_cols as $col) {
     if(
    $col=='global_contact' or $col=='email2' or $col=='firm' or $col=='p_address')
       
    $table = new html_table(array('cols' => 2)); 
    search for and delete
    PHP Code:
    foreach ($a_show_cols as $col) { 
    search for
    PHP Code:
    }
     
    return 
    $table->show($attrib + array('class' => 'vcard')); 
    and replace with
    PHP Code:
    if ($table->size() and ($col=='notice' or $col=='email4' or $col=='w_mob' or $col=='p_mob'))
            {
          
    $out .= html::tag('div', array('class' => 'contactdetails-block'),html::tag('fieldset'nullhtml::tag('legend'nullQ(rcube_label($col.'legend'))) . $table->show($attrib + array('class' => 'vcard'))));
            }
     
    $i++;
     }
    return 
    $out
    search for
    PHP Code:
    if ($col == 'email' && !empty($record[$col])) { 
    and replace with
    PHP Code:
    if (($col=='email' || $col=='email2' || $col=='email3' || $col=='email4') && !empty($record[$col])) { 
    search for
    PHP Code:
    'class' => $microformats[$col],
           ), 
    Q($record[$col]));
         }
         else if (!empty(
    $record[$col])) {
           
    $value html::span($microformats[$col], Q($record[$col]));
         } 
    and replace with
    PHP Code:
    'class' => $microformats[$col],
           ), 
    Q($record[$col]));
         }
       else if (
    $col=='global_contact') {
         
    $value html::span($microformats[$col],rcube_label($record[$col]== ?'globalyes':'globalno'));
        }
         else if (!empty(
    $record[$col])) {
           
    $value html::span($microformats[$col], Q($record[$col]));
         } 
    search for
    PHP Code:
    $OUTPUT->add_handler('contactdetails''rcmail_contact_details');
     
    $OUTPUT->send('showcontact'); 
    and replace with
    PHP Code:
    $OUTPUT->add_handler('contactdetails''rcmail_contact_details');
    if(
    $record['global_contact'] != 1)
    {
     
    $OUTPUT->send('showcontact');
    }
    else
    {
    $OUTPUT->send('noedit_showcontact');

    modiefie /program/steps/addressbook/delete.inc
    search for
    PHP Code:
    preg_match('/^[a-zA-Z0-9=]+(,[a-zA-Z0-9=]+)*$/'$cid))
        )
       {
    $deleted $CONTACTS->delete($cid); 
    and replace with
    PHP Code:
    preg_match('/^[a-zA-Z0-9=]+(,[a-zA-Z0-9=]+)*$/'$cid))
        )
       {
      if (
    $record $CONTACTS->get_record($cidtrue))
          
    $OUTPUT->set_env('cid'$record['ID']);

    // adding not allowed here
    if ($CONTACTS->readonly)
    {
      
    $OUTPUT->show_message('sourceisreadonly');
      
    rcmail_overwrite_action('show');
    }
    elseif(
    $record['global_contact'] == 1) {
      
    $OUTPUT->show_message('addressisreadonly''error');
      
    rcmail_overwrite_action('show');
      
    $OUTPUT->send();
      exit();
        }
    else
        {
       
    $deleted $CONTACTS->delete($cid); 
    search for
    PHP Code:
    // send error message
    exit; 
    and replace with
    PHP Code:
    $OUTPUT->show_message('contacterrorsaved''warning');
    rcmail_overwrite_action('show');
    $OUTPUT->send();
    exit(); 
    search for
    PHP Code:
    if ($_GET['_from'] != 'show' && $pages && $CONTACTS->list_page $pages)
         
    rcmail_js_contacts_list($CONTACTS->list_records(null, -$deleted)); 
    and add the lines
    PHP Code:
    $OUTPUT->show_message('successfullysaved''confirmation');
    rcmail_overwrite_action('show'); 
    search for
    PHP Code:
    $OUTPUT->send();
           exit();
         }

       
    // count contacts for this user 
    and replace with
    PHP Code:
    $OUTPUT->send();
           exit();
         }
      else
        {
        
    // count contacts for this user 
    search for
    PHP Code:
    // send response
       
    $OUTPUT->send();
       }

     
    ?> 
    and replace with
    PHP Code:
    // send response
       
    $OUTPUT->send();
       }
      }
     }
     
    ?> 
    modiefie /program/steps/addressbook/edit.inc
    search for
    PHP Code:
    rcmail_overwrite_action('show');
       return;
     }
     
     function 
    rcmail_contact_editform($attrib)
     { 
    and replace with
    PHP Code:
    rcmail_overwrite_action('show');
       return;
     }
    elseif(
    $record['global_contact'] == 1) {
        
    $OUTPUT->show_message('addressisreadonly''error');
      
    rcmail_overwrite_action('show');
      return;
      }
     
     function 
    rcmail_contact_editform($attrib)
     { 
    search for
    PHP Code:
    $a_show_cols = array('name''firstname''surname''email'); 
    and replace with
    PHP Code:
    $a_show_cols = array('name''firstname''surname''email''notice''firm''position''w_address''w_tel''w_fax''w_mob''email2''email3''email4''p_address''p_tel''p_fax''p_mob'); 
    search for
    PHP Code:
    // this will be executed if no template for addcontact exists
    $OUTPUT->send('editcontact'); 
    and replace with
    PHP Code:
    // this will be executed if no template for addcontact exists
    if($record['global_contact'] != 1)
     
    $OUTPUT->send('editcontact');
    else
    $OUTPUT->send('noedit_editcontact'); 
    search for
    PHP Code:
    $out "$form_start<table>\n\n"
    and replace with
    PHP Code:
    $out "$form_start\n\n"
    search for
    PHP Code:
    foreach ($a_show_cols as $col)
       { 
    and add after
    PHP Code:
    if($col=='name' or $col=='email2' or $col=='firm' or $col=='p_address')
     
    $out .= "<div class='contactdetails-block'><fieldset><legend>".Q(rcube_label($col.'legend'))."</legend><table>"
    search for
    PHP Code:
    Q(rcube_label($col)),
                         
    $value);
       } 
    and replace with
    PHP Code:
    Q(rcube_label($col)),
                         
    $value);
       if(
    $col=='notice' or $col=='email4' or $col=='w_mob' or $col=='p_mob')
       
    $out .= "</fieldset></table></div>";
       } 
    search for
    PHP Code:
    $out .= "\n</table>$form_end"
    and replace with
    PHP Code:
    $out .= "\n$form_end"
    modiefie /program/steps/mail/autocomplete.inc
    search for
    PHP Code:
    if ($result $abook->search(array('email','name'), $search)) {
           while (
    $sql_arr $result->iterate()) {
             if (
    stripos((string)$sql_arr['email'], $search) !== false || stripos((string)$sql_arr['name'], $search) !== false) {
               
    $contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
             } 
    and replace with
    PHP Code:
    if ($result $abook->search(array('email','name','email2','email3','email4'), $search)) {
           while (
    $sql_arr $result->iterate()) {
             if (
    stripos((string)$sql_arr['email'], $search) !== false || stripos((string)$sql_arr['name'], $search) !== false) {
               
    $contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
             }
            if (
    stripos((string)$sql_arr['email2'], $search) !== false) {
              
    $contacts[] = format_email_recipient($sql_arr['email2'], $sql_arr['name']);
            }
            if (
    stripos((string)$sql_arr['email3'], $search) !== false) {
              
    $contacts[] = format_email_recipient($sql_arr['email3'], $sql_arr['name']);
            }
            if (
    stripos((string)$sql_arr['email4'], $search) !== false) {
              
    $contacts[] = format_email_recipient($sql_arr['email4'], $sql_arr['name']);
            } 
    to disabled the delete button and DEL/Entf Key add the ID from Global Contact to
    /program/js/app.js
    search for
    PHP Code:
    this.enable_command('delete', list.selection.length && this.env.address_sources && !this.env.address_sources[this.env.source].readonly); 
    and add at the end this replace 275 with your global contacts id you can add more then one id
    PHP Code:
    this.enable_command('delete', list.selection.length && this.env.address_sources && !this.env.address_sources[this.env.source].readonly && id != 275); 
    and at the end
    PHP Code:
    # ----------------
    #
    # Database Additions for contact multiple emails
    # Run in PhpMyAdmin on the database that holds the RC Contacts table. Change the table name rc_contacts to your contacts table name:
    #
     
    ALTER TABLE `contactsADD `global_contactTINYINT(1NOT NULL default '0';
     
    ALTER TABLE `contactsADD `firmVARCHAR(128NOT NULL ;
     
    ALTER TABLE `contactsADD `positionVARCHAR(50NOT NULL ;
     
    ALTER TABLE `contactsADD `p_telVARCHAR(30NOT NULL ;
     
    ALTER TABLE `contactsADD `p_faxVARCHAR(30NOT NULL ;
     
    ALTER TABLE `contactsADD `p_mobVARCHAR(20NOT NULL ;
     
    ALTER TABLE `contactsADD `p_addressTEXT NOT NULL;
     
    ALTER TABLE `contactsADD `w_telVARCHAR(20NOT NULL ;
     
    ALTER TABLE `contactsADD `w_faxVARCHAR(20NOT NULL ;
     
    ALTER TABLE `contactsADD `w_mobVARCHAR(20NOT NULL ;
     
    ALTER TABLE `contactsADD `w_addressTEXT NOT NULL;
     
    ALTER TABLE `contactsADD `noticeTEXT NOT NULL;
     
    ALTER TABLE `contactsADD `email2VARCHAR(128NOT NULL ;
     
    ALTER TABLE `contactsADD `email3VARCHAR(128NOT NULL ;
     
    ALTER TABLE `contactsADD `email4VARCHAR(128NOT NULL ;
    # ------------------------------------------------------------- 

+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast

LinkBacks (?)

  1. 12-14-2009, 02:21 PM
  2. 09-22-2009, 07:48 AM
  3. 08-07-2009, 02:48 AM
  4. 07-10-2009, 10:49 PM
  5. 06-16-2009, 09:55 PM
  6. 04-18-2009, 10:20 AM
  7. 04-15-2009, 06:19 AM
  8. 03-31-2009, 08:03 AM
  9. 03-24-2009, 11:55 AM
  10. 03-16-2009, 08:22 PM
  11. 02-27-2009, 03:19 AM
  12. 02-24-2009, 12:04 AM
  13. 01-26-2009, 09:15 PM
  14. 01-24-2009, 06:54 PM
  15. 01-24-2009, 09:53 AM
  16. 01-23-2009, 04:37 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts