flod Posted May 14, 2014 Share Posted May 14, 2014 Tried my best as a novice https://github.com/ryancramerdesign/MarkupLoadGCal/pull/4 1 Link to comment Share on other sites More sharing options...
looeee Posted May 26, 2014 Share Posted May 26, 2014 For anyone having trouble with the break/continue error: It's related to these lines in the MarkupLoadGCal.module file // filter out events that started before the requested time // these will be multi-day events that span into the requested time if($from && $a->from < $from) continue; and for the time being I've gotten around it by commenting out that line and displaying all events from a week in the past on: $fromDate = date('Y-m-d', strtotime("-1 week")); This was my desired behaviour anyway so it should not cause any problems, so long as events are not longer than a week. Link to comment Share on other sites More sharing options...
rajo Posted June 10, 2014 Share Posted June 10, 2014 re: The break/continue error. Is it me or is "continue" *always* a PHP error if you're not in a loop, which is the case at line 342 right now. No? Link to comment Share on other sites More sharing options...
adrian Posted June 10, 2014 Share Posted June 10, 2014 Exactly! I have submitted an issue for Ryan, but I have just been commenting that line out completely and things seem to work fine. Link to comment Share on other sites More sharing options...
adrian Posted August 11, 2014 Share Posted August 11, 2014 Just an FYI for everyone here, Ryan has just fixed the continue bug, added optional support for localized dates, and also added in support for getting link and summary. 1 Link to comment Share on other sites More sharing options...
jacmaes Posted November 20, 2014 Share Posted November 20, 2014 Google Calendar API v2 was depreciated on November 17, 2014. I can't seem get the "full" xml feed anymore, which is required for the module to work as Ryan indicates in the first post, and I'm guessing it's because an API Key is now required. 1 Link to comment Share on other sites More sharing options...
ryan Posted November 24, 2014 Author Share Posted November 24, 2014 Looks like they've completely changed it to the point where this module would have to be largely re-written. I'm looking into that. Is anyone already familiar with API v3 of Calendar? 2 Link to comment Share on other sites More sharing options...
Mr. NiceGuy Posted December 29, 2014 Share Posted December 29, 2014 As the last answer is nearly a month old now. How is the status on this? Link to comment Share on other sites More sharing options...
flod Posted January 3, 2015 Share Posted January 3, 2015 Ryan wrote this on github: I'm aware of this, but unfortunately don't have the bandwidth to re-build this module at present. The new API is a completely different animal from the old, so there's no quick fix here. I hope to get to this eventually, but it could be a couple months before I can get into it due to other scheduled obligations. As a result, I am looking for anyone that might have more bandwidth than me in the short term that might be interested in taking over this module. Though if we can't find anybody, then I will still plan to update it as soon as there's time to do so. https://github.com/ryancramerdesign/MarkupLoadGCal/issues/5 1 Link to comment Share on other sites More sharing options...
netcarver Posted January 3, 2015 Share Posted January 3, 2015 This API withdrawal just hit my latest project pretty badly and, consequently, I've switched over to fullcalendar as I find that the big players like Amazon and Google deprecate some of their APIs frequently and it makes those services a pain to work with. For what it's worth, the latest version of fullcalendar does have google calendar API v3 integration but I've gone down the route of using the fullcalendar event handlers and a little ajax for creating/reading/updating/deleting events and storing them as pages in PW; so now my calendar-based projects can work without the need for a connection to google. I hope to get round to releasing this as a stand-alone module eventually. 6 Link to comment Share on other sites More sharing options...
Pete Posted January 4, 2015 Share Posted January 4, 2015 Been using fullcalendar myself in a project in November so can recommend that but obviously some work required to store events in Processwire and output them to fullcalendar until a module exists. It did feel good not to rely on another service for the calebdar data though! 2 Link to comment Share on other sites More sharing options...
ryan Posted February 18, 2015 Author Share Posted February 18, 2015 I found out this week that Google still has the "basic" calendar feed open. We know the "full" calendar feed has been gone since November, and I hadn't read anything about any of them still being open. So I have no idea if the basic one was re-opened, or if it's always been open, but it's there and fully accessible. Maybe this is common knowledge, but it's news to me–I found out about it just experimenting with Google's URLs. It's a much bigger pain to pull the data from than the "full" one since most of the data is not structured, so it has to be parsed out with regular expressions. But I went ahead and updated this module to support the basic feed, as it has all the data that we need in it. It's now ready to use in the latest update (v2.0.0). It looks like the "basic" feed also accepts all of our date and keyword queries too, which is great. As far as I can tell, it returns this module to a fully functional state with all features working once again. I'm guessing that because we have to parse the data with regex's that much of it may not translate to Google calendars in other languages than English, so that's something to be aware of. But if anyone comes across any examples I can always see what might be necessary to add support. 2 Link to comment Share on other sites More sharing options...
Hani Posted February 19, 2015 Share Posted February 19, 2015 There's also another way of pulling calendar information from Google - but you have to have an API key to do so. I have a non-Processwire site (still on the task list of one to convert) where I pull Google Calendar data. This is a snippet of what I recently ended up with once I realized that the full calendar feed was no longer working. // GET NEXT FOUR UPCOMING EVENTS // maxResults = 4 // timeMin = current timestamp in ISO8601 format $url = 'https://www.googleapis.com/calendar/v3/calendars/[EMAILADDRESS]/events/?key=[APIKEY]&timeMin=' . date('Y-m-d\TH:i:s\Z') . '&maxResults=4&singleEvents=true&timeZone=Los_Angeles&orderBy=startTime'; $calendar = json_decode(file_get_contents($url), TRUE); $events = array(); foreach ($calendar['items'] as $item) { if (array_key_exists('dateTime', $item['start'])) { // has a specific beginning time $events[] = array( 'title'=> $item['summary'], 'start'=> strtotime(substr($item['start']['dateTime'], 0, -6)), 'end'=> strtotime(substr($item['end']['dateTime'], 0, -6)), ); } else { // an all-day event with no specific beginning time $events[] = array( 'title'=> $item['summary'], 'start'=> strtotime($item['start']['date']), 'end'=> strtotime($item['end']['date']), ); } } return $events; Who knows if Google will eventually close off the basic feed or not, so at least there's a bit of an alternative approach here if they do that. 1 Link to comment Share on other sites More sharing options...
flod Posted April 3, 2015 Share Posted April 3, 2015 I only get wrong dates: Is there anyone with the same problem?Thanks for your support. Link to comment Share on other sites More sharing options...
flod Posted April 23, 2015 Share Posted April 23, 2015 I only get wrong dates: Is there anyone with the same problem? Thanks for your support. Anyone? I think, there's a problem with the module. Link to comment Share on other sites More sharing options...
adrian Posted April 23, 2015 Share Posted April 23, 2015 I don't think this module currently works with v3 of Google's API: https://processwire.com/talk/topic/784-module-google-calendar-loader/?p=81207 Just a small FYI in case you don't know - those dates are effectively time zero for unix timestamps which is an indication that no datetime is being returned at all. Link to comment Share on other sites More sharing options...
BFD Calendar Posted January 1, 2016 Share Posted January 1, 2016 I found this while trying to install the module and get it to work. ANNOUNCEMENT: Starting on November 18th, 2015, XML feeds from Google Calendar will no longer be available. https://support.google.com/calendar/answer/6285065?p=xml_deprecation&rd=1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now