Display Details‎ > ‎

Calendar ICON Generation

A number of pages us an ICON to decorate the display for an event display.  To add an image of the date to a display you need to add an image tag <img /> to the display.  The image tag for the default Upcoming display is:

<img src="modules/mod_gicalreader/media/today.php?gccolour={{gccolour}}&date={{startRaw}}" style="float: left" />

It is important to correctly call the image and this is done with the 'src' parameter. The image ICON is actually a small php script, called today.php that is located in the mod_gicalreader, at modules/mod_gicalreader/media/today.php.  

Calendar ICONS

Changing the Template of the ICON

When the program is called it will add the calendar colour and date (day information) to the base template.  There are a number of templates to choose between.  You can choose the appropriate ICON by adding the the attribute 'template' to the src string.  If no template is defined then the default template of 'blankDay1.png' is used.


Coloured Calendar ICONS

Defining the ICON Colour

Colour can be added to the ICON by setting the attribute gccolour.  The colour can be defined in any manner as defined in the W3C School (http://www.w3schools.com/html/html_colornames.asp and http://www.w3schools.com/html/html_colorvalues.asp.)  As the colour of the calendar is known, the default example above renders the colour as a changeable colour based on the Google Calendar Colour setting.  The example image to the left shows the ICON colour changing with the calendar colour.

Adding the Date

The ICON will also have the date added using the attribute date..  You need to supply a valid date for this to happen.  Should a valid adte not be given then the display will default to the date of today.  


  • template
  • date
  • gccolour


Please note that the first attribute is proceeded with a '?' and each addition attribute requires a '&'.  This is the normal manner of transferring information when calling a page.  It does not matter which order you add the attributes in the src string.