Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Google Calendar add on

edited July 2006 in Vanilla 1.0 Help
I've added this to 1.0, and added one date to (a new) calendar which happened to be in November. Calendar shows 10 Nov etc. However, this was showing up in the sidebar / feed, as happening on today's date. Can anyone throw some light on this?

Comments

  • I just saw that too. I'm setting up a community events calender and this is just a little.... off. Today's date. I'll take a peek at the code and such on my install and see if I can make sense of it. It's nice tho.
  • Okay. I looked at the output XML from Google

    <entry> − <id> http://www.google.com/calendar/feeds/ca5bm0h0ulmuj119be284d9ucs%40group.calendar.google.com/public/basic/07khjujhm52b78gbliq6ohs994 </id> <published>2006-07-06T22:37:11.000Z</published> <updated>2006-07-06T22:37:36.000Z</updated> <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/g/2005#event"/> <title type="text">Burke's RezDay Party!!!</title> − <summary type="html"> When: 2006-10-31 19:00:00 to 20:00:00 America/Los_Angeles<br> </summary> − <content type="text"> When: 2006-10-31 19:00:00 to 20:00:00 America/Los_Angeles<br><br>Event Description:No Details Yet... </content> <link rel="alternate" type="text/html" href="http://www.google.com/calendar/event?eid=MDdraGp1amhtNTJiNzhnYmxpcTZvaHM5OTQgY2E1Ym0waDB1bG11ajExOWJlMjg0ZDl1Y3NAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ" title="alternate"/> <link rel="self" type="application/atom+xml" href="http://www.google.com/calendar/feeds/ca5bm0h0ulmuj119be284d9ucs%40group.calendar.google.com/public/basic/07khjujhm52b78gbliq6ohs994"/> − <author> <name>Switchboard Community Calender</name> </author> </entry>

    Looks like the reader plugin might be reading the created date....
  • edited July 2006
    Yeah. It's pulling the Entry created dates. Anyone think they can hack it to parse the date properly?
    Would it be possible to just drop the YEAR part, for space?
  • I looked at the code and its attempting to retrieve the published child element of the entry root element. Now that I look at the xml the date of the event isn't in its own element its in two other spots; summary and content. However, those include the description and location as well. This will have to be rewritten to extract the portion just after 'when: ' (sorry it this is what you were alluding to Burke)
  • Ok, change the following lines : var atomdate = items[n].getElementsByTagName('published').item(0).firstChild.data; var itemPubDateDay = atomdate.substr(0, 10); To this : var atomdate = items[n].getElementsByTagName('summary').item(0).firstChild.data; var itemPubDateDay = atomdate.substr(6, 16); Now it will pull the date from the summary element. I commented out the time, don't really see it as useful unless you were going to show the full summary in a tooltip (that would be cool...hmmm) This works fine for me in Firefox but still shows 'requesting data' in Safari. Not sure whats up there.
  • Dunno. For now I just shunted calender to it's own page. I wish I could set it to look further ahead, since i only have one even next month, and one in Oct. I'll be updating the plugin when I add some more events.

    Thanks. :D
This discussion has been closed.