Download Now!
Documentation

Contents
1. Quick Setup Instructions
2. Before You Begin
2.1. Important Questions
2.2. Requirements
3. Installation and Setup
   3.1. Quick Setup
   3.2. Download
   3.3. Uncompress the Archive
   3.4. Modify Perl Scripts
   3.5. Transfer files to the web server
   3.6. Modify File Permissions
   3.7. Run the Admin Application
4. Troubleshooting Installation
5. Getting Started
   5.1. Basic Concepts
   5.2. Calendar Display Basics
   5.3. Calendar Admin Basics
6. Administrative Application
   6.1. Login Screens
   6.2. Events
   6.3. User Admin
   6.4. Calendar Options
   6.5. Global Options
7. Customization
   7.1. Display Templates
     7.1.1. Template Introduction
     7.1.2. Template Procecssing Flow
     7.1.3. Template Example
     7.1.4. Tag Syntax
     7.1.5. Special Calendar Tags
     7.1.6. Defined Variables
     7.1.7. Include Files
     7.1.8. Retrieving Events
     7.1.9. Template Debugging
     7.1.10. Advanced Notes
   7.2. Template Reference
   7.3. Customizing Admin Templates
   7.4. Language Translation
8. Plugins
   8.1. Concept
   8.2. What Plugins Can Do
   8.3. The Basics
   8.4. Adding Permissions
   8.5. Adding Admin Menu Options
   8.6. Adding and Overriding Templates
   8.7. Adding Custom Functionality
9. Advanced Usage
   9.1. SSIs
   9.2. Command-line
10. Security Considerations
   10.1. Changing File Locations
   10.2. Encrypted Passwords
   10.3. File Locking

Printer-friendly Documentation

Advanced Usage


SSIs

A common use of a calendar system is not only to display a calendar of events display page, but also to list upcoming events on another page, such as the home page of a site. This is done using Server-Side-Includes, or SSI's for short. This will assume that you are familiar with SSI's, their syntax, and how to enable them on your web server.

A typical use of SSI's would be to list today's events on the main page in a list form, providing just a few details and then linking to the main calendar for more details. To accomplish this, a new template file should be created that is used only to display when the calendar is being called through SSI's. This template should be simplified and contain just the HTML output that will be inserted into the HTML of the containing page.

Arguments cannot be passed to CGI scripts running in an SSI environment on most servers. Therefore, another method must be used to pass preferences (such as which template file to use for formatting the output) to the script. Therefore, if the script is run and detects that it is running via an SSI call, it will look for a file called 'ssi.txt' in the 'calendarscript' directory. This file should contain any arguments that the script should process, such as defining which calendar to use, which template, etc. An example of this can be as simple as:
template=ssi.html
This would use the default calendar and the template file called 'ssi.html' in whichever template directory is currently configured for the default calendar. It would up to the template to retrieve only today's events, for example, using a call to &getevents() like:
&getEvents( { duration=>'1d' } );
When using SSI's, there is no way to use multiple calendars. Since arguments cannot be passed to the CGI program, there is no way for the script to determine which calendar it should be using, so it must run off one single config file, no matter how many calendars are actually setup in the application.

Command-line

The calendar script may be used as a command-line tool to generate HTML output. This may be useful in cases where you will run the calendar script locally on your own machine, using your own personal web server, and generate HTML pages showing the calendar of events which you will load on to your web site by hand. This is not the preferred approach, of course, but it is possible.

To run the script on the command-line, you must define the $BASE_DIR setting manually. See the Troubleshooting Installation section for details on how to do this.

The calendar should then run correctly from the command-line, and output an HTML page. The default calendar will be shown, using the default template, for today's date. In order to change the calendar used, template used, etc, you need to pass arguments on the command-line. These arguments are in the name=value format. For example:
calendar.pl calendar=test template=static.html month=1 year=2005 date=1 range=week
This will generate output for the 'test' calendar, using the template file 'static.html' and display the events for the week of 1/1/2005.
Home | Features | Demo | Pricing | Download | Documentation | Support
CalendarScript 3.21 ©Copyright 2003-2018