ical-events 1.8

I just tagged version 1.8 of the ical-events plugin, with some formatting fixes for untimed and long-running events.

Also included is support for the cURL library, via the url-cache plugin. If your host has turned off allow_url_fopen, you can still use this plugin. See the readme for more information.

You can download a zip file from Owen Winkler’s site.


Comment from erik on

hi daniel.

i’m a bit of a neophyte all-around (with wordpress, php, and ical–a newbie trifecta!) and am having some trouble getting this plugin working. initially, the script was choking at the fopen part–it turns out i’m on one of those hosts (dreamhost) with allow_url_fopen turned off. so, per your advice in the readme, i installed and activated the url-cache plugin. now, when i try to display events with the demo template code you provide, i get this error:

Warning: fopen(/home/.astraea/ekraft/restlessbee.com/hive/wp-content/cache/uc.71fbcf3f77abaa1c512fd2377448b4e5.ics) [function.fopen]: failed to open stream: No such file or directory in /home/.astraea/ekraft/restlessbee.com/hive/wp-content/plugins/url-cache-1.3/url-cache.php on line 256
iCal Events: Error loading [http://www.ufl.edu/calendar/ufCalendar.ics]’ . time()); ?>

any advice on what to try next?

thanks immensely.

Comment from dwc on


Does the wp-content/cache directory exist? If so, is it writable by the Web server?

I can’t remember if WordPress creates the directory, but it looks like the url-cache plugin is not trying to.

Comment from erik on

it did not, in fact, exist. creating it fixed the problem right up. thanks so much!

Comment from tanster on

Thanks, Daniel, looking good! πŸ™‚ Jennie

Comment from tanster on

Hi Daniel,

Help! My webhost finally disabled allow_url_fopen, so I installed the url-cache plugin and activated it.

Now when I go to my calendar at http://www.officetally.com/the-office-calendar, I get the error:

iCal Events: Error parsing calendar [http://ical.mac.com/tanster/OfficeTally.ics]

Since both the download links at http://mcnicks.org/software/wordpress/url-cache/ no longer work, I went to http://dev.wp-plugins.org/file/url-cache/trunk/url-cache.php and saved the code in a file. Don’t know if that makes a difference.

Any ideas on what I can try to get this to work is much appreciated!

πŸ™‚ Jennie

Comment from dwc on


It looks like mac.com is hiding the “real” URL of the calendar, and that the url-cache plugin is not following the server’s instructions to get the calendar data.

For the time being, at least, try using the following URL in your call to the plugin:


Comment from tanster on


Daniel, thank you thank you thank you.

πŸ™‚ Jennie

Comment from tanster on

Hi Daniel,

One more thing:

I noticed that when I upgraded from 1.6 to 1.8, the parameter gmt_start now includes the previous day and gmt_end now includes the next day.

For example, if you look at http://www.officetally.com/the-office-calendar today, Sept. 7th, you’ll see it lists an event from yesterday, Sept. 6th.

If you go to http://www.officetally.com/the-office-calendar-archive and scroll down to the bottom of the page, it lists events from today, Sept. 7th.

I’m not sure, but I think something changed between 1.6 and 1.8.

Thanks, Daniel!

πŸ™‚ Jennie

Comment from tanster on


I had to wait a few hours for the day to turn over. πŸ˜‰

Looks like that did the trick.

Thanks for your great (and fast) work on this!


Comment from ghutchinson on

i am using the older 1.5 version of this plug-in ( I wnet to download the new 1.8- and the Red Alt site needsa loging.. .etc… anyway) I was wondering if it is possible to call multiple .ics files into multiple instances of the Icalevents code. I have a website where there are several individuals that would maintain seperate calendars and I would like to publish the events for each one after one another on the page..but it either pulls one .ics for all instances or displays nothing….

Comment from dwc on


The plugin isn’t designed to be instantiated – but multiple calls to ICalEvents::display_events should work for your situation. For example:


Comment from erik on

hi again david,

your script is working beautifully for me, save for one thing i can’t figure out: if the date of an event = the current day, it doesn’t display the month and day in the listing, only the time. is there a way to override this so it displays the full listing for events on the current date?



Comment from dwc on


You can override the behavior by setting date_format and time_format explicitly in the arguments:

ICalEvents::display_events('url=http://example.com/calendar.ics&date_format=&time_format=%a %b %e %l:%M %p');

time_format is always used by the plugin; date_format is used only when the event does not fall on the current day.

Comment from erik on

lovely. thank you so much!

Comment from Bob on

Works great David – thank you!

Comment from Giuseppe on

Hi Vincent!
I’m trying the same you did with google calendar, but I got this problem:
iCal Events: Error parsing calendar [http://www.aeroclubfoggia.com/external/iaaa.ics]
(iaaa.ics is a local wget copy accessible via http of course)
Any clue?
I did also a small PHP to reproduce the problem but I got the same stuff.

Comment from dwc on


It doesn’t look like your calendar has any events listed. The plugin (somewhat erroneously) assumes that if no events are found that there was an error parsing the file.

I’ve updated the plugin to remove this assumption.

Comment from daniel on

Im trying to wrap HTML around the post-event, but I dont assume that I should pass these to my ical provider, and it doesnt work

Upcoming nuclear events
&use_url=1&limit=3&use_description=0&use_location=0&gmt_start='. time()); ?>

but I would actually expect to have to make smt like

ICalEvents::display_events('url=http://daniel.wikimaas.org/files/nuclear_agenda.php?use_url=1&limit=3&use_description=0&use_location=0&gmt_start='.time(), 'before='); ?>

But neither work. If you could give me a tips?
I would actually have the to have the events description pop up as a tooltip - not a link - because the calendar is on a restricted server, and only this ical is exported.

Comment from dwc on


You might be able to use the before_description and after_description parameters to create a tooltip.

If the ordering of the output isn’t to your liking you can also create a custom display function.

Comment from daniel on

can you give an example of a working phrase with html & css list formatting?

Comment from Brandon on

Quick question. I am using this plugin for a site in Detroit, MI. It currently will not show the current days events. So if I go to the site now, I cannot see todays events. Only those for tomorrow and on.

I am guessing this is due to the:

gmt_start ?

Here is my code in my sidebar.

I have a feeling this is a simple fix, just getting a little confused. Any help would be greatly appreciated.