University of Connecticut University of UC Title Fallback Connecticut

Adding Calendars to Your Site

Aurora Sites

Homepage Widget

The easiest way to add events from your calendar into your Aurora website, is to use the UConn Events Widget.

WordPress Page Templates

For those of you using the new Aurora content management system, there will be future updates that will allow you to embed calendars into your pages.

Those sites using custom or child themes can use the PHP in the following sections to create custom page templates.

.


Other Sites

For those on the older UITS web servers, or using other web hosting, you may use the following PHP scripts.

 

Upcoming Events List

Step 1:

You must choose whether you want to use calendar list regular or lite. The regular version will show a thumbnail picture that is included in the event and has more information for each event. The lite version will only show you the day of the event and the title.

Download calendar_list
If you plan on using the the regular version extract calendar_list.php into your site.
If you plan on using the lite version extract calendar_list_lite.php into your site.

Step 2:

Configure the calendar list by editing the RSS feed URL within calendar_list.php to the RSS feed you want. To obtain the feed URL for your calendar go to Subscribe, and choose “RSS Feed.”

Be sure to select your calendar on the filter box to the right. After clicking on create RSS feed, copy the URL for that page and put it in place of the URL found next to the $FEED_URL variable.

You also have the option of adjusting the number of upcoming events to display at any given time by modifying the number assigned to $NUMBER_TO_DISPLAY.

Next lies the mode by which you want to install the file on your site. If you want to include it using php set the $MODE variable to equal 1. If you want to do it the iframe method. Set mode to 2.

Step 3:

The last step is to actually put the calendar list in your website. If you were planning to do it by php include. The syntax for doing so will be

<?php include('PATH'); ?>

To include it through the iframe method.

 <iframe src="PATH" height="240" width="320"></iframe>

Guide to getting the correct path for includes

To include the calendar list correctly. We must get the path to the php file. If you have placed the calendar_list.php inside the same directly as where you are linking it from. The path will simply be calendar_list.php. If you’ve placed the file in a directory outside of where you are including it from. Then you have to prepend “../” to calendar_list.php For every level of directory higher you must put an additional “../”.

If you have placed calendar_list.php in a directory that is lower than where you want to include it you will have to prepend the directory names to calendar_list.php.


 

Small Calendar

Steps

These are the steps you need in order to embed the small calendar

  1. Download smallcal.zip here, extract the smallcal folder and place it in your root directory
  2. Extract the JavaScript files in “smallcal/scripts” and place them in your JavaScript folder.
    If your JavaScript folder is not named ‘javascript’ then change the folder name in smallcal.php (lines 94, 95, 96, and 97) to the name of your javascipt folder
  3. Extract the CSS files in “smallcal/styles” and place them in your CSS folder.
    If your CSS folder is not named “styles” then change the folder name in smallcal.php (lines 92 and 93 ) to the name of your CSS folder
  4. Go to http://events.uconn.edu/subscribe, select “RSS Feed” and add the calendars you wish to display.
    Then click “Create Feed”, copy the link provided, and replace the link assigned to the variable “$RSS_LINK” in smallcal.php (line 27)
  5. Insert Small Calendar into your webpage using the iframe provided below.
    Replace PATH with the actual path of your smallcal.php file (relative to your webpage).
    <iframe id="i_small" src="PATH" width="600" height="800" frameborder="0" allowtransparency="true"></iframe>