affordable web development services
| About Us | Services | Download | Order | Support | Subscribe to News Feed Follow us on Twitter Join us on Facebook |
 

PHP Event Calendar v1.5 - Documentation

Table of Contents

Description

PHP Event Calendar is reusable PHP script extending web site's functionality with event scheduler or news archive. Nice looking calendar is dynamically created on the user's page. Every aspect of the script is configurable. With intuitive control panel minimum efforts are required to set up and maintain the script.

Features

System Requirements

In general PHP Event Calendar is compatible with any OS and web server supporting PHP v4.01 or later. We've tested the component under:

OS:

Web Server:

Installation Instructions

After receiving PHP Event Calendar distribution package:

  1. Upload the script to your server
  2. Run install.php file. There you can see the following input fields with paths set by default*:
  3. Click on "Install" button.
  4. If your files have been updated the installation process is complete.
  5. Now you can use your PHP Event Calendar.

*You may change these paths if you wish.
Preferably use absolute paths. Absolute path to cl_files folder you can know at phpinfo.php page. Absolute path to phpinfo.php page will be shows in "SCRIPT_FILENAME" variable for Apache Web Server or in "PATH_TRANSLATED" variable for Intarnet Information Server.
Note: If you use back slash then you should use double back slashes for a webserver running under Windows systems.

Adding calendar code to your page

Before adding calendar code to your page you should create a new calendar in Control Panel.

Insert the following PHP code in the beginning of the page:

<?
include 'path_to_calendar_dir_files/calendar.php';
?>

then you can place one or several calendars inserting the following code properly:

<?
new calendar(Your_calendar_name);
?>

Code inserting for events listing

Insert the following PHP code in the beginning of the page:

<?
include 'path_to_calendar_dir_files/calendar.php';
?>

then you can insert the following code properly:

<?
$calendar->init($c_num);
$calendar->show_event();
?>

File link.php

<?
include 'path_to_calendar_dir_files/calendar.php';
$calendar->init($c_num);
$calendar->show_event();
?>

Call

<iframe src='link.php'></iframe>

Positioning of calendar and events list on the same page

To place calendar and events list on the same page you should set Calendars Config -> Default eventcell settings -> Open event list at URL the same as URL that contains calendar, for example:

index.php

Target should be set to _self. In this case call of code that shows events will look like
$calendar->init('calendar name');
$calendar->show_event();

Sample page will look like:

<?
include 'path_to_calendar_dir_files/calendar.php';
?>
here you can put any HTML code
<?
new calendar(Your_calendar_name);
?>
here you can put any HTML code
<?
$calendar->init(Your_calendar_name);
$calendar->show_event();
?>

Control Panel

Control Panel is available on URL http://<Your site>/<directory where PHP Calendar package is installed>/cl_files/index.php

Add /delete calendar

To add new calendar:
1Type in text field in middle left page area the desired calendar name (use only Latin letters and digits).
2Click on "Create" button.
To delete calendar:
1Click on "Delete calendar" button corresponding to the name of calendar you want to delete.

Settings

You can change any information available on this page and then perform one of the actions clicking on the corresponding button:

ApplyAll changed information will be applied to calendar visible on admin page. CHANGES WILL NOT INFLUENCE on calendar of main page.
SaveAll changed information will be applied to calendar visible on admin page AND ALSO to calendar of main page. Changes will be saved and return IS NOT POSSIBLE.
Reset to savedResets parameter values to the ones being at the moment of the last "Save" operation.
Reset to DefaultsResets parameter values to the ones being at the moment of the calendar installation.

Events editor

It is possible either to add an event or to redirect to custom URL. More detailed instructions are given in the table below:

To add event:To edit event:
1Choose the desired calendar date.Click on "Edit event" button.
2Type in message subject, body and cell settings into corresponding form fields.Edit message body, subject and cell settings.
3Click on "Add event" button.Click on "Update event" button.
Requirements
To successfully add new event you should type the following data:
  • title and body of event - required
  • Background color, Background image, Align - optional current event cell settings
Periodical settings
You can create repeated event. To do that you should:
  • Choose one of the following repeat interval "Day", "Week", "Month", "Year".
  • In the corresponding filelds you can type period of event and end date.
  • In the "Week" you can choose also weekdays to repeat current eventon.
To delete event:
1Click on "Delete" link corresponding to the event you want to delete.
To redirect to custom URL:
1Type in desired URL, target and event title into correspondent form fields. Event title will display the tooltip when you move your mouse over event's date on the calendar.

Calendars configuration

On this page you can see control elements allowing to configure calendar layout and efficiency.

ParameterDescription
 
General settings
Show week numbersCalendar may have none, top/right or bottom/left displayed week numbers.
Days locationCalendar may have none, top/right or bottom/left displayed days.
Title formatYou can change title output format according to the following rules:
LetterReplaced byExample
D3 initial letters of day name"Mon"
Ffull month name"January"
lfull day name"Monday"
mcurrent month double-digit index"01" to "12"
M3 initial letters of current month"Jan"
ncurrent month index without leading zeros"1" to "12"
Ycurrent year in 4 digits representation"2003"
ycurrent year in 2 digits representation"03"

