0
votes

This code is supposed to display all items in my Google calendar RSS, but it is limiting the posts displayed to about 23:

http://james.cridland.net/code/google-calendar.html

My rss feed is here: https://www.google.com/calendar/feeds/ta624s0k5sf002ji485o6d0bvg%40group.calendar.google.com/private-9f18d335ed346643800c76d0c96e286c/basic

1
I only get 25 entries in your calendar RSS, so I guess the code is working fine and Google isn't sending everything. How many should be displayed? Where are you using the feed? - Andrew Leach
You're right, it was a problem with the RSS. It was just missing an equal sign (=) after "max-results" in a string of code. Now it shows all 50 events. - Jason

1 Answers

1
votes

Unless you’ve changed this line of code:

// ...and how many you want to display (leave at 999 for everything)
$items_to_show=999;

It should hold 999 entries (or everything as it mentions).

There seems to be an error with the script, here (missing '= sign’ after max_results).

Replace with this:

// Form the XML address.
$calendar_xml_address = str_replace("/basic","/full?singleevents=true&futureevents=true&max-results=".$items_to_show."&orderby=starttime&sortorder=a",$calendarfeed); //This goes and gets future events in your feed.