+ Reply to Thread
Page 4 of 5 FirstFirst ... 2 3 4 5 LastLast
Results 31 to 40 of 50

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

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

    Default birtday field for Global Addressbook

    i have add the birtday field to Addressbook Birtday must DD.MM.YYYY onfocus field will blank i have add onfocus to allowed inputfield parameters when Birtday is empty show DD.MM.YYYY on editpage and addpage.
    and i have optimized the fieldset html output on show add and editpage for an better display and formating.

    Code:
    ALTER  TABLE  `contacts`  ADD  `birth` VARCHAR( 10  )  NOT  NULL ;
    view attached diff
    Last edited by lacri; 02-01-2011 at 09:29 AM.

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

    Default

    Hello lacri,

    would it be possible for you to create a patch for the changes
    you have described in your "port to 0.2 stable / 0.2.1 " posting ?
    It would be much easier to apply :-)

    Thanks for your great work !!!

    kind regards

    Andreas

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

    Default

    i commit a patch at next monday,
    the weekend is time for my kids

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

    Default

    here is the patch

    not forgett

    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 ;
     ALTER TABLE `contacts` ADD `birth` VARCHAR(10) NOT NULL ;

    Last edited by lacri; 02-01-2011 at 09:29 AM.

  5. #35
    atuin is offline Registered User
    Join Date
    Feb 2009
    Posts
    3
    Downloads
    3
    Uploads
    0

    Smile Extended add book full compatible with thunderbird ldap

    Based on work of lacri

    I remove global contact from database, we use ldap for this

    part 1

    Add /etc/ldap/schema/mozillaorgperson.schema (debian)
    and include it on /etc/ldap/slapd.conf
    Code:
    #
    # mozillaOrgPerson schema v. 0.6.3
    #
    
    # req. core
    # req. cosine
    # req. inetorgperson
    
    # attribute defs
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.1
            NAME ( 'mozillaNickname' )
            SUP name )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.2
            NAME ( 'mozillaUseHtmlMail' )
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
            SINGLE-VALUE )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.3
            NAME 'mozillaSecondEmail'
            EQUALITY caseIgnoreIA5Match
            SUBSTR caseIgnoreIA5SubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.4
            NAME 'mozillaHomeLocalityName'
            EQUALITY caseIgnoreMatch
            SUBSTR caseIgnoreSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.5
            NAME 'mozillaPostalAddress2'
            EQUALITY caseIgnoreListMatch
            SUBSTR caseIgnoreListSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.6
            NAME 'mozillaHomePostalAddress2'
            EQUALITY caseIgnoreListMatch
            SUBSTR caseIgnoreListSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.7
            NAME ( 'mozillaHomeState' ) SUP name )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.8
            NAME 'mozillaHomePostalCode'
            EQUALITY caseIgnoreMatch
            SUBSTR caseIgnoreSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.9
            NAME ( 'mozillaHomeCountryName' )
            SUP name SINGLE-VALUE )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.10
            NAME ( 'mozillaHomeFriendlyCountryName' )
            EQUALITY caseIgnoreMatch
            SUBSTR caseIgnoreSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.11
            NAME ( 'mozillaHomeUrl' )
            EQUALITY caseIgnoreIA5Match
            SUBSTR caseIgnoreIA5SubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.12
            NAME ( 'mozillaWorkUrl' )
            EQUALITY caseIgnoreIA5Match
            SUBSTR caseIgnoreIA5SubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
    
    # un-comment for all LDAP server NOT supporting SYNTAX 2.16.840.1.113730.3.7.1
    attributetype ( 1.3.6.1.4.1.13769.2.1.13
            NAME ( 'nsAIMid' )
            DESC 'AOL Instant Messenger (AIM) Identity'
            EQUALITY telephoneNumberMatch
            SUBSTR telephoneNumberSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.14 NAME ( 'mozillaHomeStreet' )
            EQUALITY caseIgnoreMatch
            SUBSTR caseIgnoreSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
    
    # un-comment for Netscape 6.x and all other LDAP server supporting SYNTAX 2.16.840.1.113730.3.7.1
    # attributeTypes ( 2.16.840.1.113730.3.1.2013
    #       NAME ( 'nsAIMid' )
    #       DESC 'AOL Instant Messenger (AIM) Identity'
    #       SYNTAX 2.16.840.1.113730.3.7.1 )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.96
            NAME ( 'mozillaCustom1' )
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
            SINGLE-VALUE )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.97
            NAME ( 'mozillaCustom2' )
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
            SINGLE-VALUE )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.98
            NAME ( 'mozillaCustom3' )
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
            SINGLE-VALUE )
    
    attributetype ( 1.3.6.1.4.1.13769.2.1.99
            NAME ( 'mozillaCustom4' )
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
            SINGLE-VALUE )
     
    # defined in "A Summary of the X.500(96) User Schema for use with LDAPv3" - RFC 2256
    #
    # attributetype ( 2.5.4.6 NAME ( 'c' 'countryName' )
    #       DESC 'RFC2256: ISO-3166 country 2-letter code'
    #       SUP name SINGLE-VALUE )
    
    # defined in "The COSINE and Internet X.500 Schema" - RFC 1274
    #
    # attributetype ( 0.9.2342.19200300.100.1.43
    #       NAME ( 'co' 'friendlyCountryName' ) 
    #       DESC 'RFC1274: friendly country name'
    #       EQUALITY caseIgnoreMatch
    #       SUBSTR caseIgnoreSubstringsMatch
    #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
    
    
    # objectClass defs
    
    objectclass ( 1.3.6.1.4.1.13769.2.2.1
            NAME 'mozillaOrgPerson' 
            SUP top 
            AUXILIARY
            MAY (    
            sn $     
            givenName $
            cn $ 
            mozillaNickname $
            title $ 
            telephoneNumber $
            facsimileTelephoneNumber $
            mobile $ 
            pager $  
            homePhone $
            street $   
            postalCode $
            mozillaPostalAddress2 $
            mozillaHomeStreet $    
            mozillaHomePostalAddress2 $
            l $ 
            mozillaHomeLocalityName $
            st $ 
            mozillaHomeState $
            mozillaHomePostalCode $
            c $ 
            mozillaHomeCountryName $
            co $ 
            mozillaHomeFriendlyCountryName $
            ou $ 
            o $  
            mail $
            mozillaSecondEmail $
            mozillaUseHtmlMail $
            nsAIMid $ 
            mozillaHomeUrl $
            mozillaWorkUrl $
            description $   
            mozillaCustom1 $
            mozillaCustom2 $
            mozillaCustom3 $
            mozillaCustom4 ) )
    
    # not part of the official Mozilla schema but read by Mozilla: 'departmentNumber' and 'postOfficeBox'
    #
    modifie /program/config/main.inc.php
    and add this on your $rcmail_config['ldap_public']['XXX'] section
    PHP Code:
      'writable'      => true,   // Indicates if we can write to the LDAP directory or not.
      // If writable is true then these fields need to be populated:
      // LDAP_Object_Classes, required_fields, LDAP_rdn
      
    'LDAP_Object_Classes' => array("top""inetOrgPerson""mozillaOrgPerson"), // To create a new contact these are the object classes to specify (or any oth
      
    'required_fields'     => array("cn""sn""mail"),     // The required fields needed to build a new contact as required by the object classes (can includ
      
    'LDAP_rdn'      => 'mail'// The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended
      
    'ldap_version'  => 3,       // using LDAPv3
      
    'search_fields' => array('mail''cn','mozillaSecondEmail' ),  // fields to search in

    // identity block
      
    'name_field'    => 'cn',
      
    'surname_field' => 'sn',
      
    'firstname_field' => 'givenName',
      
    'email_field'   => 'mail',
      
    'email2_field'  => 'mozillaSecondEmail',

    // telephone block
      
    'w_tel_field' => 'telephoneNumber',
      
    'p_tel_field' => 'homePhone',
      
    'w_fax_field' => 'facsimileTelephoneNumber',
      
    'w_mob_field' => 'mobile',
      
    // business data block
      
    'company_field'       => 'o',
      
    'w_address_field'     => 'street',
      
    'w_postcode_field'    => 'postalCode',
      
    'w_city_field'        => 'l',
      
    'w_url_field'         => 'mozillaWorkUrl',
      
    // personel data block
      
    'p_address_field'     => 'mozillaHomeStreet',
      
    'p_postcode_field'    => 'mozillaHomePostalCode',
      
    'p_city_field'        => 'mozillaHomeLocalityName',
      
    'p_url_field'         => 'mozillaHomeUrl',  

    // description block
      
    'desc_field'          => 'description',
        
      
    'sort'          => 'cn',    // The field to sort the listing by.
      
    'scope'         => 'sub',   // search mode: sub|base|list
      
    'filter'        => '',      // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
      
    'fuzzy_search'  => true);   // server allows wildcard search 
    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 == "desc")
        {
            
    $attrib['rows'] = "5";
            
    $attrib['size'] = "60";
            
    $attrib['cols'] = "60";
            
    $input = new html_textarea($attrib);
        }
        else if (
    $type=='checkbox')
         {
         
    $attrib['value'] = '1';
         
    $input = new html_checkbox($attrib); 
    modifie /program/include/rcube_contacts.php
    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''w_tel''p_tel''w_fax''w_mob''company''w_address''w_postcode''w_city''w_url''p_address''p_postcode''p_city''p_url''desc'); 
    modifie /program/localization/fr_FR/labels.inc
    add the lines
    PHP Code:
    /* ========================
       Extended Adress Book
       ======================== */

    // identity block
    $labels['namelegend'] = $labels['surnamelegend'] = 'Identité';

    // mail block
    $labels['emaillegend'] = $labels['email2legend'] = 'E-mail';
    $labels['email2'] = 'Adresse alternative   ';

    // telephone block
    $labels['w_tellegend'] = $labels['w_moblegend'] = 'Numéros de téléphone';
    $labels['w_tel'] = 'Travail   ';
    $labels['p_tel'] = 'Domicile';
    $labels['w_fax'] = 'Fax';
    $labels['w_mob'] = 'Portable';

    // business block
    $labels['companylegend'] = $labels['w_urllegend'] = 'Professionnel';
    $labels['company'] = 'Société';
    $labels['w_address'] = 'Adresse';
    $labels['w_postcode'] = 'Code postal';
    $labels['w_city'] = 'Ville';  
    $labels['w_url'] = 'Page Web';

    // home block
    $labels['p_addresslegend'] = $labels['p_urllegend'] = 'Personnel';
    $labels['p_address']   = 'Adresse';
    $labels['p_postcode'] = 'Code postal';
    $labels['p_city'] = 'Ville';
    $labels['p_url'] = 'Page Web';

    // description block
    $labels['desc']   = ' ';
    $labels['desclegend'] = 'Remarques'

  6. #36
    atuin is offline Registered User
    Join Date
    Feb 2009
    Posts
    3
    Downloads
    3
    Uploads
    0

    Smile Extended add book full compatible with thunderbird ldap

    part 2

    modifie /program/include/rcube_ldap.php
    search for
    PHP Code:
    // The field does exist, add it to the entry.
    $newentry[$fld] = $val
    and replace with
    PHP Code:
    // The field does exist, add it to the entry.
    // correct bug ldap_add() - null values in fields produce an "value #0 invalid per syntax" error on openldap 2.4
    if ($val != "" $newentry[$fld] = $val
    modiefie /program/steps/addressbook/copy.inc
    search for
    PHP Code:
    $success $TARGET->insert($CONTACTS->search($CONTACTS->primary_key$cid), true); 
    and replace with

    PHP Code:
        $ids explode','$cid );

      foreach ( 
    $ids as $id )
      {
        
    $record $CONTACTS->search$CONTACTS->primary_key$id );
        
    $success[$id] = $TARGET->insert$record->records[0], true );
      } 
    modiefie /program/steps/addressbook/edit.inc
    search for
    PHP Code:
    $out "$form_start<table>\n\n"
    and replace with
    PHP Code:
    $out "$form_start\n\n"
    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''email2''w_tel''p_tel''w_fax''w_mob''company''w_address''w_postcode''w_city'
    'w_url''p_address''p_postcode''p_city''p_url''desc'); 
    search for

    PHP Code:
    foreach ($a_show_cols as $col)
       { 
    and add after
    PHP Code:
    if($col=='name' or $col=='email' or $col=='w_tel' or $col=='company' or $col=='p_address' or $col=='desc')
      
    $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=='surname' or $col=='email2' or $col=='w_mob' or $col=='w_url' or $col=='p_url' or $col=='desc')
          
    $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/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''w_tel''p_tel''w_fax''w_mob''company''w_address''w_postcode''w_city''w_url''p_address''p_postcode''p_city''p_url''desc'); 
    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('name''firstname''surname''email''email2''w_tel''p_tel''w_fax''w_mob''company''w_address''w_postcode''w_city''w_url''p_address''p_postcode''p_city''p_url''desc'); 
    search for
    PHP Code:
    if ($col == 'email' && !empty($record[$col])) { 
    and replace with
    PHP Code:
        if($col=='name' or $col=='email' or $col=='w_tel' or $col=='company' or $col=='p_address' or $col=='desc')
          
    $table = new html_table(array('cols' => 2));

        if ((
    $col=='email' || $col=='email2') && !empty($record[$col])) { 
    add just after
    PHP Code:
             'class' => $microformats[$col],
           ), 
    Q($record[$col]));
         } 
    PHP Code:
        else if (($col=='w_url' || $col=='p_url') && !empty($record[$col])) {  
          
    $value html::a(array(
            
    'href' => $record[$col],
        
    'target' => '_blank',
            
    'class' => $microformats[$col],
          ), 
    Q($record[$col]));
        } 

    search for
    PHP Code:
    }
    return 
    $table->show($attrib + array('class' => 'vcard')); 
    and replace with
    PHP Code:

        
    if ($table->size() and ($col=='surname' or $col=='email2' or $col=='w_mob' or $col=='w_url' or $col=='p_url' or $col=='desc'))
          
    $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'))));
       

      }
      return 
    $out


    modiefie how lacri has :
    • /program/steps/mail/autocomplete.inc
    • /skins/default/addresses.css
    • /skins/default/templates/editcontact.html
    • /skins/default/templates/showcontact.html

    execute on your db this sql script
    PHP Code:
    ALTER TABLE `contactsADD `email2VARCHAR(128NOT NULL ;
    ALTER TABLE `contactsADD `w_telVARCHAR(20NOT NULL ;
    ALTER TABLE `contactsADD `p_telVARCHAR(30NOT NULL ;
    ALTER TABLE `contactsADD `w_faxVARCHAR(20NOT NULL ;
    ALTER TABLE `contactsADD `w_mobVARCHAR(20NOT NULL ;
    ALTER TABLE `contactsADD `companyVARCHAR(50NOT NULL ;
    ALTER TABLE `contactsADD `w_addressTEXT NOT NULL;
    ALTER TABLE `contactsADD `w_postcodeVARCHAR(10NOT NULL;
    ALTER TABLE `contactsADD `w_cityVARCHAR(15NOT NULL;
    ALTER TABLE `contactsADD `w_urlVARCHAR(64NOT NULL;
    ALTER TABLE `contactsADD `p_addressTEXT NOT NULL;
    ALTER TABLE `contactsADD `p_postcodeVARCHAR(10NOT NULL;
    ALTER TABLE `contactsADD `p_cityVARCHAR(15NOT NULL;
    ALTER TABLE `contactsADD `p_urlVARCHAR(64NOT NULL;
    ALTER TABLE `contactsADD `descTEXT NOT NULL
    Now, when you add a contact in roundcube, all field are present in your
    thunderbird add book like screenshots
    Attached Images

  7. #37
    Aoster is offline Registered User
    Join Date
    Nov 2008
    Posts
    3
    Downloads
    1
    Uploads
    0

    Default

    Hi lacri,

    thank you very much for the patch :-)

    kind regards

    Andreas

  8. #38
    Dan69 is offline Registered User
    Join Date
    Mar 2009
    Posts
    1
    Downloads
    4
    Uploads
    0

    Default Patch

    Hi,
    How can I apply the patch *.diff?
    Thanks
    Dan

  9. #39
    black_13 is offline Roundcube Newcomer
    Join Date
    Aug 2009
    Location
    Kiev
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default is this work with virsion 0.3

    Enybody using global adresbook on version 0.3 ?

  10. #40
    kendokar is offline Registered User
    Join Date
    Oct 2006
    Posts
    4
    Downloads
    1
    Uploads
    0

    Default

    Hi,
    Please I'm sorry for my dumb question..
    Can anyone tell me what for this global addressbook plugin..

    thanks..

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