Browse > Home / Wordpress Plugins / Availability Calendar / Create your Feeds

| Subcribe via RSS

Create your Feeds

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

The availability and booking manager plugin provides the ability to export your calendar data, and to provide public feeds for your availability calendar in iCal and RSS formats direct from your website.

Initial feed setup

The first thing to do to setup your new feeds is to navigate to the Clearskys.net menu and then to the Booking Options sub-menu.
Near the bottom of the displayed page you will see a section that looks suspiciously like the image below:
Feed Options

Custom Permalinks or Query strings

The setup of your Wordpress permalink structure will, to a large extent, determine what you enter into the two Calendar feed fields.

If you are using query strings (your blog URI’s look like http://www.site.com/?p=2) then your feed URI’s should be in query string format (more on this later).

If you are using custom permalinks (your blog URI’s look like http://www.site.com/availability/sample/) then your feed URI’s should be in directory format.

Setting up your Public feed URI

A public feed contains basic information about your bookings and availability. It will provide enough information to show which dates are booked (and thus which are available). The public feed does not display the status, notes or guests details.

The easiest setting for your public feed URI is to mirror the URI for your availability calendar page. For example, the sample calendar on this site is located at:

http://blog.clearskys.net/plugins/availability-plugin/sample/

Therefore, and as I am using custom permalinks on my site, I will set my public feed URI to:

/plugins/availability-plugin/sample

Ensuring that I start the URI with a / and also that I leave the trailing / off the end. If I was using standard query strings then my availability page URI might look like:

http://blog.clearskys.net/?page_id=3

Therefore, I would set my public feed URI to:

?page_id=3

ensuring that I start the feed URI with a ?

Setting up your Private feed URI

A private feed contains full information about your bookings and availability. It contains the complete information that you have entered about the booking, including notes, guests details and status. Because the private feed contains such information, the URI you setup for it should not be made public, and should be picked so that it is difficult to guess.

Private feed URI formats are pretty close to that of the public feeds, except that you should add a “secret” word or phrase to your feed to ensure that it is not guessable.

Continuing with the example above, if I decide to add a secret phrase to an existing public URI then I could set my private URI to:

/plugins/availability-plugin/sample/mysecretcodeword

or if my site was using query strings then it could be:

?page_id=3&secretkey=mysecretkey

Even though we would recommend taking the above approach when setting up your public or private feed URI’s, they can be set to anything you wanted. The only limitation really is that custom permalink URI’s start with a / and don’t have a trailing /, or that query string URI’s start with a ?

An example would be:

/this-is-my-calendar-feed-please-treat-it-with-respect-thank-you-very-much

Testing your Feeds

Once you have entered your feed URI’s, click on the “Update Settings” button to save them to the database. After you have saved the feed details, you can test the feeds output by using the icons shown on the right hand side of each feed URI.

The first icon is for iCal output, the second is RSS output. Try clicking on each of the icons to make sure that you do not get any errors due to a bad URI.
We have tested the RSS feeds with a number of readers, and the iCal feeds with iCalendar on Mac OS-X and Google calendar, but if you use a different application then it will be worthwhile checking that they can read the feeds.

A sample of a Public RSS feed when viewed in an RSS reader and in the iCal application (click to view a larger version):

rss publicpublic ical

Using Private feeds

Because the private feeds are not mean’t for public consumption, the only place you will find links to the iCal and RSS private feeds is in the administration section of Wordpress. They can be accessed by external readers (such as google calendar) if you provide the URI (without needed to give out your Wordpress login details) but shouldn’t be published on your public website.

To get the full URI for your private feed, right click on the icon (displayed next to the Private Calendar Path field in the Booking options page) for the feed format you require, and select the menu option labelled something like “Copy Link Location”.

You can then paste that URI into the subscribe section of your desired application.

A sample of a Private RSS feed when viewed in an external RSS reader and in the iCal application (click to view a larger version):

Private RSSical private

Displaying public feeds on your website

There are 3 distinct tabs you can use on your calendar page, to provide links to your feeds. I will go through each one in turn.

Basic link

Entering the following tag on your page (or post) will provide a direct link to your public feed URI:

<!-- clearskys#calendar-feedlink(format) -->

format should be changed to either ical for iCalendar format, or rss for RSS format. So to output an RSS feed link I would enter:

<!-- clearskys#calendar-feedlink(rss) -->

and it would look and work like:

Javascript link

A different approach to the direct link is to provide a javascript pop up containing the URI path, with some basic instructions on what to do with it.

Entering the following tag would generate a javascript powered link:

<!-- clearskys#calendar-feedjscriptlink(format) -->

again format should be changed to either ical for iCalendar format, or rss for RSS format. So to output an iCal feed link I would enter:

<!-- clearskys#calendar-feedjscriptlink(ical) -->

and it would look and work like:

Fold your own link

Finally, for those of you who want to generate your own links, or use your own graphics, we have provided a tag that simply returns the URI for the feed.

To get the feed URI, you can use the following tag:

<!-- clearskys#calendar-feedurl(format) -->

Again, at the risk of repeating myself, you can change format to either ical or rss.

The URI for my RSS feed would be retrieved using the folllowing:

<!-- clearskys#calendar-feedurl(rss) -->

and would look like:

Multiple properties

By default the feed tags will use the Property id setup in the availability calendar options panel. You can change the property id that is used for the feeds (and thus the property calendar that is output) by using one of the tags detailed on the main instructions page BEFORE entering the feed tag. So to show an RSS feed for property number 2, I could use:

<!-- clearskys#calendar-property(2) -->
<!-- clearskys#calendar-feedlink(rss) -->

Tags: