I made a patch to the addressbook, which adds two new fields:
mobile and phone

----- Forwarded message from root <[EMAIL PROTECTED]> -----

From: root <[EMAIL PROTECTED]>
Date: Wed, 27 Jul 2005 12:17:15 +0200 (CEST)
To: [EMAIL PROTECTED]
Subject: abook_local_file.php.diff

--- squirrelmail/functions/abook_local_file.php 2005-06-23 11:37:44.000000000 
+0200
+++ squirrelmail.cvs/functions/abook_local_file.php     2005-07-27 
12:13:58.000000000 +0200
@@ -283,6 +283,8 @@
                     'lastname'  => $row[2],
                     'email'     => $row[3],
                     'label'     => $row[4],
+                    'mobile'    => $row[5],
+                    'phone'     => $row[6],
                     'backend'   => $this->bnum,
                     'source'    => &$this->sname));
             }
@@ -314,6 +316,8 @@
                   'lastname'  => $row[2],
                   'email'     => $row[3],
                   'label'     => $row[4],
+                  'mobile'    => $row[5],
+                  'phone'     => $row[6],
                   'backend'   => $this->bnum,
                   'source'    => &$this->sname);
             }
@@ -343,6 +347,8 @@
                 'lastname'  => $row[2],
                 'email'     => $row[3],
                 'label'     => $row[4],
+                'mobile'    => $row[5],
+                'phone'     => $row[6],
                 'backend'   => $this->bnum,
                 'source'    => &$this->sname));
         }
@@ -370,7 +376,9 @@
                 $this->quotevalue($userdata['firstname']) . '|' .
                 $this->quotevalue($userdata['lastname']) . '|' .
                 $this->quotevalue($userdata['email']) . '|' .
-                $this->quotevalue($userdata['label']);
+                $this->quotevalue($userdata['label']) . '|' .
+                $this->quotevalue($userdata['mobile']) . '|' .
+                $this->quotevalue($userdata['phone']);
 
         /* Strip linefeeds */
         $data = ereg_replace("[\r\n]", ' ', $data);
@@ -478,7 +486,9 @@
                                     1 => $userdata['firstname'],
                                     2 => $userdata['lastname'],
                                     3 => $userdata['email'],
-                                    4 => $userdata['label']);
+                                    4 => $userdata['label'],
+                                    5 => $userdata['mobile'],
+                                    6 => $userdata['phone']);
             }
         }
 

----- End forwarded message -----
----- Forwarded message from root <[EMAIL PROTECTED]> -----

From: root <[EMAIL PROTECTED]>
Date: Wed, 27 Jul 2005 12:18:23 +0200 (CEST)
To: [EMAIL PROTECTED]
Subject: addressbook.php.diff

--- squirrelmail/functions/addressbook.php      2005-06-23 11:37:44.000000000 
+0200
+++ squirrelmail.cvs/functions/addressbook.php  2005-07-27 12:10:10.000000000 
+0200
@@ -249,6 +249,8 @@
                 addressbook_inp_field(_("Last name"),    'lastname', $name, 
45, $values, '') .
                 addressbook_inp_field(_("First name"),  'firstname', $name, 
45, $values, '') .
                 addressbook_inp_field(_("Additional info"), 'label', $name, 
45, $values, '') .
+                addressbook_inp_field(_("Mobile"),         'mobile', $name, 
45, $values, '') .
+                addressbook_inp_field(_("Phone"),           'phone', $name, 
45, $values, '') .
                 list_writable_backends($name) .
                 html_tag( 'tr',
                     html_tag( 'td',
@@ -264,6 +266,8 @@
                 addressbook_inp_field(_("First name"),  'firstname', $name, 
45, $values, '') .
                 addressbook_inp_field(_("Last name"),    'lastname', $name, 
45, $values, '') .
                 addressbook_inp_field(_("Additional info"), 'label', $name, 
45, $values, '') .
+                addressbook_inp_field(_("Mobile"),         'mobile', $name, 
45, $values, '') .
+                addressbook_inp_field(_("Phone"),           'phone', $name, 
45, $values, '') .
                 list_writable_backends($name) .
                 html_tag( 'tr',
                     html_tag( 'td',
@@ -685,6 +689,12 @@
         if (empty($userdata['nickname'])) {
             $userdata['nickname'] = $userdata['email'];
         }
+        if (empty($userdata['mobile'])) {
+            $userdata['mobile'] = "";
+        }
+        if (empty($userdata['phone'])) {
+            $userdata['phone'] = "";
+        }
 
         if (eregi('[ \\:\\|\\#\\"\\!]', $userdata['nickname'])) {
             $this->error = _("Nickname contains illegal characters");

----- End forwarded message -----
----- Forwarded message from root <[EMAIL PROTECTED]> -----

From: root <[EMAIL PROTECTED]>
Date: Wed, 27 Jul 2005 12:19:00 +0200 (CEST)
To: [EMAIL PROTECTED]
Subject: addressbook.php.diff2

--- squirrelmail/src/addressbook.php    2005-06-23 11:38:33.000000000 +0200
+++ squirrelmail.cvs/src/addressbook.php        2005-07-27 12:03:24.000000000 
+0200
@@ -279,6 +279,10 @@
                                     'left', '', 'width="1%"' ) . "\n" .
                                 html_tag( 'th', _("Info") .
                                     show_abook_sort_button($abook_sort_order, 
_("sort by info"), 6, 7),
+                                    'left', '', 'width="1%"' ) . "\n" .
+                                html_tag( 'th', _("Phone"),
+                                    'left', '', 'width="1%"' ) . "\n" .
+                                html_tag( 'th', _("Mobile"),
                                     'left', '', 'width="1%"' ) . "\n",
                                 '', $color[9] ) . "\n";
                 }
@@ -286,13 +290,13 @@
                 // Separate different backends with <hr />
                 if($prevbackend > 0) {
                     echo  html_tag( 'tr',
-                            html_tag( 'td', "<hr />", 'center', '' 
,'colspan="5"' )
+                            html_tag( 'td', "<hr />", 'center', '' 
,'colspan="7"' )
                             );
                 }
 
                 // Print backend name
                 echo html_tag( 'tr',
-                        html_tag( 'td', "\n" . '<strong>' . $row['source'] . 
'</strong>' . "\n", 'center', $color[0] ,'colspan="5"' )
+                        html_tag( 'td', "\n" . '<strong>' . $row['source'] . 
'</strong>' . "\n", 'center', $color[0] ,'colspan="7"' )
                         );
 
                 $line = 0;
@@ -348,6 +352,8 @@
                     htmlspecialchars($row['email'])).
                 '&nbsp;</td>'."\n".
                 html_tag( 'td', '&nbsp;' . htmlspecialchars($row['label']) . 
'&nbsp;', 'left', '', 'valign="top" width="1%"' ) .
+                html_tag( 'td', '&nbsp;' . htmlspecialchars($row['mobile']) . 
'&nbsp;', 'left', '', 'valign="top" width="1%"' ) .
+                html_tag( 'td', '&nbsp;' . htmlspecialchars($row['phone'])  . 
'&nbsp;', 'left', '', 'valign="top" width="1%"' ) .
                 "</tr>\n";
             $line++;
         }

----- End forwarded message -----

-- 
Ralf Hildebrandt (i.A. des IT-Zentrums)         [EMAIL PROTECTED]
Charite - Universitätsmedizin Berlin            Tel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin    Fax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBF                 send no mail to [EMAIL PROTECTED]


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
--
squirrelmail-users mailing list
Posting Guidelines: 
http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
List Address: [email protected]
List Archives: 
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id)95
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to