Closed (fixed)
Project:
FullCalendar
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2010 at 10:11 UTC
Updated:
11 May 2011 at 18:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
jwhat commentedThis would be interesting. We could parse an xml (or with more work, an ical file) and then add those events to the JS that renders the events in fullcalendar.
For reference, here's Google's US Holidays XML file: http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.c...
Comment #2
tim.plunkettFor reference: http://arshaw.com/fullcalendar/docs/google_calendar/
Comment #3
jwhat commentedLet's get #980886: Require Libraries API resolved first, so that we don't have to worry about adding this gcal.js file.
Comment #4
tim.plunkettComment #5
tim.plunkettTrying to get a 6.x-1.0 release, new features can wait.
Comment #6
webankit commentedwill be nice feature for 7.x too subscribing
Comment #7
aspilicious commentedPushing to D7, cause I wrote this for that branch.
Initial patch, couple of todo's (ctrl-f them).
Used http://arshaw.com/fullcalendar/docs/google_calendar/ as a reference.
Btw: edit the admin path so it show up on the configuration screen. (forgot to include it in the patch)
Comment #8
tim.plunkettComment #9
aspilicious commentedOk It's alrdy working (for D7), just had to figure some things out.
Learned a lot by doing the wrong stuff :).
I'm prety sure this can be comitted to a dev branch. Port to D6 should be easy :)
There are still some todo's but it is working for everyone desperate to try this out.
You can define your own class and feed in the admin menu for easy styling.
The edit function isn't working yet (small bug I guess) ==> Please help me :p
Multiple google feeds aren't allowed yet, we should figure out first how to handle that in the admin menu (as each calendar should have its own class name)
Screenshot admin:
http://awesomescreenshot.com/04c6761e2
Screenshot calendar with google events: (red squares are google calendars :D)
http://awesomescreenshot.com/060676440
Comment #10
aspilicious commentedNow without tabs or trailing whitespaces... I hope...
Comment #11
aspilicious commentedNeeds work, cause when you don't insert a gcal xml file you're screwed :p :) (you don't see any dates)
EDIT:
This code makes at least the drag and drop functional again, the gcalFeed function goes mad when you enter an empty string as feed url. And stupid javascript wont allow me to add an if test in the construction ;)
Fix this and eveything works... I hope...
Comment #12
aspilicious commentedDepends somewhat on this feature request we made:
http://code.google.com/p/fullcalendar/issues/detail?id=803&colspec=ID%20...
Comment #13
tim.plunkettCan't wait to work on this more.
Waiting to hear back from Adam Shaw.
Comment #14
tim.plunkettThis is a stop-gap for people dying for this feature.
It means all calendars will have the events of this one Google Calendar.
Add it here: admin/config/calendar/fullcalendar
Be sure to change the hardcoded timezone in fullcalendar.views.js to match the Google Calendar timezone.
Comment #15
aspilicious commentedI'm making this active again on drupal dev days, xjolanx007 (a friend of mine) said he was going to convert the gcal function. And here is the result. A brand new gcal.js file. I think it will take a while before this will be integrated into the fullcalendar plugin So I suggest to:
1) create a submodule for the gcal integration (as it is not rly a feature everyone needs).
2) add the new gcal.js feed to that directory.
3) create the views integration in that module.
Good idea?
- I decided to rename the function to gcalFeedArray(), don't forget that while testing.
- I know Tim would like to program this himself AND we need to agree about the workflow for this.
So I'm not asigning this to myself.
Have fun!
BTW: if we ever commit this don't forget to give xjolanx007 some credits ;)
Comment #16
aspilicious commentedThis how the array should be build:
[
[
"http://www.google.com/your_feed_url/",
{
// put your options here
className: 'gcal-event',
editable: true,
currentTimezone: 'America/Chicago'
}
],
[
"http://www.google.com/your_feed_url2/",
{
// put your options here
className: 'gcal-event',
editable: false,
currentTimezone: 'America/Chicago'
}
],
]
Comment #17
aspilicious commentedNow without tabs...
Comment #18
aspilicious commentedThis one can handle empty arrays...
Comment #19
tim.plunkettThis gets the feeds into the format described in #16, available in Drupal.settings.fullcalendar.gcal.
Comment #20
aspilicious commentedOk this should do it...
Comment #21
aspilicious commentedWithout tabs this time?
Comment #22
tim.plunkettCleaned up the patch a bit more, to reduce the changes made.
#21: 6 files changed, 197 insertions(+), 24 deletions(-)
#22: 6 files changed, 170 insertions(+), 1 deletion (-)
The indentation is all out of whack anyway, we can fix that later.
The manual array stuff in the new gcal.js is strange to me, why doesn't it use .each()?
If you have a calendar with node-based events, it works.
If you have node-based and GCal-based events, it works.
But if you have node-based events, and you enter a GCal feed that doesn't work, all events silently fail to display.
I noticed it first with a typo, and once when my wi-fi was turned off.
Any thoughts?
Comment #23
aspilicious commented1) The array stuff, probably because we are used to java and c++. No special reason.
2) That's because json(p) silently fails, so the callback doesn't get called so there are no events. The original script has the same problem.
Comment #24
aspilicious commented1) switched to the each function, prety nice :)
2) fixed the tabs
Comment #25
aspilicious commentedNeeds review cause there is no clean solution for the jsonp calls (without making asumptions about timeouts).
Comment #26
aspilicious commentedOk final patch?
Now based on: #1049080: Support non-Field API fields and relationships
- google calendar stuf is a field and it works :)
- you can edit the classnames for easy theming
- it gets accepted as a date field (only 1 line fix OW YEAH, thnx to the patch dependency)
- you can select this field as a custom date field. (we are so lucky it works out of the box due to our architecture :) )
(and yes it will not use all the other date fields if there are any)
Comment #27
tim.plunkettAwesome!
http://drupal.org/cvs?commit=497492
Comment #28
tim.plunketthttp://code.google.com/p/fullcalendar/issues/detail?id=803#c8
Comment #29
aspilicious commentedNow the fix without the hack :)
Comment #30
tim.plunkettCode looks good, will test soon.
Comment #31
tim.plunkettGreat. Will commit tomorrow morning, it's Valentine's Day here in the US.
Comment #32
aspilicious commentedYou can disable the colorbox for gcal events with the folowing code.
from
to
I can't patch this at the moment because git fetching is blocked at the university...
Comment #33
aspilicious commentedNeeds review
Comment #34
aspilicious commentedNew one
Comment #35
tim.plunkettI'm going to commit this, but with comment and whitespace fixes. Here's the final version.
Comment #36
tim.plunketthttp://drupal.org/cvs?commit=500798
Comment #38
tim.plunkettYeah...
Comment #39
izmeez commentedsubscribing
Comment #40
miwsio commentedWill it be backported for Drupal 6 ?
Comment #41
tim.plunkettThis is next.
Comment #42
tim.plunkettComment #43
tim.plunkettThis should be good.
Comment #44
aspilicious commentedSeems to do the job :).
Test cases:
- add gcal calendar on normal event calendar
- add empty gcal calendar to new calendar
- filled the calendar with one event but didn't make the calendar public
- same as before but made it public
Comment #45
tim.plunketthttp://drupalcode.org/project/fullcalendar.git/commit/c9df706
And I made an 6.x-2.0-alpha1!
Comment #47
dboulet commentedLooks like the commit in #45 made this module incompatible with Views 2, was that on purpose?
Comment #48
tim.plunkettAs stated on the project page and in the README, the 6.x-2.x branch was always only for Views3, this patch just happened to update the hook_views_api() function accordingly.
Comment #49
dboulet commentedI see it now, thanks Tim.