Re: Global Address book

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>   I have another issue with the global address book. I've been trying to
> get it working. I'm getting there because i could connect to the ldap
> server from the squirrelmail and view it by clicking on Compose button
> -> Addresses.
>
>   However, the problem i have is the information listed there is limited.
> For example, there are only 5 columns which are all,all,all | Name |
> Email | Info | Source. What i like to see is instead of having Info
> there, i want Telephone. How do i get the value of Telephone from the
> ldap server? I could find the code in abook_ldap_server.php. But how do
> i write the code so that it would retrieve the value of phone number?
>
>   It's TelephoneNumber in the contact.ldif in ldap server.

patch -p 0 < abook_ldap_server.php.diff

in SquirrelMail functions directory.

or check http://www.squirrelmail.org/plugin_view.php?id=42

-- 
Tomas
--- abook_ldap_server.php.orig	2006-08-01 20:14:28.337224256 +0300
+++ abook_ldap_server.php	2006-08-01 20:20:05.176016976 +0300
@@ -280,7 +280,7 @@
         }
 
         $sret = @ldap_search($this->linkid, $this->basedn, $expression,
-            array('dn', 'o', 'ou', 'sn', 'givenname', 'cn', 'mail'),
+            array('dn', 'o', 'ou', 'sn', 'givenname', 'cn', 'mail', 'telephonenumber'),
             0, $this->maxrows, $this->timeout);
 
         /* Should get error from server using the ldap_error() function,
@@ -309,7 +309,9 @@
             $nickname = $this->charset_decode($row['dn']);
             $fullname = $this->charset_decode($row['cn'][0]);
 
-            if(!empty($row['ou'][0])) {
+            if(!empty($row['telephonenumber'][0])) {
+                $label = $this->charset_decode($row['telephonenumber'][0]);
+            } elseif(!empty($row['ou'][0])) {
                 $label = $this->charset_decode($row['ou'][0]);
             }
             else if(!empty($row['o'][0])) {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
squirrelmail-users mailing list
Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux