a LuxSoft product

LuxCal Event calendar

I have downloaded LuxCal for database type:
 
  


Table of Content

  1. Installation of Updates

  2. New Installation

    1. Requirements

    2. Before You Start

    3. Installation Steps

    4. Configuring / Customizing the Calendar

    5. My Calendar doesn't Work

  3. Calendar Configuration

    1. LuxCal Version Number and Database Parameters

    2. Automatic Periodic Functions

    3. Installing a New Language

    4. Creating Context-Sensitive Help

    5. Using SMTP Mail for Reminders and Reports

    6. Configuring / Customizing Stand-alone Displays

    7. Configuring / Customizing PDF Printouts

  4. Installing Additional Calendars

    1. Calendars with an Individual Database

    2. Calendars Sharing the Same Database

  5. Switching from a MySQL to an SQLite database and Vice Versa

  6. Adding the Calendar to an Existing Web Page

    1. Link to the Calendar

    2. Add a Sidebar with Upcoming Events

    3. Embed a Stand-alone Display

    4. Embed the Full Calendar

    5. Embed One Specific Calendar View Without Navigation Bar

    6. Embed a so-called Calendar "Display"

    7. Applying Filters to the Calendar

    8. Single Sign On (SSO)


1. Installation of Updates

To upgrade to a new version of the LuxCal Event Calendar follow the instructions in the file "release_notes_luxcal_xxx.html" (where xxx is the calendar version number).

2. New Installation

a. Requirements

For the installation of the LuxCal Event Calendar on the server of your hosting provider, you will need:

b. Before You Start

Before starting the LuxCal installation, create a MySQL database on the server to store the LuxCal calendar data. Ask your hosting provider if they provide a tool for you to do this.

For later use, remember the name of the database server (host name), the username and password required to log in to the database server and the database name to access the database.

The SQLite database data is stored in a file located on your web server. The location of this database file is important. If it's located in a web-accessible folder (document root or lower) and no special measures are taken, this database file could be found, downloaded, and exploited. The path to the database file(s) can be specified during the installation process and is stored in the lcconfig.php file in the calendar root folder. To prevent unauthorized download of your database file(s), the following measures can be taken:

c. Installation Steps

To install the LuxCal Event Calendar on the server of your hosting provider, follow the next steps:

  1. Download and unzip the latest version of LuxCal (file: luxcalxxx.zip, where 'xxx' is the calendar version number) in a temporary location. This file contains the following compressed files: luxcalxxx-calendar.zip and luxcalxxx-toolbox.zip. Unzip the file luxcalxxx-calendar.zip and upload all files and folders to a web accessible folder on the server where you wish to install LuxCal. Keep the luxcalxxx-toolbox.zip file for possible later use.

  2. With your Web browser browse to the folder of the LuxCal installation; this will redirect you to the installxxx.php script ('xxx' is the calendar version number) and show the Installation page.

  3. On the Installation page read the instructions and enter the calendar and administrator details and select "test" If all tests pass successfully, select "install/save". The script will create the necessary tables in the database and saves your LuxCal version number and the database parameters in a file called lcconfig.php in the calendar's root folder. The script will create the SQLite database in the specified folder with the necessary database tables and saves your LuxCal version number and the database parameters in a file called lcconfig.php in the calendar's root folder.

  4. Launch the calendar by browsing to the calendar's URL to ensure the calendar displays properly.

  5. Keep a backup copy of the lcconfig.php file. It contains the LuxCal version number and the parameters for the database.

Note: The file luxcalxxx-toolbox.zip (see step 2 above) contains the LuxCal tools which should be kept for later use and which should be uploaded to the calendar root folder only when needed.

d. Configuring / Customizing the Calendar

The Settings page in the administration menu on the navigation bar can be used to easily change the calendar's configuration settings which are stored in the settings table of the database. These settings, for instance, define the calendar title, the time zone, the language file to be used for the user interface, the default initial view when the calendar is started, the number of weeks/months displayed in the various views, the date and time format, and many other things.

IMPORTANT: Currently the TimeZone is set to "Europe/Amsterdam". If you are in a different time zone, change the TimeZone to your local time zone. See the PHP Supported Timezones for possible values.

The user interface style (colors, fonts, etc.) can be customized via the UI-Styling page in the administration menu. See the admin_guide.html, section "User Interface Styling" for further instructions. This can be particularly useful when the calendar is embedded in an existing web page and should match the style of the parent web page.

e. My Calendar doesn't Work

The most frequent problems:

With the lctools.php script, which you can find in the LuxCal toolbox, you can check if your LuxCal calendar installation is ready for use or to further analyse above problems.

3. Calendar Configuration

a. LuxCal Version Number and Database Parameters

During the LuxCal installation process a file called lcconfig.php is created and stored in the root folder of the calendar. If, when launching the calendar, the file lcconfig.php is not present in the calendar's root folder, it is assumed the calendar has not yet been installed and consequently the calendar's installation script will be started.

The file lcconfig.php contains the following data (in the form of PHP variables):

b. Automatic Periodic Functions

The following automatic periodic functions are available:

To make the automatic periodic functions work, a cron job needs to be created on the server (or on an external server), which executes the file lcalcron.php, in the root folder of the calendar, daily at approx. 2:00am. For cron job details see the header of the lcalcron.php file.

If you are not familiar with cron jobs, ask your hosting provider for help. A general description of how to define a cron job can be found in the header of the file 'lcalcron.php' in the calendar root folder.

- The Email / SMS Notification Feature

For events entered in the calendar the user can choose to send an email and/or SMS reminder (notification) directly or one or several days before the event is due. For a more detailed description of this feature, see the admin_guide.html

This feature should be configured on the admin's Settings page in the section Reminders.

In the Reminder's subsection General you can specify the default recipients list, shown when creating events. If the list is left blank, the default recipient will be the event owner.

In the Reminder's subsection Email, the various values and parameters needed to be able to send email notifications can be specified.

In the Reminder's subsection SMS, the various values and parameters needed to be able to send SMS notifications can be specified. The first thing required to be able to use the SMS service, is to find a provider, which offers a mail-to-sms service, meaning that an SMS can be sent by sending an email with the SMS data to the provider. The layout of the provider's email address to be used should be for example: {free text 1}{recipient mobile phone number}{free text 2}@mail2sms.com. On the Settings page this layout is defined by the SMS carrier template. With some providers it is possible to add some special text with the sender ID (normally the mobile phone number) to the email's subject field; this can be achieved on the Settings page by completing the SMS subject template.

- Receiving Calendar Changes by Email

In a multi-user environment it could be useful to be aware of changes being applied to the calendar content, i.e. a list with events added, edited and deleted. Such a list can be called up via the options panel. It is however also possible to have a list with changes automatically sent daily to one or more email addresses.

Via the Settings page the administrator can specify the number of days to look back for changes and a list with email addresses. If the number of days to look back for changes is set to 0 (zero), no emails with changes will be sent.

- Daily Export of Events in iCalendar format

When enabled on the admin's Settings page, each day a file in iCalendar format (.ics extension) will be created in the 'files' folder with all events occurring in the time range -1 week until +1 year. These files can be imported by other calendar applications. The name of the file is the calendar name with the characters ' ','/','\','?','*',':',';','{','}' replaced by an underscore and diacritics removed. A new file will overwrite the previous one.

- Automatic Deletion of Expired Events

Events which due date has past can automatically be deleted. Via the Settings page the administrator can specify the number of days after an event's due date when an event will automatically be deleted. If the number of days is set to 0 (zero), no events will be deleted.

Note: deleted events are flagged "deleted"; definitively removing deleted events from the database is done via the admin's Database page.

- Automatic Deletion of Expired (unused) User Accounts

The account of users who have not logged in during a certain number of days can automatically be deleted. Via the Settings page the administrator can specify the number of 'no login' days after which the user account will be deleted. If the number of 'no login' days is set to 0 (zero), no user accounts will be deleted.

This function can be particularly useful when users are allowed to self-register (this feature can be switched on/off on the admin's Settings page).

c. Installing a New Language

= Note: in the following text the part {language} (including the braces) of the file names represents the name of the relevant language. =

A new language for the user interface of the LuxCal calendar can be installed as follows:

IMPORTANT NOTE: When using special characters (e.g. accents) in the language files, the ui and ug files can best be saved with character encoding: utf-8 without BOM (BOM = Byte Order Mark). If your text editor does not support utf-8 without BOM, you can download and use Notepad++ (Notepad++ on Sourceforge). This is an excellent free text editor!

d. Creating Context-Sensitive Help

Each calendar page has a Help option in the side menu which can be opened via the hamburger button in the right upper corner of the calendar. If no context-sensitive help is available, selecting Help will open a window with the general Help information. If however context-sensitive help information is available, dedicated help for the current calendar page will be shown.

For each calendar page context-sensitve help information can be created in a file which is stored in the calendar's help folder. The file name contains the associated calendar page number (see "(pn)" below) and the language (see "(lang)" below); it should take one of the following formats:

A list of possible calendar page numbers can be found at the end of this section.

The calendar's help function will search the "help" folder for a file in the order given above. So for example, if the current page is Month view and the current user interface language is English, it searches for "ug-02-english.html" and if not found it will search for "ug-02.html". If no context-sensitive help file is found, the general help file "ug-english.php" from the "lang" folder will be displayed.

If the language is omitted in the file name, the file will be used whatever user interface language is active.

So for example the file "ug-02-english.html" contains the help information for the calendar's Month view page in the English language.

The context-sensitive help files may contain HTML-code. The file should contain the HTML code which is normally placed between the <body>-tags of an HTML file (not the body-tags themselves). The calendar's styles sheet will be applicable.

Examples of context-sensitive help files can be found in the calendar's "help" folder.

Possible calendar pages and numbers:

01: Year view
02: Full Month view
03: Work Month view
04: Full Week view
05: Work Week view
06: Day view
07: Upcoming view
08: Changes view
09: Matrix view (categories)
10: Matrix view (users)
20: Login page
21: Account page
22: Search page
23: Contact Form page
24: Thumbnails page
30: Event Add window
31: Event Edit window
32: Event Report window
39: User Guide
80: Settings page
81: Categories page
82: Users page
83: User Groups page
84: Database page
85: User Import page (CSV file)
86: User Export page (CSV file)
87: Event Import page (iCal file)
88: Event Export page (iCal file)
89: Event Import page (CSV file)

e. Using SMTP Mail for Reminders and Reports

Reminder emails and email reports (triggered by a cron job) are sent by default via the PHP mail system. If however, email authentication is required, the admin can choose on the Settings page, under General, to use an SMTP mail server.

Before choosing SMTP mail on the admin's Settings page, the following SMTP mail server parameters must be specified on the Settings page:

Note: TLS (Transport Layer Security) is not supported.

If you don't know what parameters to use, ask your mail provider for the correct parameters.

Example: To use a gmail SMTP server with your "my.mail@gmail.com" email address, the SMTP settings on the Settings page should be as follows:

The tool called "smtptest.php", which you can find in the LuxCal toolbox, can be used to test the SMTP settings specified on the Settings page.

e. Configuring / Customizing Stand-alone Displays

When using a stand-alone display (see section 6c hereafter) the used display has a number of default configuration settings, which can be tailored to your needs. In the file displays.html in the calendar's "configs" folder you will find detailed instruction of how to tailor the configuration settings when using one or more displays.

e. Configuring / Customizing PDF Printouts

PDF printouts in A4 and A5 format can be produced from the calendars side menu and from stand-alone displays (see section 6c hereafter). Each PDF printout format has a number of default configuration settings, which can be tailored to your needs. In the file pdfs.html in the calendar's "configs" folder you will find detailed instruction of how to tailor the configuration settings for the PDF printouts.

4. Installing Additional Calendars

During the initial installation of the calendar one calendar will be installed in your MySQL database. The tables of this calendar will be prefixed with the string "mycal_" and the calendar title will be "My Web Calendar".

There are two ways to add additional calendars:

  1. After the initial installation, install the calendar a second time, a third time, etc., each time in it's own folder. This way of installing will require a MySQL database per calendar. To upgrade later to a newer calendar version, you will have to upgrade each individual calendar.
  2. After the initial installation, use the LuxCal tool lctools.php from the LuxCal toolbox and launch the tool via your browser. This tool can very efficiently create additional calendars, sharing the same database by prefixing the calendar tables with a unique text string per calendar. To upgrade later to a newer calendar version, you will only have to upgrade one installation.

During the initial installation one calendar with its SQLite database will be installed.

There are two ways to add additional calendars:

  1. Start the installxxx.php script (xxx is the calendar version), which ran automatically during the initial installation, a subsequent time directly via your browser (www.yoursite.xxx/calfolder/installxxx.php). The installation script allows you to install multiple calendars, to change the default calendar and folder and to change the administrator credentials.
  2. After the initial installation, upload the LuxCal tool lctools.php from the LuxCal toolbox and launch the tool via your browser. Via this tool you can create additional calendars and it offers you various other functions to manage your calendar installtion.
a. Calendars with an Individual Database

To install more than one calendar, each calendar using its own database, the installation steps described in section 2 should be repeated for each calendar. For each next calendar, a new MySQL database should be created and the calendar should be installed in a new folder.

This process can be repeated as many times as needed. The disadvantage of installing several individual calendars however is that you will need one MySQL database per calendar and when upgrading to a new calendar version, each individual calendar needs to be upgraded.

The different calendars can be started by browsing to the relevant calendar folders.

b. Calendars Sharing the Same Database

To install additional calendars, all sharing the same database, start the installxxx.php script (xxx is the calendar version), which ran automatically during the initial installation, a subsequent time directly via your browser (www.yoursite.xxx/calfolder/installxxx.php). The installation script allows you to install multiple calendars, to change the default calendar and to change the administrator credentials.

The advantages of installing multiple calendars sharing the same database are: Only one single database is needed and when upgrading to a newer LuxCal version, just one single upgrade for all calendars.

One calendar will be set as the default calendar. This calendar will start when browsing to the calendar folder. The other calendars can be started by adding '?cal=xxx' to the calendar URL, where 'xxx' is the calendar ID.

IMPORTANT NOTE:: When multiple calendars are installed within one LuxCal software installation, these calendars will be fully independent. However, since the thumbnails of all calendars are installed in the same "thumbnails" folder and the names of thumbnail images managed via the Thumbnail Images page are prepended with the user ID of the user who uploaded the thumbnail, users with the same user ID in each calendar will see and be able to delete each others thumbnail images.

5. Switching from a MySQL to an SQLite database and Vice Versa

The LuxCal calendar is available in two flavors: 1) using a MySQL database and 2) using an SQLite database. The functionality of both is fully identical; so the calendar user will notice no difference between both versions.

