Jump to content


Photo

How to integrate Google public calendar


  • Please log in to reply
62 replies to this topic

#1 jutreis

jutreis

    Etomite Forum Newbie

  • Member
  • 11 posts

Posted 18 August 2006 - 01:34 PM

Hello,

I'm still busy working on the new version of my caving club's website.

In the meantime, we began to use a google public calendar for our list of activities : members get used to it and would be reluctant to give it up...Is there a way to integrate a view of this calendar with a snippet(no need to be able to modify it)?

What's more, would it be possible that any addition to this calendar could automatically show in the "News" section?


Jutreis

http://www.jutreis.net
http://www.rcae-speleo.be

#2 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 18 August 2006 - 02:18 PM

I'm relatively certain that Google, as well as Yahoo, has API features which will allow the display of data on your site... Both sites have examples and documentation which explain how these features can be implemented... It's questionable, however, as to whether anyone in the Etomite community has experimented with these features...

#3 jutreis

jutreis

    Etomite Forum Newbie

  • Member
  • 11 posts

Posted 05 September 2006 - 07:10 AM

Thank you really much Ralph,

That means it would be far above my skills :D

Therefore, the only way I could imagine doing it and keep it simple is by using the wrapper. Am I wrong?

Jutreis

#4 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 22 May 2007 - 04:08 PM

Has anyone looked into integrating the Google Calendar into etomite?

#5 Jelmer

Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 22 May 2007 - 05:18 PM

Not yet, but I feel it might be worth exploring. If only I had the time... :(

#6 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 22 May 2007 - 09:00 PM

having had a look, I hope someone can come up with a more sane approach to doing this than I can!

As far as I can see, to access the google calendar data directly, we'd need to do HTTP GET requests using the CURL library, and follow that up with decoding an XML document, where PHP4 and PHP5 have different tools to do the job if using DOM XML.

#7 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 22 May 2007 - 10:00 PM

Therefore, the only way I could imagine doing it and keep it simple is by using the wrapper.


I just put a link to the search page that is generated in a map search to open in a new window. It would be a piece of pie to use wrapper, but not from the snippet call, too many ?'s ,='s etc.
http://www.alexhillshs.eq.edu.au/index.php?id=14

Oops, (I'm off on a bit of a tangent here, sorry). When I read "calendar", I see "maps", maybe time for a brain upgrade. :blush:

Edited by Cris D., 23 May 2007 - 06:32 AM.


#8 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 22 May 2007 - 10:34 PM

to just give access to the google calendar display is easy - it will generate the code for an iframe for you, with a few customisable features, which you can just put in a chunk. Thats not what I want though - I want to access the underlying data to display in other ways in the website to avoid having to enter data once in the google calendar, and again on the website.

#9 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 23 May 2007 - 06:56 AM

I want to access the underlying data to display in other ways in the website to avoid having to enter data once in the google calendar, and again on the website.

Have you seen...
http://code.google.com/apis/calendar/devel..._guide_php.html?
and the ZEND Gdata client library http://framework.zend.com/download/gdata ?
It doesn't look as though it is full stabe yet and I don't know how compatible with Etomite it is, but it is obviously being developed as a package to do just that.

Edited by Cris D., 23 May 2007 - 06:57 AM.


#10 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 23 May 2007 - 07:30 AM

Its PHP 5 only, and would have to be installed on the server. The development is probably being done as an object oriented application, where PHP 5 is much better than PHP 4.

My host is using PHP 4.4 (though there may be an option to use PHP 5).

#11 Randy

Randy

    Likes Etomite Forums!

  • Member
  • PipPip
  • 309 posts

Posted 23 May 2007 - 01:34 PM

Hi, (from the GData API Docs)

The GData API accpets HTTP GETs and returns XML with the corresponding data. The docs are fairly straight forward. For instance, to retrieve calendar data the sequence would be something along the lines of:

1.) Determine your magic-cookie feed url (this is a calendar that does not require authenication). It will look something like this:

http://www.google.com/calendar/feeds/userI...gicCookie/basic

As the words indicate, this is a simple ATOM feed with calendar events. That means we could probably hack up one of the RSS Snippets to parse the XML for us.

2) Get the feed. Something like this (this could be send with the PHP header() function perhaps):

