Best way to implement a Calendar interface using G

2019-04-13 00:53发布

问题:

I'm building a site for my school as a pet project, which would include accounts for all students. I want to display a calendar for each student that should have the following features:

  • It should be able to import events from multiple Google Calendar feeds. Compatibility with either the XML, ICAL or HTML feed will do.

  • It should be able to give different colors to different events based on the feeds which they originated from.

  • It would be nice if the calendar could also give different colors based on certains tags in the event titles, like all events starting with "Test: " will be red, and all events starting with "Deadline: " can be blue.

  • The interface should be nice, but simple. It should be easy to implement, and no dependency on Javascript would be good. Preferably, it will work simply on PHP.

  • It must provide 3 views of the calendar: Month, Week & Agenda

Features I don't require are:

  • Write ability (the calendars can/should be read-only)
  • Multiple-day events or recurring events
  • Links or html content inside events

What would be the simplest pre-made solution to implementing this? Currently, I am trying out various solutions like FullCalendar, and the various solutions listed at the Plans Website. However, none of them are perfect, because either they are not supported any more, or require javascript, or don't have all the features I need. I'm also gonna check out the GWT-cal plugin, and the Zend Calendar GData framework, but any feedback on your experiences with any of these would be good.

Can someone suggest the easiest way of getting this working?

回答1:

Ok the word limit on comments is ridiculously low and irritating, so after having posted two comments and still having more to say, I decided to just post an answer. Sorry...

Yes, GCal is perfect, but I can't trust the technologically challenged students of my school to manually subscribe to ical feeds. So i wanna provide a site where people can select from a list of courses, and automatically get a customized event feed.

Right now, I have a rough implementation going by making a common Google Account that has separate calendars for each course. Then with some url trickery, I embed a custom iframe that gives a special read-only version of the calendar with only the calendars applicable to that specific user. This will probably raise problems when I want email notifications of events and stuff, and might force me to go into the Google Calendar API in detail. :(

Can you check out my other question at Is there anything wrong with the way I'm implementing a Calendar on my site? and give some feedback?



回答2:

you should check out gwt-cal. versin 0.8.x only provides day/week view but the 0.9.0 branch implements an Agenda view with a Month view in progress.



回答3:

First of all, GWT-cal is not PHP, it is Java. Secondly, why do you not want to work with JavaScript? Finally, if you are importing it all from Google Calendar, why not use Google Calendar as it has almost all you are requesting and can handle all of the user accounts and such?

The way I understand the project is you are attempting to either make one page that displays many different calendars from all the students or have each student sign in and view their calendar. Is that correct?



回答4:

I would build (or find) an app that mixes the selected iCal feeds together to create a new feed, so that it can be subscribed to in GCal/iCal/Outloook/30boxes/...

If you still want a display you might try WebCalendar.

IIRC there are also some Drupal modules for this kind of thing.