Table of Contents

Development

Source Code & Version Control

The source code for this project is currently hosted at SourceForge.net.

You can find the project details for PHP iAddressBook on SourceForge.net here.


The SVN repository is organised the usual way:


To checkout the newest development version, enter the following command on the commandline

svn co https://svn.code.sf.net/p/iaddressbook/code/trunk iaddressbook-dev

XML-RPC API

The XML-RPC API has its own page here

Testing

The following vCards were used for all testing. They were created with the AddressBook application found in Mac OS X. All fields have been used to create a maximum stress situation for the parser and the database. The following fields are ignored during the import:


All other fields are correctly imported and correctly exported.

Translation

Translation into other languages is very easy. Every language definition is stored in a php-file which resides in a separate folder for every language below the lib/lang folder. Example: lib/lang/en/lang.php contains the english language strings. The folder names for languages are in 2-letter ISO format (en = english, de = german, it = italian etc.).

Please send me your translations so I can include them in the distribution.

An example of the file contents is given below:

$lang['label_birthday']   = 'birthday';
$lang['label_notes']      = 'notes';
$lang['label_updated']    = 'updated: ';
$lang['label_nocontact']  = 'No Card Selected';
 
$lang['label_title']      = 'Prefix';
$lang['label_firstname']  = 'First';
$lang['label_firstname2'] = 'Middle';
$lang['label_lastname']   = 'Last';
$lang['label_suffix']     = 'Suffix';
$lang['label_nickname']   = 'Nickname';
$lang['label_jobtitle']   = 'Job Title';
$lang['label_department'] = 'Department';
$lang['label_organization'] = 'Company';

Templates

This section describes the HTML template that is currently used. In the current state the template system should be flexible enough to allow you to design a look and feel as you like (and not as the template system likes).

The template files have the file ending .tpl. The main file that keeps it all together is called main.tpl.

main.tpl
   |
   +- search.tpl
   |
   +- tpl_showcontactlist()
   |   +- contactlist.tpl
   |       +- tpl_contactlist()
   |           +- contactlist_item.tpl
   |
   +- tpl_showperson()
       +- person_empty.tpl
       |
       +- person.tpl
       |   +- tpl_addresses()
       |   |   +- address.tpl
       |   |
       |   +- tpl_phones()
       |   |   +- phone.tpl
       |   |
       |   +- tpl_emails()
       |   |   +- email.tpl
       |   |
       |   +- tpl_chathandles()
       |   |   +- chathandle.tpl
       |   |
       |   +- tpl_urls()
       |   |   +- url.tpl
       |   |
       |   +- tpl_relatednames()
       |
       +- person_edit.tpl
           +- tpl_include()
           |   +- person_edit_phones.tpl
           |
           +- tpl_include()
           |   +- person_edit_emails.tpl
           |
           +- tpl_include()
           |   +- person_edit_urls.tpl
           |
           +- tpl_include()
           |   +- person_edit_relatednames.tpl
           |
           +- tpl_include()
           |   +- person_edit_chathandles.tpl
           |
           +- tpl_include()
               +- person_edit_addresses.tpl

Analysis

I was looking for a possibility to display and manage all my contacts with a web based application. Prior to writing this program I checked the web for already existing solutions and found none of them fitting my needs. I wanted the following features to be present:

This is a MUST-HAVE list. My personal addresses are normally stored inside Apples AddressBook which I find to perfectly fit all my needs. I thought that a web based equivalent, that behaves pretty much the same would be very cool.

Existing Work (as of 2007)

This is a list of all PHP addressbook applications I found on the web including a short comment why they did not fit my needs.

The Address Book from http://www.corvalis.net/address/ looked pretty good. It was the only solution that came pretty close to what I wanted. I downloaded the code and started analysing it in the hope I could enhance it a little bit. The problem with this product is that it obviously lacks some application design. Code and HTML are not separated. No use of functions. MySQL support is hardcoded. No abstraction of contacts, addressbook and data display. It gave me the impression of a very professional *hack* :-) I could do this better and that is the reason why I started yet another address book.

Creating a New Release from Development Code