GET http://www.google.com/calendar/feeds/userI...gicCookie/basic

3) Now the tough part. You must parse the ATOM feed XML to retrieve the events, and write the UI to display them.

I'm certain the UI part wouldn't be that difficult...if there were only enough time in the day :)

---
All this can be found here: http://code.google.com/apis/calendar/devel...e_protocol.html

#12 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 23 May 2007 - 01:57 PM

Hi, (from the GData API Docs)

The GData API accpets HTTP GETs and returns XML with the corresponding data. The docs are fairly straight forward. For instance, to retrieve calendar data the sequence would be something along the lines of:

1.) Determine your magic-cookie feed url (this is a calendar that does not require authenication). It will look something like this:

http://www.google.com/calendar/feeds/userI...gicCookie/basic

As the words indicate, this is a simple ATOM feed with calendar events. That means we could probably hack up one of the RSS Snippets to parse the XML for us.

2) Get the feed. Something like this (this could be send with the PHP header() function perhaps):

GET http://www.google.com/calendar/feeds/userI...gicCookie/basic

3) Now the tough part. You must parse the ATOM feed XML to retrieve the events, and write the UI to display them.

I'm certain the UI part wouldn't be that difficult...if there were only enough time in the day :)

---
All this can be found here: http://code.google.com/apis/calendar/devel...e_protocol.html


Sometime I sure wish I was a programmer. Does anyone know if any of the other popular open source CMSs have a plugin that does this?

#13 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 23 May 2007 - 02:06 PM

This is one of those items I've been wanting to play with, and lightly researched, but figured I'd better put my efforts into getting 0.6.1.4 rolled out first... I was playing with some ideas for an Events Calendar type of thing for Etomite based on Google Calendar... I just might be able to take a peek at it over the next several days if someone doesn't beat me to it...

#14 Randy

Randy

    Likes Etomite Forums!

  • Member
  • PipPip
  • 309 posts

Posted 23 May 2007 - 02:48 PM

I'm looking now too. I need this capability down the road. It is simply a matter of finding the time.

#15 Randy

Randy

    Likes Etomite Forums!

  • Member
  • PipPip
  • 309 posts

Posted 23 May 2007 - 05:04 PM

Hey everyone I need a public calendar. Apparently it takes 24 hours for your public calendars to be available via Google. Does someone have a public I can use for testing?

#16 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 23 May 2007 - 05:12 PM

Thanks for the warning! I'll have to create a dummy well in advance in case I need to do some work in this area later.

Sorry, at the moment we only have a private shared calendar which we're trying out to see if it helps with our exhibition planning.

#17 Randy

Randy

    Likes Etomite Forums!

  • Member
  • PipPip
  • 309 posts

Posted 23 May 2007 - 05:17 PM

Thanks Mike,

I'm very close to having a workable solution that allows the data to be pulled. The markup will depend on how you want to display it, but getting the data consistently is the issue. I won't be able to do any more work on this until tomorrow due to the delay.

#18 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 23 May 2007 - 05:22 PM

Thanks Mike,

I'm very close to having a workable solution that allows the data to be pulled. The markup will depend on how you want to display it, but getting the data consistently is the issue. I won't be able to do any more work on this until tomorrow due to the delay.


I have used Google's calendar once... I'll look into how to give you access.

#19 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 23 May 2007 - 05:25 PM

I have used Google's calendar once... I'll look into how to give you access.


I created one and gave you access... let me know if you don't get an email automatically...

#20 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 23 May 2007 - 05:40 PM

Here's the calendar's public feed:
XML:
http://www.google.com/calendar/feeds/g0rei...om/public/basic

ICAL:
http://www.google.com/calendar/ical/g0reif...ublic/basic.ics

HTML:
http://www.google.com/calendar/embed?src=g...ndar.google.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users