The technical differences between both versions can be summarized as follows:

The SQLite database is held in a separate single file at a location of your choice. No set up or administration is needed. During the installation, just tell the calendar where to store it and what name it should be given and that's all there is.
When running multiple calendars, each individual calendar will have its own database file, which name corresponds to the calendar ID. So handling the individual databases is really easy; just a matter of copying, moving, renaming, or whatever.

The MySQL database is running on a (maybe virtual) database server installed by your ISP. Before installing the calendar, you will have to create the database, using tools provided by your ISP.
The database is defined by host (db server) name, user name, password and database name.
When running multiple calendars, each individual calendar has its own set of database tables in the same MySQL database. For each calendar, the relevant set of tables has a unique name (the calendar ID) prefixed to each database table. Handling the individual databases can only be done via software tools.

Switching from LuxCal - MySQL to LuxCal - SQLite can be done as follows:

Switching from LuxCal-SQLite to LuxCal-MySQL can be done as follows:

6. Adding the Calendar to an Existing Web Page

To use the calendar on an other web site, the following possibilities are available:

a. Link to the Calendar

To link to the LuxCal calendar in an existing web page and open it in a new window, the following HTML code can be used:

<a href="http://www.mycalsite.xx/luxcal/" target="_blank">Go To My Calendar</a>

If you want to display a subset of the available events, see "Applying Filters to the Calendar" below.

b. Add a Sidebar with Upcoming Events or ToDo list

A sidebar with public upcoming events or a ToDo list for the coming x days can be added to your web page. The sidebar is placed in a <div>-tag container, can be placed at any location and is fully customizable. An example is shown on the LuxCal Demo page of the LuxSoft web site. The sidebar can be added to your web page by adding the following lines of code to the <head>-section of your web page:

<link rel="stylesheet" type="text/css" href="mycalendarfolder/css/css_sbar.php"> <script type="text/javascript" src="mycalendarfolder/common/toolbox.js"></script>

