Calendar Template Frequently Asked Questions

This FAQ answers Calendar Template questions. If you have a question that isn't listed here, feel free to ask your question in Calendar Template forum or contact technical support directly.

How to install Calendar Template?

PHPRunner

  • download Calendar template using link from the registration email.
  • Unzip it to <Directory where PHPRunner installed>\templates\business directory.
  • Run PHPRunner.
  • Create a project using Calendar template. You can either create a new database or choose existing one.
  • Once built upload your project to the website.

ASPRunnerPro

  • download Calendar template using link from the registration email.
  • Unzip it to <Directory where ASPRunnerPro installed>\templates\business directory.
  • Run ASPRunnerPro.
  • Create a project using Calendar template. You can either create a new database or choose existing one.
  • Upload your project to the website.

ASPRunner.NET

  • download Calendar template using link from the registration email.
  • Unzip it to <Directory where ASPRunner.NET installed>\templates\business directory.
  • Run ASPRunner.NET.
  • Create a project using Calendar template. You can either create a new database or choose an existing one.
  • Once built upload your project to the website.

Back to top

Calendar Template v4 system requirements

PHPRunner

  • PHPRunner 10.8 or better
  • MS Access, SQL Server, MySQL, Postgre or Oracle database
  • PHP 5.6 or later

ASPRunnerPro

  • ASPRunnerPro 10.8 or better
  • MS Access, SQL Server, MySQL, Postgre or Oracle database

ASPRunner.NET

  • ASPRunner.NET 10.8 or better
  • MS Access, SQL Server, MySQL, Postgre or Oracle database

Back to top

How to display data from different table in calendar format?

You can replace the built-in calcalendar table with your own table. To display data from your own table you need to do the following:

  1. Add your own table to the project on 'Datasource tables' screen
  2. Modify AfterAppInit for this purpose

    PHPRunner

    In AfterAppInit event add the following code after calendar_init(); line:

    ASPRunner.NET

    In AfterAppInit event add the following code after CommonFunctions.calendar_init(); line:

    ASPRunnerPro

    In AfterAppInit event add the following code after calendar_init() line:
  3. Mandatory fields: ID (key column), DateField (or DateTime), Subject. If one of the required fields is missing error message will be thrown in runtime.
  4. Fields Recurrence, EndDate, Period should be specified together if you want to display recurrent events.
  5. TimeField will work without EndTime specified. If EndTime is specified, TimeField must be specified as well.
  6. You have two options to store date/time values. Date and time can be stored separately in two different fields or you can use a single datetime field for this purpose

Can we change the color of calendar entries?

Add the following code to Custom CSS section. Modify color according to your preferences:

What are Start Time and End Time settings under 'Global Settings'?

These settings control what time you can select while creating or editing calendar entries. It will also filter out entries that are outside of the specified time range. This option is useful to limit calendar entries to business hours only.

How to schedule a cron job to run cron.php page once a day or once an hour?

If you need to send event notifications via email or SMS you need to setup a scheduled job on your web server to help Calendar proejct send those notifications. If your website runs on Linux web server and you have access to crontab file you have two options here.

Method 1: Execute the script using php from the crontab

To execute cron.php every 1 hour do the following:

Method 2: Run the php script using URL from the crontab

The URL to schedule is https://website/calendar/cron.php. The following script executes the PHP script every hour by calling the URL using WGET. The -q option indicates a quiet mode. The "-O temp.txt" indicates that the output will be sent to the temporary file.

If you are not sure how to schedule a cron job open a free account with monitoring service like Montastic and add cron page URL to be pinged once a day or once an hour or as often as you need it

Cron page URL:
PHPRunner: https://website/calendar/cron.php
ASPRunnerPro: https://website/calendar/cron.asp
ASPRunner.NET: https://website/calendar/cron

How to change the way event title is displayed

Proceed to Editor->Custom Files->calendar_custom.php (.asp for ASPRunnerPro, .cs for ASPRunner.NET). There will be a function named setTitle(). You can modify that function's code to change the way the title is displayed. Here is the default code.

PHPRunner:

ASPRunner.NET:

ASPRunnerPro:

And a quick example. Here is how it looks by default.

Now we do not want to display anything when event title is empty and in other case we want to prefix the title with the name of the user who created this event. Something like this:

And here is the PHP code that does the job:

Back to top