开发者

Yahoo! Pipes and Fullcalendar

开发者 https://www.devze.com 2023-03-06 01:55 出处:网络
I know that Yahoo! Pipes can create JSON feeds from RSS sources. Is it possible then to use the JSON feed provided by Yahoo! Pipes to drive fullcalendar?

I know that Yahoo! Pipes can create JSON feeds from RSS sources. Is it possible then to use the JSON feed provided by Yahoo! Pipes to drive fullcalendar?

Example of a Yahoo! Pipes JSON feed: http://pipes.yahoo.com/pipes/pipe.run?_id=b551e36fb568c5b2bc4bb088af7bd737&_render=json

I've never used JSON, so I'm at a loss as to what I should do next with this file. -- Do I download it, do I point it to this url somewhere in the fullcalendar code, do I reformat it with PHP? A response with an example of the next steps would be lovely.

I think the answer to this question would be very he开发者_如何学Clpful for people looking to use RSS feeds to drive their calendar!


I wont be asked to make you an example.. but i can tell you waht the break down should be

Yahoo! Feed

{"count":18,"value":{"title":"Academy Theatre","description":"Upcoming Events","link":"http:\/\/pipes.yahoo.com\/pipes\/pipe.info?_id=b551e36fb568c5b2bc4bb088af7bd737","pubDate":"Thu, 12 May 2011 22:09:18 -0700","generator":"http:\/\/pipes.yahoo.com\/pipes\/","callback":"","items":[{"link":"http:\/\/www.brownpapertickets.com\/event\/130787","y:title":"Platinum Championship Wrestling","y:id":{"value":null,"permalink":"true"},"title":"Platinum Championship Wrestling","pubDate":"2011-05-13 20:00:00","description":"The PCW Championship Fridays at 8 P.M. - With the coming of 'Sacred Ground II', will Jay Fury finally wrest the PCW crown? How will the new Tag Team Season progress? Will The Assasins Guild finally make it to the top of the heap? Will The Koncrete Gorillas take over? You have to be there every Friday Night to know for sure!","y:published":{"hour":"3","timezone":"UTC","second":"0","month":"5","minute":"0","utime":"1305342000","day":"14","day_of_week":"6","year":"2011"}},{"link":"http:\/\/www.brownpapertickets.com\/event\/173914","y:title":"\"Ahoy, Pirates and Mermaids\"","y:id":{"value":null,"permalink":"true"},"title":"\"Ahoy, Pirates and Mermaids\"","pubDate":"2011-05-16 09:00:00","description":"Summer Drama Camp (4-7yrs) - June 6-11 from 9:30am-12:30 pm (for early drop off and late pick up options- contact Avondale Playhouse directly). An adventure on the high seas!! We will be exploring age appropriate stories with this theme and dramatizing them with the h

Has allot of information in it. It will require a plugin... like gcal.js to process Google Calendar XML feeds so it knows what information to extract or sort it with the function method from fullcander and push items to an array.

The Json should look like this

Firstly you need to remove the first part ' {"count":18,"value" ' - this inforamtion might be good but not for FC

Then it starts of well with ':{"title' But that should be the very first character and should look more like

[{"title":"Acadmeny Theatre","description":"Upcoming Events"

Then there are things like url, y.title,y.url and what you need is 'pubDate' which just needs to be date. and then it seems to carry on with more stuff

SO ideally the json that you provide back to FC should look like this

[{"title":"Acadmeny Theatre","description":"Upcoming Events","Date":"Thu, 12 May 2011 22:09:18 -0700"},{"title":"next Title","description":"MOre InfoEvents","Date":"Thu, 14 May 2011 22:09:18 -0700"}]

FC Will pick that up as 2 Events on the 12th and 14th

The FC Documentation explains it very well.

Here is the documentation on how to use the FC function to build an array from a source that you need

http://arshaw.com/fullcalendar/docs/event_data/events_function/

And here is a working demonstration fiddle with the idea working. You just need to make it process the Yahoo! feed.

http://jsfiddle.net/ppumkin/6wE8v/

You want to concentrate on this part

var event = [];
            event.push({
                title: 'Garten',
                start: '2011-05-10T00:00:00',
                allday: true

Looking at this SO Post you can see how the user used SQL to push objec- You will need to do something similar with the json feed you get back

No Callback after SQLite-Request

These are good examples.. and you know how to confine your search now for more info.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号