Example: if today is January, 2003 then "Y, M" caption string will be displayed as "2003, Jan".

Note: if you want to use customize month name you should use "M" letter.

Time formatYou can choose time standard in which your events are showing.
Show time gradationYou can choose use time gradation or no.
Time zoneYou can choose time zone in which your events take place.
Start of the weekFirst day of the week can be either in European or American format.
Year arrowsThis option allows you to show and hide year arrows.
GeometryYou can specify calendar's geometry (vertical or horizontal).
Table settings
Feel free to change any table parameters for presented fields and therefore make calendar design the most similar to your site design.
Default eventcell settings
You can change any default eventcell parameters as you wish to make eventcell to stand out against a background of calendar.
You can set different eventcell look for each event date in the Events editor
Color settings
Feel free to change any color for presented fields and therefore make calendar design the most similar to your site design.
Starting from version 1.4 it is possible to set font styles.
Note: weekends font color and style is applicable only to days of current month but weekends background color - to all weekends regardless of month
Localization
This option is very useful if you need months and weekdays localization.
Arrows settings
While changing font or background color you can alter arrows design as well.

Templates configuration

You can output the event either using template or specifying corresponding event page URL:

Alternative URLYou can type in any URL using variables to be replaced on output by values of day (%d variable) , month (%m variable) and year (%y variable) of corresponding event.
Event Browser TemplateGiven template consists of header, event entry and footer. You can change it using the following variables:
  • $num - event number
  • $title - event title
  • $body - event body
  • $time - event time

Events are output one by one in show.php file in the form specified in event template. To see all changes you should click on the desired date on calendar of main page.

Security configuration

You can change login and password for access to PHP Event Calendar Control Panel page inserting any digits and Latin letters into corresponding form fields and clicking on "change" link.

Account info configuration

You can change self login and password for access to PHP Event Calendar Control Panel page inserting any digits and Latin letters into corresponding form fields and clicking on "change" link.

Users configuration

If you a member of administratorgroup you can add new groups and users for access to PHP Event Calendar Control Panel page inserting any digits and Latin letters into corresponding form fields and clicking on "change" link. You can also set or unset ability to access for members of same group to same partitions of Control Panel.

Configs Settings Changing

  1. Specify corresponding paths to the files according to the table below:
    FilesKeyDefinition
    cl_files/calendar.php
    cl_files/data/global.php
    path_to_calendarpath to working files
    cl_files/calendar.php
    cl_files/data/global.php
    path_to_calendar_imgpath to images
    cl_files/calendar.php
    cl_files/data/global.php
    WEB_path_to_calendar_imgImages URL
    cl_files/calendar.php
    cl_files/data/global.php
    path_to_datapath to data
    <?
    $PATHS=array(
    	'path_to_calendar' => "/some_path/cl_files/",
    	'path_to_calendar_img' => "/some_path/cl_files/img/",
    	'WEB_path_to_calendar_img' => "http://mydomain/cl_files/img/",
    	'path_to_data' => "/some_path/cl_files/data/"
    );
    ?>
    	
  2. Modify recursively directory access permissions so that the user under which PHP works could write to the directory cl_files/data/
  3. Modify access permissions of the files so that the user under which PHP works could write and read files

Terms and Conditions

PHP Event Calendar is free of charge for non commercial applications. In order to use it in commercial application the license should be purchased.

Regular License

One PHP Event Calendar script license gives the right to use one copy of the script within single domain boundaries.

Demo of Licensing Cases:
First Site URL Second Site URL Number of Licenses Required
http://www.domain.com/site_1/ http://www.domain.com/site_2/ one
http://www.domain1.com/ http://www.domain2.com/ two
http://subdomain1.domain.com/ http://subdomain2.domain.com/ two

To finalize registration process owner of the script license should provide SoftComplex Inc. with domain name which license is associated with.

Developer License

Developer license gives the right to include unlimited number of PHP Event Calendar instances in the products of license owner. Such kind of license is obtained automatically by those who have 9 or more regular licenses.

Discounts

We offer 50% discount for the script starting from second license. To take advantage of this discount use the link sent with every order confirmation message.
Same discount initially applies to educational and religious organizations.

Usage

As owner of the PHP Event Calendar license You are allowed to configure the script in any possible way for use in Internet (public), Intranet (corporate) or offline application, however You are strictly NOT allowed (unless specifically authorized by SoftComplex.com) to:

Technical Support

You are entitled to free product upgrades and technical support for at least one year from the date of purchase. Technical support includes answers to script related questions via e-mail and/or Internet instant messaging services. Full scroller customization services are provided on customer's request at additional charge.

Violations of Terms and Conditions

Should you violate these Terms and Conditions or any other rights of SoftComplex Inc., SoftComplex Inc. reserves the right to pursue any and all legal and equitable remedies against you without limitation.

Refunds Policy

We issue no refunds for this product. Please make sure PHP Event Calendar meets your requirements before purchasing the license.

Links and references