Creating XML/RSS feeds:
This is an example of the path to the XML feed file:
"eventsxml.asp" is the standard name of that file.
To show events that will take place in a specific branch, on the thirtieth day from today, we do this:
where "lib=1" stands for the library, "do=30" stands for date offset.
And if you want it in RSS mode rather than XML, do this:
where "dm" stands for Data Mode.
Including System Wide Events in XML/RSS feeds
In some cases, you may need to create feeds that display System-Wide events. These events, which have no specific branch location, will always be included by adding the switch lib=ALL or alternately the ln=999 switch. For branch specific feeds, however, System-Wide events will not appear because they don't exist for any particular branch's schedule. For create a branch specific feed that also includes System-wide event, use two 'ln' switches in combination, setting the first to ln=x. The 'x' in this case stands for the branch ID number. Follow this with an '&' and ln=999, for all-branches. This combination will include both the branch-specific events, and the System-wide events.
For example: http://demo.evanced.info/events/lib/eventsxml.asp?ln=2&ln=999
Note this will not work using the lib= switch.
The switches (everything after "?") tell the system what to display and how to display it. The table below provides a reference for deciphering the switches.
This is used to control the events for a given library/branch or events for all branches [Default is 0]. Use the library number (lib=x) or "ALL” (lib=ALL) to specify the library’s events that are to be displayed. Note that ALL needs to be in all capital letters.[Path to event calendar]/eventsxml.asp?lib=1
|IncludeDateHtml = 1||This works in HTML mode only and returns a date, so you can plug this into the widget for multi-day stuff.|
This allows you to put in a location and display all events occuring at locations with that phrase in the name. If you do not specify branch, this will return all locations with a name that matches what you enter.[Path to event calendar]/eventsxml.asp?loc=meeting room A&lib=1
This is the date offset used to return events held X number of days away from today’s date [Default is 0; today’s date] [Path to event calendar]/eventsxml.asp?lib=all&do=1This URL will bring the events of tomorrow.
This is used to display all event times, even events that have already occured earlier in the day. Use alltime=1 to override the default setting.[Path to event calendar]/eventsxml.asp?lib=1&alltime=1
Shows the events for the next XX number of days. [Default is 1]. [Path to event calendar]/eventsxml.asp?lib=all&nd=7This URL shows events for the next 7 days starting TODAY.
|startdate= & enddate=||
Those are used to specify a date range to pull events from. Date should be in this format: MM/DD/YYYY.[Path event calendar]/eventsxml.asp?lib=all&startdate=03/07/2010&enddate=03/20/2010
This is used to limit the output to only certain event types. The default is to show all event types. You can specify multiple event types by separating them with a comma and a plus sign (et=Adult+Program,+Book+Discussion). Event types need to be alphabetically in order to work.[Path event calendar]/eventsxml.asp?lib=all&nd=14&et=Adult+Programs
|fe =||Refers to Featured Events. Use fe=1 to show only featured events.|
|ag =||This is used to limit the output to only events for certain age groups. Similar to "et" above, you can specify multiple age groups by separating them with a comma and a plus sign (ag=children,+adult).|
This is used to limit output to only events which contain a given keyword in their title, description, other information, or instructor fields. The default is to show all events.[Path event calendar]/eventsxml.asp?lib=all&nd=30&kw=knitting
This is used to output using a different XML format. Valid values are "xml" to use the XML format described above, "exml" provides detailed information beyond typical XML mode, "rss2" to output a RSS 2.0 feed, "atom1" to output an ATOM 1.0 feed, and "ical" for iCalendar formatted output for use in other calendar programs like Google calendar. And "html" for HTML page output.
[Default value is "xml"].[Path to event calendar]/eventsxml.asp?lib=all&nd=7&dm=rss2
|roominfo =||1 = shows room reservations information in the rss feed|
0 = [Default] Doesn't show ongoing events 1 = shows ongoing events2 = shows only ongoing events
Ongoing events will be listed first, if any.
0 = [Default] Only shows events published to the public. 1 = shows both published & unpublished2 = shows only unpublished
0 = [Default] Only shows public events. 1 = shows both public & private events. 2 = shows only private events.A private event is an event that is either created on a private branch or has a private event type.
Title that shows at the top of the feed. Used with RSS only. [Default] Upcoming library events.Advanced Encoding Switches (World Language Compatability)
1 = This prevents the system encoding extended characters into their equivalent hex values. This setting works with ISO-8859-1 type of encoding.Testing with UTF-8 type of encoding generated XML errors.
|encodetype =||This allows for setting the encoding type in the XML header:|
This sets the return path that will be used by the "Back" button on the event detail page. This parameter should be the last in line and needs all "&" characters encoded in hex (%26). This is especially useful when setting up an RSS Feed Reader. To setup an iGoogle RSS feed to display only 'Adult Programs' events from lib=2 but to return to lib=All with all event types when they hit the "Back" button use:[Path event calendar]/eventsxml.asp?lib=2&nd=5&et=Adult+Programs&return=[Path event calendar]/eventcalendar.asp?et=ALL%26Lib=ALL
This is used when you need to pre-set the number (xxx) of events returned by the feed. Example:[Path event calendar]/eventsxml.asp?nd=5&et=Adult+Programs&Lib=ALL&limit=10
This is used to set the link associated with the RSS feed title. This feature is only applicable using RSS and only in some browsers. Example:[Path event calendar]/eventsxml.asp?dm=rss2&rsslink=http://google.com
|IncludeHtmlEndTime = 1||This works in HTML mode only and displays the end time of an event after the start time of the event.|
|eventid=||Pull in a specific event ID number.|
Note: There are common switches between these and Calendar view switches, such as: ag, et, and kw.
Article ID: 77
Created On: Tue, Sep 27, 2011 at 2:19 PM
Last Updated On: Thu, Sep 3, 2015 at 11:47 AM
Online URL: https://kb.demcosoftware.com/article.php?id=77