Installing the quick calendar is easy. Follow the steps below:

  1. Make sure your have LAMP running.
  2. 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.
  3. Download the source code from here
  4. Unzip the downloaded code into a directory of your choice.
  5. Rename config.bak.php to config.php. Configure config.php with the right db and path details.
  6. 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.
  7. Lets try to insert a ’small’ calendar. Paste the following code into the page where you want your calendar to appear:
  8. <?php
    require_once('path_to/controller.php');
    $cssCalendar= 'float:left;margin-right:30px;';
    $cssLongDesc='float:left;margin-left:50px;width:400px';
    // 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.

  9. If you want to customise the calendar, you need to have the right parameters for the initQCalendar() function depending on the theme you choose:

  10. initQCalendar(theme, divCalendar, calendarCss, divLongDesc, longDescCss, day, month, year, category_id, ajax)

    where

    '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.

  11. That’s it. The best way to learn is to look at the demos. Duplicate the theme in the demo and play around.
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • Technorati
  • LinkedIn
  • MySpace
  • Slashdot
  • TwitThis
  • Yahoo! Buzz