RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Third Party Contributions > Plug-Ins

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 10-08-2007, 11:22 PM
Registered User
 
Join Date: Sep 2007
Location: Santa Fe, NM USA
Posts: 16
Downloads: 0
Uploads: 0
Default Multiple Email Addresses For a Contact

The update code listed below will let you have up to four email addresses for each contact. You should note that the line numbers are based on the fact you have updated RC per an earlier post to support advanced contact information. If you have not, then the updates will still work - you will have to find the right lines to update.

Update code to add multiple email addresses for each contact:
Code:
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/include/rcube_contacts.inc
#
# Replace Line 31 with
 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');
#
#NOTE: If you have not updated this file to include enhanced contacts and global contact
# then just add the string 'email2', 'email3', 'email4', immedialely after the string 'email', on line 31.
#
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/mail/compose.inc
#
# Replace Line 877 with
 while ($sql_arr = $result->iterate()){
#
# Insert the following lines after Line 879
  if ($sql_arr['email2'])
   $a_contacts[] = format_email_recipient($sql_arr['email2'], JQ($sql_arr['name']));
  if ($sql_arr['email3'])
   $a_contacts[] = format_email_recipient($sql_arr['email3'], JQ($sql_arr['name']));
  if ($sql_arr['email4'])
   $a_contacts[] = format_email_recipient($sql_arr['email4'], JQ($sql_arr['name']));
	}
#
# -------------------------------------------------------------------------------------------------------------
#
# In File /program/localization/en_US/label.inc
# Insert after line 163
$labels['email2']  = 'E-Mail 2';
$labels['email3']  = 'E-Mail 3';
$labels['email4']  = 'E-Mail 4';
#
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/edit.inc
# Replace Line 64 with
 $a_show_cols = array('name', 'firstname', 'surname', 'global_contact', 'email', 'email2', 'email3', 'email4', 'firm', 'position', 'p_tel', 'p_fax', 'p_mob', 'p_address', 'w_tel', 'w_fax', 'w_mob', 'w_address', 'notice');
#
#NOTE: If you have not updated this file to include enhanced contacts and global contact
# then just add the string 'email2', 'email3', 'email4', immedialely after the string 'email', on line 64.
#
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/show.inc
# Replace Line 49 with
 $a_show_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');
#
#NOTE: If you have not updated this file to include enhanced contacts and global contact
# then just add the string 'email2', 'email3', 'email4', immedialely after the string 'email', on line 49.
#
# Replace Line 52 (or the one that begins with if (($col=='email'...) with
  if (($col=='email' || $col=='email2' || $col=='email3' || $col=='email4') && !empty($record[$col]))
#
# -------------------------------------------------------------------------------------------------------------
#
# In file /program/steps/addressbook/save.inc
# Replace Line 40 with
$a_save_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');
#
#NOTE: If you have not updated this file to include enhanced contacts and global contact
# then just add the string 'email2', 'email3', 'email4', immedialely after the string 'email', on line 40.
#
# -------------------------------------------------------------------------------------------------------------
#

# 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 `rc_contacts` ADD `email2` VARCHAR(128) NOT NULL ;
 ALTER TABLE `rc_contacts` ADD `email3` VARCHAR(128) NOT NULL ;
 ALTER TABLE `rc_contacts` ADD `email4` VARCHAR(128) NOT NULL ;
David
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 10-09-2007, 05:57 AM
Registered User
 
Join Date: Sep 2007
Posts: 17
Downloads: 2
Uploads: 0
Default Re: Multiple Email Addresses For a Contact

Awesome!! THANKS! Works great!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 02:27 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright © 2006-2008 RoundCube Webmail Community