Installing the quick calendar is easy. Follow the steps below:
- Make sure your have LAMP running.
- If using PHP 4, need to have magic_quote off. Check that the php directive short_open_tag is 1 (editable via php.ini or .htaccess). The phpinfo() function reveals all your settings.
- Download the source code from here
- Unzip the downloaded code into a directory of your choice.
- Rename config.bak.php to config.php. Configure config.php with the right db and path details.
- There should be a sql file in the dowloaded code. Run the sql in your server to create the sample tables and data. You can of course empty the tables and populate with new data later.
- Lets try to insert a ‘small’ calendar. Paste the following code into the page where you want your calendar to appear:
- If you want to customise the calendar, you need to have the right parameters for the initQCalendar() function depending on the theme you choose:
- That’s it. The best way to learn is to look at the demos. Duplicate the theme in the demo and play around.
// configure calendar theme
initQCalendar('small','qCalendarSmall', $cssCalendar, 'myContentSmall', $cssLongDesc, 0,0,0,0,0);
make sure the 'path_to' is the system path to your quick calendar directory.
initQCalendar(theme, divCalendar, calendarCss, divLongDesc, longDescCss, day, month, year, category_id, ajax)
'theme': name of the theme you want to use. It is the directory name under the themes directory.
'divCalendar': name of the div you want to use to wrap around the calendar.
'calendarCSS': CSS for DivCalendar above.
'divLongDesc': name of the div where you want the long description to populate. This can be a new div or an existing one in the page. If it is a new div, you need to create one as shown in the sample above.
'longDescCss': CSS for the Long Description.
'day': current day. Leave 0 as the default.
'month': current month. Leave 0 as the default.
'year': current year. Leave 0 as the default.
'category_id': 0 means show all categories.
'ajax': Determines if this is an ajax call or not. Leave 0 as the default.