TRU Supporting Wildfire Evacuees » More info
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.

Important
  • 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 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=http://inside.tru.ca/category/featured/feed" -->

The above code will display the below feed:

Respiratory Therapy

RT students helping others lead healthier lives

   Friday, July 21 2017

Respiratory therapy students are putting theory into practice at the TRU Sleep Centre while assisting people to lead healthier lives.

Read more

Practical nursing grad gets practical experience

   Wednesday, July 19 2017

Practical nursing grad Jasjeet Singh Bedi put his nursing skills to use during the wildfire evacuation from Williams Lake last Saturday.

Read more
Kamloops Marathon 2016 3K

2017 Sport Chek Kamloops Marathon cancelled

   Tuesday, July 18 2017

Organizers have cancelled the 2017 Sport Chek Kamloops Marathon amid unprecedented circumstances due to the province's wildfire emergency.

Read more
Aboriginal science and health sciences camp

Getting to know campus through summer camps

   Friday, July 14 2017

Camps are for fun, meeting people and learning. They're also a way to get comfortable with campus before attending classes in the future.

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

The above code will display the below feed:

Respiratory Therapy
Kamloops Marathon 2016 3K

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 events.tru.ca 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=https://inside.tru.ca/events/category/faculty-and-staff/eo-events?event_start_after=now" -->

The above code will display the below feed:

Gardens tour — Horticulture Gardens

  Date: July 26, 6:30pm - 7:30pm
  Location: Horticulture Gardens

Learn more about some of the annuals and planters on campus during a TRU Friends of the Gardens tour.


Aboriginal youth health and science camp

  Date: July 31 - All Day
  Repeated Dates: Jul 31, Aug 1, Aug 2, Aug 3, Aug 4
  Location: No location specified

The health sciences and sciences camp for Aboriginal high schoolers returns with a combination of in-class and out-of-class experiences.


Gardens tour — regular tour

  Date: August 2, 6:30pm - 7:30pm
  Location: Horticulture Gardens

Learn more about some of the annuals and planters on campus during a TRU Friends of the Gardens tour.


British Columbia Day

  Date: August 7 - All Day
  Location: No location specified

Most campus services will be closed for British Columbia Day.


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:

Deadline to apply to graduate for Fall Convocation

Date: Jul. 31, 2017


International student orientation - Fall

Start date: Aug. 29, 2017
End date: Sep. 1, 2017


Deadline for program advisors to submit lists of eligible graduates for Fall Convocation

Date: Sep. 1, 2017