Table of Contents
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:
- The trunk tree contains the most recent development version.
- The branches tree contains subfolders for the different versions (0.9x, 1.0x etc.)
- The tags tree contains snapshots for all software releases ever made.
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
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:
- maidenname (X-MAIDENNAME)
- dates (X-ABDATE)
- addressbook UID (X-ABUID)
All other fields are correctly imported and correctly exported.
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.).
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';
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
- tpl_showcontactlist() creates the list of contacts. It basically just inserts the file contactlist.tpl
- tpl_contactlist() iterates over all contacts and outputs one contactlist_item.tpl per contact.
- All other functions work the same way, you should get the hang of it. Remark that person_edit.tpl does not call any tpl_functions since i thouhgt it would be easier to just inline all the code. Other suggestions are welcome. I have never done a template system before, so it might still have some inconsitencies.
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:
- display/add/edit contacts
- a contact must be able to store besides the default fields a nickname, birthdate, a photo, multiple addresses, emails and phone numbers, a note field and chat handles, search function
- intelligent search function (meaning all fields and values are searched)
- vcard export (to stay flexible if a better solution arises one day)
- vcard import (to facilitate filling the database)
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.
supports all fields needed, search does only check firstname/lastname fields, import missing, vcard export does not export all fields
lacks support for: nickname, birthdate, photo, notes and chat handles, search function, import/export
lacks support for: multiple addresses, multiple emails, nickname, birthdate, photo, chat handles, import/export
Unable to test due to error message: Cannot connect to mysql on host 'mysql'….
lacks support for: nickname, multiple addresses, multiple emails, multiple phone numbers, chat handles, photos, import/export
lacks support for: multiple addresses, multiple emails, multiple phone numbers, nickname, chat handles, birthdate, import/export, photo, search function, commercial (20€)
lacks support for: multiple addresses, multiple emails, multiple phone number, photo, chat handles, search function, import/export
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
- update version number in
/lib/sql/*.sqlschemas and db if necessary
- request updates from translators