and adding the following lines of code to the body of your web page:

<?php $sbClass = {sidebar class}; * $sbCal = {calendar ID}; * $sbContent = {sidebar content}; * $sbHeader = {sidebar title}; * $sbEvtHead = {event layout}; * $sbGroups = {list of user groups for which events to show}; * $sbUsersIn = {list of users to include}; * $sbUsersEx = {list of users to exclude}; * $sbCats = {list of event categories to show}; * $sbMaxNbr = {max. number of events to show}; * $sbUpDays = {max. number of days to show}; * $sbWeekDay = {week day for which events to show}; * $sbRec1x = {show only the next recuriing event}; * include './mycalendarfolder/lcsbar.php'; ?>

* These parameters are optional and can be omitted. See explanation hereafter.

Explanation of the lines of code:

All parameters indicated by {....}, including the braces, are text strings between single or double quotes.

In the above lines of code you should replace mycalendarfolder by the name of the root folder of your calendar installation.

The file css_sbar.php contains the default style for the sidebar container <div>, which should be tailored to your needs. In the same file you can customize the style, colors, fonts, etc. of the sidebar content. The title of the sidebar can be set per sidebar and the events in the sidebar can be filtered on the event sequence number and/or user ID. This allows for more than one sidebar per site, each with its own title and a different list of events.

Example of two sidebar definitions for the same website which are complementary:

<?php $sbClass = 'sideBar1'; $sbHeader = 'Birthdays/Holidays'; $sbCats = '2,4'; include './mycalendarfolder/lcsbar.php'; ?> <?php $sbClass = 'sideBar2'; $sbHeader = 'All other events'; $sbCats = '1,3,5'; $sbUpDays = '7'; include './mycalendarfolder/lcsbar.php'; ?>

For each event the following will be displayed: date, time and title. Via the admin's Settings page, under "Stand-Alone Sidebar", you can choose whether further event details should be shown in a pop-up box (like in the full LuxCal calendar) when hovering an event and if URLs from the event description (if any) should be displayed in the sidebar as a hyperlink. On the same Settings page you can specify the number of days to look ahead for events in the sidebar.

The sidebar is using the database and tools of the full calendar and therefore the full calendar should be present in the "mycalendarfolder" (see code above).

c. Embed a Stand-alone Display

LuxCal provides a number of so-called displays which are single-file programs meant to create a dedicated events listing of for instance the upcoming events in your calendar for public visitors. Displays work out-of-the-box and are highly configurable in an easy way.

