Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 19    Views: 169

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
03/24/15 11:27 PM (9 years ago)

New Plugin: Calendar Events

********************************************************************* ******THIS IS FOR SELF-HOSTED USERS ONLY********* ********************************************************************* The Calendar Events plugin pulls in events from a public Google Calendar feed and displays them in a nice listview. Users can click on an event to get more details and add it to their device's calendar. This plugin has the following requirements: A public Google Calendar Self-Hosted (So you can install php scripts - if you aren't self-hosted, check out http://www.buzz-tools.com'>) Google Calendar PHP SDK (beta version included in the plugin package) Google API Browser Key (available for free at https://console.developers.google.com;) https://www.buzztouch.com/plugins/plugin.php?pid=FFCADB10075C3D2CD3196FA
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/25/15 02:07 AM (9 years ago)
Nice to see you back, Chris! Great addition to the market. What is the purpose of the PHP code? Is it to convert the Google feed into the BuzzTouch JSON dialect? -- Niraj
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 04:28 AM (9 years ago)
niceeeeeeeee, saved me hours of work :-) thanks chris
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 05:35 AM (9 years ago)
getting parsing errors after install, need any special permissions for the getEvents php or the google folder ?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/15 05:53 AM (9 years ago)
Niraj - yes Aussiesra - send me your dataURL so I can take a look.
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 06:09 AM (9 years ago)
ok
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/15 06:17 AM (9 years ago)
1) delete that url from the forum 2) you have an issue with your Google API key - you need to set up the whitelisting. If unsure, set it to allow any referer
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 06:39 AM (9 years ago)
allow any did the trick. (will need to relook how to lock that down) now i am getting : Mar 25 23:32:58 iPhone [5414] <Warning>: CR_eventList: ERROR parsing JSON: ( "Error Domain=org.brautaset.JSON.ErrorDomain Code=5 \"Unescaped control character '0xa'\" UserInfo=0x17427e880 {NSLocalizedDescription=Unescaped control character '0xa'}", where does that UserInfo key lives ?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/15 06:50 AM (9 years ago)
Still shows a restricted ip warning for me
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 06:54 AM (9 years ago)
was testing ip allows , its back to allow all
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/15 07:03 AM (9 years ago)
Hmm looks like a problem with the script - I'll have to look at it this afternoon
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 07:07 AM (9 years ago)
yea i checked the json from the files/getEvents.php?action=getGoogleEvents&calendarId php and its valid but the something is doing this : CR_eventList: ERROR parsing JSON: ( "Error Domain=org.brautaset.JSON.ErrorDomain Code=5 \"Unescaped control character '0xa'\" UserInfo=0x17466a700 {NSLocalizedDescription=Unescaped control character '0xa'}", "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key: descriptionText\" UserInfo=0x174660f80 {NSLocalizedDescription=Object value expected for key: descriptionText, NSUnderlyingError=0x174445430 \"Unescaped control character '0xa'\"}", "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Expected value while parsing array\" UserInfo=0x170878000 {NSLocalizedDescription=Expected value while parsing array, NSUnderlyingError=0x174440570 \"Object value expected for key: descriptionText\"}", "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key: childItems\" UserInfo=0x170863780 {NSLocalizedDescription=Object value expected for key: childItems, NSUnderlyingError=0x17044c330 \"Expected value while parsing array\"}" ) from: {"childItems":[{"itemId":"_9h34qham8l758b9j70s30dpo70",
 
ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
like
03/25/15 07:54 AM (9 years ago)
Can't wait to use this!
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/15 05:39 PM (9 years ago)
Okay - plugin is updated. Install the update, then go through the setup procedure again.
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 07:50 PM (9 years ago)
Amazing !!!!! so neat and clean, hats off to chris !!! Working like exactly what i was looking for. any way to sort out old stuff ?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/25/15 08:05 PM (9 years ago)
It should already do that. Looking at your event list, it looks like you have some that start a few months ago, but end a few months from now. The script should be including only events with an end date after the current date.
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/25/15 08:29 PM (9 years ago)
indeed works like a treat, time to finish my app.
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
03/27/15 08:33 AM (9 years ago)
iOS is gold, working on my android now only issue was this line : dataURL = "" + BT_strings.getJsonPropertyValue(screenData.getJSONObject() need to change to: dataURL = "" + BT_strings.getJsonPropertyValue(this.screenData.getJsonObject()
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/27/15 08:35 AM (9 years ago)
good catch!
 
chadh0130
Apple Fan
Profile
Posts: 352
Reg: Nov 05, 2011
Rhode Island
4,020
like
03/30/15 08:10 PM (9 years ago)
I believe I have followed all the necessary steps to set this up, however I receive a parsing error when building the app. Any ideas? CR_eventList: ERROR parsing JSON: ( "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x7ae71550 {NSLocalizedDescription=Unrecognised leading character}" ) from: <br /> <b>Fatal error</b>: Uncaught exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/calendar/v3/calendars/p0ob9rj65f76tj82qc618iobt8%40group.calendar.google.com/events?singleEvents=true&amp;orderBy=startTime&amp;timeMin=2015-03-31T03%3A07%3A50%2B00%3A00&amp;key=AIzaSyAxCu9r2K5TftV2mgmVfyUfLDn6MwK5dCk: (400) Bad Request' in /files/plugins/CR_eventList/files/googleApi/src/Google/Http/REST.php:110 Stack trace: #0 /files/plugins/CR_eventList/files/googleApi/src/Google/Http/REST.php(62): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request), Object(Google_Client)) #1 [internal function]: Google_Http_REST::doExecute(Object(Google_Client), Object(Google_Http_Request)) #2 /files/plugins/CR_eventList/files/googleApi/src/Google/Task/Runner.php(174): call_user_func_array(Array, Array) #3 /files/plugins/CR_eventList/files/googleApi/src/Google/Http/REST.php(46): Google_Task_Runner in <b>/files/plugins/CR_eventList/files/googleApi/src/Google/Http/REST.php</b> on line <b>110</b><br />
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.