Thompson Rivers University
Thompson Rivers University

Feeds - RSS, Events, Date

RSS Feeds

In order to insert an RSS feed on a page, you must include the script. The following variables can be used to customize it to your liking.

  • The first variable must be prefaced with a '?'. The remaining variables all use an '&' as a preface.
  • The last variable must be '&url'. If other variables follow it, the script may not work correctly or at all.
  • The URL must be 'https://'. This will prevent a mixed content blocking/warning error that might prevent the images from showing up as expected.
  • The order of the variables before the &url is irrelevant.
  • You may omit variables you do not want to use; this will set them to 0 by default.
  • Except where otherwise indicated, accepted options are 0 or 1.
  • num - This specifies the number of items to load. Typically, this will be between 3-10. Accepted options are 1-10.
  • size - This specifies the size of an image to display, to be displayed with the specified column width out of 12. For example, if the number specified is 3, the image will be 1/4 (3/12) of the available space. To display a full-width image in a sidebar, specify a size of 12. For any number less than 12, the description will be aligned to the right of the image. If a 0 is specified, the image will be hidden. Feed items that do not have a featured image attached will be formatted correctly regardless of this setting. Accepted options are 0-12.
  • title - This will show or hide the title.
  • date - This will show or hide the date.
  • desc - This will show or hide the description.
  • button - This will make the 'Read more' link a button or text.
  • inbody - This will enlarge the headings for better legibility in the body of a page.
  • forhome - This will change the entire layout for use on the homepage. This should ONLY be used on the homepage; most other variables will be ignored when this variable is enabled.
  • titlelink - This will link the title, making it teal.
  • nopad - This will reduce the padding around each feed item.
  • linkhide - This will show or hide the link. This will override the button setting. If this is set to 1, the title will be linked automatically.
  • althead - This will underline the headings.
  • url - This specifies the feed URL. It must be an RSS XML feed.
<!--#include virtual="/utilities/feed/rssparsefeed.php?num=4&size=4&title=1&date=0&desc=1&button=1&inbody=1&forhome=0&titlelink=0&nopad=0&linkhide=0&althead=1&url=" -->

The above code will display the below feed:

Hofmann’s latest novel “incisive and deeply satisfying”

   Friday, September 15 2017

Karen Hofmann's latest novel, What is Going to Happen Next published Sept. 15, and is already getting great reviews.

Read more
Oppong Ghana Academy of Arts and Science

Oppong delivers inaugural lecture at Ghana Academy

   Thursday, September 14 2017

Dr. Richard Oppong was interviewed following his inaugural lecture at the Ghana Academy of Arts and Sciences, where he is a Fellow.

Read more

Hunter finds success in writing contest

   Thursday, September 14 2017

Alumna Sadie Hunter was long-listed for the CBC Nonfiction Prize, a contest that receives over 1400 submissions.

Read more

Tourism celebrating 20 years with one-day event

   Tuesday, September 12 2017

The Bachelor or Tourism Management program is celebrating it's 20th birthday with a range of events on Sept. 22.

Read more
<!--#include virtual="/utilities/feed/rssparsefeed.php?num=3&size=12&title=0&date=0&desc=0&nopad=1&linkhide=1&url=" -->

The above code will display the below feed:

Oppong Ghana Academy of Arts and Science

Event Feeds

Event feeds work almost identically to RSS feeds. However, the only options are: num and inbody. The 'inbody' element will enlarge the font size of the feed.

To create the URL for an events feed, go to and view the category or tag of the feed you want to display, then add 'eo-events?event_start_after=now' to the end of the URL. The include statement should look like the following:

<!--#include virtual="/utilities/ics-parser/parseEvents.php?num=4&inbody=1&url=" -->

The above code will display the below feed:

CELT Talks Lunch & Learn

  Date: September 19, 12:30pm - 1:30pm
  Repeated Dates: Sep 19, Oct 4, Oct 19, Oct 30, Nov 17
  Location: BC Centre for Open Learning (BCCOL)

Hear two 20-minute presentations on topics relevant to teaching practices. Coffee, tea and dessert provided.

Art exhibit: Not Quite There

  Date: September 20, 8:00am - 4:00pm
  Repeated Dates: Sep 6, Sep 7, Sep 8, Sep 15, Sep 14, Sep 13, Sep 12, Sep 19, Sep 20, Sep 21, Sep 22, Sep 11, Sep 18
  Location: Old Main

Contemplate the notion of infinity within the 21st century situation

3-on-3 basketball tournament

  Date: September 21, 11:00am - 2:00pm
  Location: Old Main

Join the fun of the second annual 3-on-3 basketball tournament as a player or spectator. Enjoy free servings of poutine and bannock.

TRUSU Food Truck Festival and Outdoor Movie Night

  Date: September 21, 5:00pm - 10:30pm
  Location: Campus Commons

Local food trucks and a screening of Wonder Woman on a 40-foot screen with stadium sound.

Dates & Deadlines Feeds

Again, to display a feed of upcoming Dates & Deadlines, it is much like above.

The defaults are:

  • Number of items: 5 (num=5)
  • Link the title with the URL (url=1)
  • Use smaller text (h4 for titles, p for dates)
  • Show all dates (audience = all) (audience=all)

The possibilities for the size variable are: 12,14,16,20,24,28,32. This will change the date size; the title will be 8px larger. For instance, if size=20, the dates will be 20px and the titles will be 28px. Enlarging the fonts will allow the text to be visible on CCTV screens.

<!--#include virtual="/utilities/dates/dates-list.php?num=3&url=0&size=20" -->

The above code will display the below feed:

Fall Convocation - Kamloops

Date: Oct. 1, 2017

Thanksgiving Day

Date: Oct. 9, 2017

Remembrance Day (observed)

Date: Nov. 13, 2017