LAMP How To – Open Source At Work

Only Passion Matters

Entries for January, 2009

PHP Quick Calendar V2.2 Updates

14 Jan 2009 (Ver 2.2)
* Calendar now supports hrs, mins and images.
* Add ‘order by’ to sql statements.
* Made admin area more user friendly but still very basic.
* Displaying multiple calendars in one page is now very easy to achieve (See demo).
* Improve logic flow and fix typos.

PHP Quick Calendar Admin Panel

I’ve finally added a simple admin panel for users to administer the events.
As I have said, it is purely functional. Nothing fancy yet. This will help non-programmers or lazy programmers to administer the events easily.
cheers,
Bernard

Quick Calendar: Using Other DB Instead of MYSQL

Using other DB instead of MYSQ is straight forward because mysql built-in functions are only used in 3 areas. The SQL are not perculiar to MYSQL and should be compatible with any other DB.
1. In config.php (about line 20 to 27), change the mysql functions there, ie instead of ‘mysql_connect’, use ‘pg_connect’ for example.
2. In [...]

Creating Your Own Theme

1. Under themes, duplicate the skeleton theme and give a new theme name to the new directory created.

2. In view/calendar.css, replace all style name with .yourtheme.
3. In view/longdesc.css, replace all style name with .yourtheme_longdesc.
4. Change the class name in both model/Calendar.php and model/Longdesc.php to QCalendarYourtheme and LongdescYourtheme.
4. Now the big headache, add in the logic [...]

Software Architecture

Although the calendar is ajaxian, it is actually 90% PHP and 10% Ajax/Javascript. The core logic is written in PHP and Ajax just comes in to improve user experience. One of the main features of the calendar lies in its efficient method of creating the right date to populate the calendar cells. I wrote about [...]