+ Reply to Thread
Page 2 of 5 FirstFirst 1 2 3 4 ... LastLast
Results 11 to 20 of 50

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

  1. #11
    malikhemani is offline Registered User
    Join Date
    Feb 2008
    Location
    Houston, TX
    Posts
    7
    Downloads
    1
    Uploads
    0

    Default sorry

    sorry i had steped away from the project. Let me give it another try and get back to you if i have any problems and return error logs

    thanks and take care,

  2. #12
    NEComputer is offline Registered User
    Join Date
    May 2008
    Posts
    5
    Downloads
    1
    Uploads
    0

    Post Updated Global Address Book Plugin

    Hello everyone,

    I have updated the original code to work with the new version of RC v0.2-beta so that when upgrading from v0.1.1 the functionality of the global address book is not loss.

    If anyone finds has a problem with this code, mistakes, or instances this doesn't work please let me know and I can investigate into the problem further.

    -Pat

    The code:

    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 `contacts` ADD `global_contact` TINYINT(1) NOT NULL default '0';
     ALTER TABLE `contacts` ADD `firm` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `position` VARCHAR(50) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_address` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_address` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `notice` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `email2` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `email3` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `email4` VARCHAR(128) NOT NULL ;
    # -------------------------------------------------------------
    
    #
    # In file /program/include/rcube_contacts.inc
    #
    #Locate 
    var $table_cols = array('name', 'email', 'firstname', 'surname');
    #
    # and replace 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');
    #
    #
    #
    #locate function...
     function list_records($cols=null, $subset=0)
    #locate the 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",
    #
    #and replace with
       $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",
    #
    #
    #
    #locate function...
     function count()
    #locate the code....
      $sql_result = $this->db->query(
       "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
      $sql_result = $this->db->query(
       "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);
    #
    #
    #
    #locate function...
     function get_record($id, $assoc=false)
    #locate the 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
      $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);
    #
    #
    #
    #locate function...
     function update($id, $save_cols)
    #locate the code....
      if (!empty($write_sql))
      {
       $this->db->query(
        "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
      if (!empty($write_sql))
      {
       $this->db->query(
        "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);
    #
    #
    #
    #locate function...
     function insert($save_data, $check=false)
    #locate the code....
       $this->db->query(
        "INSERT INTO ".$this->db_name."
         (user_id, changed, del, ".join(', ', $a_insert_cols).")
         VALUES (?, ".$this->db->now().", 0, ".join(', ', $a_insert_values).")",
        $this->user_id);
    #
    #and replace with the following
         if ($a_insert_values[4] == "'on'") {
    $this->db->query(
        "INSERT INTO ".$this->db_name."
         (user_id, changed, del, ".join(', ', $a_insert_cols).")
         VALUES (?, ".$this->db->now().", 0, ".join(', ', $a_insert_values).")",
        $this->user_id);
    } else {
      $a_insert_values[7]=1;
    $this->db->query(
        "INSERT INTO ".$this->db_name."
         (user_id, changed, del, ".join(', ', $a_insert_cols).")
         VALUES (?, ".$this->db->now().", 0, ".join(', ', $a_insert_values).")",
        $this->user_id);
    }  
    #  
    #
    ---------------------------------------------------------
    #
    # In file /program/include/main.inc
    # 
    #Locate the following function
    function rcmail_get_edit_field($col, $value, $attrib, $type='text')
    #
    #and locate the following code
     if ($type=='checkbox')
    #
    #and replace with the following code
     if($col == "notice")
      {
    	$attrib['rows'] = "8";
    	$attrib['size'] = "40";
    	$attrib['cols'] = "40";
    	$input = new html_textarea($attrib);
    	}
     elseif($col == "p_address" | $col == "w_address")
      {
    	$attrib['rows'] = "4";
    	$attrib['size'] = "40";
    	$attrib['cols'] = "40";
    	$input = new html_textarea($attrib);
    	}
     else if ($type=='checkbox')
    #
    ----------------------------------------------------------
    #
    # In File /program/localization/en_US/label.inc
    #
    #Locate // address boook
    #
    #and insert the following labels
    $labels['global_contact']  = 'Global Contact';
    $labels['firm']   = 'Organization';
    $labels['position']   = 'Position';
    $labels['p_tel']   = 'Telephone';
    $labels['p_fax']   = 'Fax';
    $labels['p_mob']   = 'Mobile';
    $labels['p_address']   = 'Address';
    $labels['w_tel']   = 'Business Telephone';
    $labels['w_fax']   = 'Business Fax';
    $labels['w_mob']   = 'Business Mobile';
    $labels['w_address']   = 'Business Address';
    $labels['notice']   = 'Notice';
    
    $labels['email2']  = 'E-Mail 2';
    $labels['email3']  = 'E-Mail 3';
    $labels['email4']  = 'E-Mail 4';
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/mail/compose.inc
    #
    #locate the following if statement
    if ($result = $CONTACTS->list_records())
    #
    #locate the following code
     while ($sql_arr = $result->iterate())
      if ($sql_arr['email'])
    	   $a_contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
    #
    #and insert the following code after that
      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']);
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/addressbook/edit.inc
    #
    #locate  // return the complete address edit form as table
    #
    #and the following code
     $a_show_cols = array('name', 'firstname', 'surname', 'email');
    #
    #and replace with the following code
     $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');
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/addressbook/show.inc
    #
    #Locate  // return the complete address record as table
    #and the following code
     $a_show_cols = array('name', 'firstname', 'surname', 'email');
    #
    #and replace with the following code
     $data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n";
     $contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n";
    
     $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');
    #
    #
    #The old version of this had things like $out .=sprint#. I have found that all of this is unnecessary in the new version and also the closing table tags because of how the new
    #handles the tags for this area.
    #
    #
    #Locate the following code
      if ($col=='email' && !empty($record[$col]))
    #
    #and replace with the following code
      if (($col=='email' || $col=='email2' || $col=='email3' || $col=='email4') && !empty($record[$col]))
    #
    # ---------------------------------------------------------
    #
    # In file /program/steps/addressbook/save.inc
    #
    #Locate // setup some vars we need
    #and the following code
    $a_save_cols = array('name', 'firstname', 'surname', 'email');
    #
    #and replace with the following code
    $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');
    #
    #
    #Locate the folllowing code
     if (isset($_POST[$fname]))
    #
    #and replace with the following code
     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);
     }
    #
    # ---------------------------------------------------------
    #I have left out the template piece because this can change depending on the template installed.
    # ---------------------------------------------------------

  3. #13
    Wup.nu's Avatar
    Wup.nu is offline Registered User
    Join Date
    Sep 2008
    Location
    Amersfoort, Netherlands
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default

    I have installed the last script for the global address book, it works almost fine but I have one problem... 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...

    Does anyone know what there is wrong? for the rest is it new installation without any plug-in.

    how can you made by global contact a dropdown with yes or no, not everyone on the site understand what the 1 and the 0 doing

  4. #14
    NEComputer is offline Registered User
    Join Date
    May 2008
    Posts
    5
    Downloads
    1
    Uploads
    0

    Post

    I will work on the dropdown for the yes and no as to whether or not the contact should be global. I want to say I think in upcoming versions of roundcube when groups get implemented there will be a personal address book and a global address book, but I am not sure. This should be a simple fix for now.

    -Pat

  5. #15
    Lihualee is offline !Banned!
    Join Date
    Sep 2008
    Posts
    7
    Downloads
    0
    Uploads
    0

    Arrow Knowledge

    bump up lurk

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

    Default

    Here's a mod to the script, to remove Global Address Book
    I work for an ISP, and we don't want all users sharing their addresses, so I took what you had, and removed that feature.
    PHP Code:
    <?php
    # ----------------
    #
    # 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 `contacts` ADD `firm` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `position` VARCHAR(50) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_address` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_address` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `notice` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `email2` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `email3` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `email4` VARCHAR(128) NOT NULL ;
     */
    # -------------------------------------------------------------

    #
    # In file /program/include/rcube_contacts.inc
    #
    #Locate
    var $table_cols = array('name''email''firstname''surname');
    #
    # and replace with
     
    var $table_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');
    #
    #
    ---------------------------------------------------------
    #
    # In file /program/include/main.inc
    #
    #Locate the following function
    function rcmail_get_edit_field($col$value$attrib$type='text')
    #
    #and locate the following code
     
    if ($type=='checkbox')
    #
    #and replace with the following code
     
    if($col == "notice")
      {
            
    $attrib['rows'] = "8";
            
    $attrib['size'] = "40";
            
    $attrib['cols'] = "40";
            
    $input = new html_textarea($attrib);
            }
     elseif(
    $col == "p_address" $col == "w_address")
      {
            
    $attrib['rows'] = "4";
            
    $attrib['size'] = "40";
            
    $attrib['cols'] = "40";
            
    $input = new html_textarea($attrib);
            }
     else if (
    $type=='checkbox')
    #
    ----------------------------------------------------------
    #
    # In File /program/localization/en_US/label.inc
    #
    #Locate // address boook
    #
    #and insert the following labels
    $labels['firm']   = 'Organization';
    $labels['position']   = 'Position';
    $labels['p_tel']   = 'Telephone';
    $labels['p_fax']   = 'Fax';
    $labels['p_mob']   = 'Mobile';
    $labels['p_address']   = 'Address';
    $labels['w_tel']   = 'Business Telephone';
    $labels['w_fax']   = 'Business Fax';
    $labels['w_mob']   = 'Business Mobile';
    $labels['w_address']   = 'Business Address';
    $labels['notice']   = 'Notes';

    $labels['email2']  = 'E-Mail 2';
    $labels['email3']  = 'E-Mail 3';
    $labels['email4']  = 'E-Mail 4';
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/mail/compose.inc
    #
    #locate the following if statement
    if ($result $CONTACTS->list_records())
    #
    #locate the following code
     
    while ($sql_arr $result->iterate())
      if (
    $sql_arr['email'])
               
    $a_contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
    #
    #and insert the following code after that
      
    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']);
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/addressbook/edit.inc
    #
    #locate  // return the complete address edit form as table
    #
    #and the following code
     
    $a_show_cols = array('name''firstname''surname''email');
    #
    #and replace with the following code
     
    $a_show_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');
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/addressbook/show.inc
    #
    #Locate  // return the complete address record as table
    #and the following code
     
    $a_show_cols = array('name''firstname''surname''email');
    #
    #and replace with the following code
     
    $data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n";
     
    $contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n";

     
    $a_show_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');
    #
    #
    #The old version of this had things like $out .=sprint#. I have found that all of this is unnecessary in the new version and also the closing table tags because of how the new
    #handles the tags for this area.
    #
    #
    #Locate the following code
      
    if ($col=='email' && !empty($record[$col]))
    #
    #and replace with the following code
      
    if (($col=='email' || $col=='email2' || $col=='email3' || $col=='email4') && !empty($record[$col]))
    #
    # ---------------------------------------------------------
    #
    # In file /program/steps/addressbook/save.inc
    #
    #Locate // setup some vars we need
    #and the following code
    $a_save_cols = array('name''firstname''surname''email');
    #
    #and replace with the following 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');
    #
    #
    #Locate the folllowing code
     
    if (isset($_POST[$fname]))
    #
    #and replace with the following code
    if (isset($_POST[$fname])){
      
    $a_record[$col] = get_input_value($fnameRCUBE_INPUT_POST);
     }
    #
    # ---------------------------------------------------------
    #I have left out the template piece because this can change depending on the template installed.
    # ---------------------------------------------------------

  7. #17
    Yann is offline Registered User
    Join Date
    Mar 2008
    Posts
    46
    Downloads
    21
    Uploads
    0

    Default

    Quote Originally Posted by jonsjava View Post
    Here's a mod to the script, to remove Global Address Book
    I work for an ISP, and we don't want all users sharing their addresses, so I took what you had, and removed that feature.
    PHP Code:
    <?php
    # ----------------
    #
    # 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 `contacts` ADD `firm` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `position` VARCHAR(50) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_tel` VARCHAR(30) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_fax` VARCHAR(30) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_mob` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `p_address` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `w_tel` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_fax` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_mob` VARCHAR(20) NOT NULL ;
     ALTER TABLE `contacts` ADD `w_address` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `notice` TEXT NOT NULL;
     ALTER TABLE `contacts` ADD `email2` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `email3` VARCHAR(128) NOT NULL ;
     ALTER TABLE `contacts` ADD `email4` VARCHAR(128) NOT NULL ;
     */
    # -------------------------------------------------------------

    #
    # In file /program/include/rcube_contacts.inc
    #
    #Locate
    var $table_cols = array('name''email''firstname''surname');
    #
    # and replace with
     
    var $table_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');
    #
    #
    ---------------------------------------------------------
    #
    # In file /program/include/main.inc
    #
    #Locate the following function
    function rcmail_get_edit_field($col$value$attrib$type='text')
    #
    #and locate the following code
     
    if ($type=='checkbox')
    #
    #and replace with the following code
     
    if($col == "notice")
      {
            
    $attrib['rows'] = "8";
            
    $attrib['size'] = "40";
            
    $attrib['cols'] = "40";
            
    $input = new html_textarea($attrib);
            }
     elseif(
    $col == "p_address" $col == "w_address")
      {
            
    $attrib['rows'] = "4";
            
    $attrib['size'] = "40";
            
    $attrib['cols'] = "40";
            
    $input = new html_textarea($attrib);
            }
     else if (
    $type=='checkbox')
    #
    ----------------------------------------------------------
    #
    # In File /program/localization/en_US/label.inc
    #
    #Locate // address boook
    #
    #and insert the following labels
    $labels['firm']   = 'Organization';
    $labels['position']   = 'Position';
    $labels['p_tel']   = 'Telephone';
    $labels['p_fax']   = 'Fax';
    $labels['p_mob']   = 'Mobile';
    $labels['p_address']   = 'Address';
    $labels['w_tel']   = 'Business Telephone';
    $labels['w_fax']   = 'Business Fax';
    $labels['w_mob']   = 'Business Mobile';
    $labels['w_address']   = 'Business Address';
    $labels['notice']   = 'Notes';

    $labels['email2']  = 'E-Mail 2';
    $labels['email3']  = 'E-Mail 3';
    $labels['email4']  = 'E-Mail 4';
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/mail/compose.inc
    #
    #locate the following if statement
    if ($result $CONTACTS->list_records())
    #
    #locate the following code
     
    while ($sql_arr $result->iterate())
      if (
    $sql_arr['email'])
               
    $a_contacts[] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
    #
    #and insert the following code after that
      
    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']);
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/addressbook/edit.inc
    #
    #locate  // return the complete address edit form as table
    #
    #and the following code
     
    $a_show_cols = array('name''firstname''surname''email');
    #
    #and replace with the following code
     
    $a_show_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');
    #
    # --------------------------------------------------------
    #
    # In file /program/steps/addressbook/show.inc
    #
    #Locate  // return the complete address record as table
    #and the following code
     
    $a_show_cols = array('name''firstname''surname''email');
    #
    #and replace with the following code
     
    $data ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Data</b></legend><table>\n\n";
     
    $contact ="<td width=\"45%\" valign=\"top\">\n<fieldset width=\"45%\" class=\"title\"><legend><b>Contact</b></legend><table>\n\n";

     
    $a_show_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');
    #
    #
    #The old version of this had things like $out .=sprint#. I have found that all of this is unnecessary in the new version and also the closing table tags because of how the new
    #handles the tags for this area.
    #
    #
    #Locate the following code
      
    if ($col=='email' && !empty($record[$col]))
    #
    #and replace with the following code
      
    if (($col=='email' || $col=='email2' || $col=='email3' || $col=='email4') && !empty($record[$col]))
    #
    # ---------------------------------------------------------
    #
    # In file /program/steps/addressbook/save.inc
    #
    #Locate // setup some vars we need
    #and the following code
    $a_save_cols = array('name''firstname''surname''email');
    #
    #and replace with the following 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');
    #
    #
    #Locate the folllowing code
     
    if (isset($_POST[$fname]))
    #
    #and replace with the following code
    if (isset($_POST[$fname])){
      
    $a_record[$col] = get_input_value($fnameRCUBE_INPUT_POST);
     }
    #
    # ---------------------------------------------------------
    #I have left out the template piece because this can change depending on the template installed.
    # ---------------------------------------------------------
    Any help here, I used the code in RC 0.2Beta, everything displayed correctly but I could NOT save the address book. I received "The website cannot display the page" error.

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

    Default

    Quote Originally Posted by Yann View Post
    Any help here, I used the code in RC 0.2Beta, everything displayed correctly but I could NOT save the address book. I received "The website cannot display the page" error.
    Here's a compressed version of my patch. It's the latest SVN release already patched.
    Attached Files
    Last edited by jonsjava; 10-27-2008 at 07:02 PM.

  9. #19
    Yann is offline Registered User
    Join Date
    Mar 2008
    Posts
    46
    Downloads
    21
    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.
    Works like a charm, Thanks

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

    Default

    Glad to be of service

+ Reply to Thread
Page 2 of 5 FirstFirst 1 2 3 4 ... 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