Currently available displays are included in this distribution (in the calendar's root folder) and can be viewed on the "LuxCal Displays" page of the LuxSoft website.

After the calendar installation you can directly browse with your browser to the displayX.php file in the calendar's root folder and see the result. An example of the URL: www.yoursite.xxx/calendar/displayX.php

Displays have a number of default configuration settings, defining which events should be shown and defining the graphical user interface (colors, fonts, etc.). In the file displays.txt in the calendar's "configs" folder you will find detailed instructions of how to tailor the default settings of the displays.

Since displays have been designed to be shown in a limited space, you can for instance integrate them in your own website by adding them in an iframe, with a recommended width of 400px.

Example:

<iframe class="display" src="calendar/display0.php"></iframe> iframe.display {
  width:400px;
  height:600px;
  overflow:hidden;
  border:1px solid grey;
  border-radius:5px;
  box-shadow:5px 5px 5px #888;
}
d. Embed the Full Calendar

To embed the full LuxCal calendar in an existing web page, an inline frame (iframe) can be used. This can for example be done with the following HTML code:

<iframe id="luxcal" src="http://www.mysite.xx/luxcal/?cP=2"></iframe>

With parameter cP the default view can be set (e.g. year: cP=1, month: cP=2, . . . ,upcoming: cP=7)

If you want to display a subset of the available events, see "Applying Filters to the Calendar" below.

Via the CSS styles of your site, the id luxcal can be used to position and define the style of the iframe containing the luxcal calendar. The style for id luxcal could for instance look as follows:

#luxcal { width:80%; height:800px; margin:20px; border-style:solid; border-width:1px; border-color:grey; }
e. Embed One Specific Calendar View without Navigation Bar

To embed the LuxCal calendar without navigation bar, the parameter hdr=0 should be added to the URL as follows:

<iframe src="http://www.mysite.xx/luxcal/?hdr=0&cP=2"></iframe>

If the navigation bar is suppressed by adding hdr=0 to the URL, the visitor will not be able to navigate the calendar and select other views.
To suppress the calendar header, but leave the navigation links in the various views enabled, hdr=-1 should be added to the calendar URL. In this case the header will be suppressed, but the user will still be able to go to other views via the links in the calendar body: e.g. by clicking the week number or the date in the day cells.

The following parameters can be added to select the view to display and the user-interface language:


For example the HTML code to show the Upcoming Events page without navigation bar, in the French language looks as follows:

<iframe id="luxcal" src="http://www.mysite.xx/luxcal/?hdr=0&cP=7&cL=Francais"></iframe>

Via the CSS styles of your site, the id luxcal can be used to position and define the style of the iframe containing the LuxCal calendar. The style for id luxcal could for instance look as follows:

#luxcal { width:80%; height:800px; margin:20px; border-style:solid; border-width:1px; border-color:grey; }

Important:
The parameter hdr=x is remembered via the PHP session mechanism; this means that if you access the embedded calendar without navigation bar, then thereafter, when accessing your normal (not-embedded) calendar when your session is still active (max. one hour) you will also see no navigation bar. This can be solved by adding the parameter hdr=1 to the URL of your normal calendar.

If you want to display a subset of the available events, see "Applying Filters to the Calendar" below.

f. Embed a so-called Calendar "Display"

Since LuxCal version 4.5.1 a number of so called "displays" have been developed for the calendar.

A display in this context is a single-file self contained program, which can be embedded in your web page using an inline frame (<iframe>), presenting the calendar events in an attractive user interface. Displays can also be viewed on mobile devices and will show the calendar events in a fancy user interface without the overhead of headers, bars and buttons.

Embedding a display in your web page is very easy; it's just a matter of inserting an in-line frame in your web page with a link to the desired display file, which must be located in the calendar root folder. To view a display on your mobile device, nothing needs to be done; make sure the desired display is located in the calendar root folder and on your mobile device just browse to the display file installed on your server.

Displays work out of the box and are highly configurable. Each display program file has an easy to use configuration section, which allows you to specify which events and event fields should be shown and to tailor the user interface colors and text.

Displays use the calendar toolboxes and the calendar settings, like date format, time format, first day of the week, etc., and therefore must be located in the calendar root folder.

On the "Displays" page of the LuxSoft website you will find more information about displays and a demonstration of the currently available displays.

g. Applying Filters to the Calendar

When using a link to the calendar or embed the full calendar, parameters can be added to the calendar URL to specify which events hould be shown. When adding parameters, the following syntax should be used: The first parameter starts with a '?' and parameters are separated by an '&', like: www.mysite.net/calendar?par1=3&par2=7. If a parameter can have several values it can be passed as an array by adding square brackets toe the parameter name, like: www.mysite.net/calendar?par1[]=3&par1[]=7.

Parameter cG can be added to the URL to specify the IDs of one or several user groups for which events should be displayed. Parameter cC can be added to the URL to specify the IDs of one or several event categories for which events should be displayed. The user group IDs and event category IDs can be found on the admin's User Group page and Categories page respectively. For example, to specify a user group, with ID 4 the parameter "?cG[]=4" should be added to the URL. If the events of a second user group, for instance, with ID 6 should be displayed as well, then "?cG[]=4&cG[]=6" should be added to the URL. The same counts for the cC parameter when specifying one or more event categories to show.

Example:
If you want to display a calendar without header (navigation bar) showing events from users in the user groups with IDs 4 and 7 and only showing events in event category 2, then the link should be like: www.mysite.net/calendar?hdr=0&cG[]=4&cG[]=4&cC[]=2.

h. Single Sign On (SSO)

When the calendar is embedded in a PHP-based website where users have to log in, users logged in on the parent website can be logged in to the calendar automatically in a secure way, using PHP sessions.

To achieve this the parent website scripts should:

Because PHP session data are stored on the server, the user name / email address are not visible to the users.


 
- End of Installation Guide -

© 2020 - powered by LuxSoft