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.
August 21st, 2006 at 7:07 pm
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.
August 21st, 2006 at 7:54 pm
erik,
Does the
wp-content/cachedirectory 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.
August 21st, 2006 at 8:26 pm
it did not, in fact, exist. creating it fixed the problem right up. thanks so much!
August 23rd, 2006 at 12:26 am
Thanks, Daniel, looking good!
Jennie
September 7th, 2006 at 11:05 am
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!
Thanks,
Jennie
September 7th, 2006 at 5:27 pm
Jennie,
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:
http://homepage.mac.com/tanster/.calendars/OfficeTally.ics
September 7th, 2006 at 5:43 pm
OMG, that WORKED!
Daniel, thank you thank you thank you.
Jennie
September 7th, 2006 at 6:31 pm
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
September 7th, 2006 at 9:13 pm
Looks like I messed up some of the logic on the boundary conditions. Give trunk a try:
http://dev.wp-plugins.org/file/ical-events/trunk/ical-events.php?format=txt
September 8th, 2006 at 12:34 am
Daniel,
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!
-Jennie
September 26th, 2006 at 8:14 pm
Hello,
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….
September 27th, 2006 at 10:01 am
ghutchinson,
The plugin isn’t designed to be instantiated - but multiple calls to
ICalEvents::display_eventsshould work for your situation. For example:ICalEvents::display_events('url=http://example.com/cal1.ics');
ICalEvents::display_events('url=http://example.com/cal2.ics');
November 11th, 2006 at 12:50 pm
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?
cheers,
erik.
November 12th, 2006 at 1:46 pm
erik,
You can override the behavior by setting
date_formatandtime_formatexplicitly in the arguments:ICalEvents::display_events('url=http://example.com/calendar.ics&date_format=&time_format=%a %b %e %l:%M %p');time_formatis always used by the plugin;date_formatis used only when the event does not fall on the current day.November 13th, 2006 at 6:44 pm
lovely. thank you so much!
December 19th, 2006 at 2:06 pm
Works great David - thank you!
December 20th, 2006 at 11:21 am
You can do fantastic things with this plugin as you can see at: http://www.rac1.org/index.php?page_id=2
It is done with Google Calendar
June 30th, 2007 at 11:23 am
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.
July 2nd, 2007 at 8:33 pm
Giuseppe,
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.
October 10th, 2007 at 5:58 am
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.
October 11th, 2007 at 12:22 pm
daniel,
You might be able to use the
before_descriptionandafter_descriptionparameters to create a tooltip.If the ordering of the output isn’t to your liking you can also create a custom display function.
October 25th, 2007 at 7:30 am
can you give an example of a working phrase with html & css list formatting?