Which PHP calendar will suit my needs? Or build my own? - php

There are so many web based calendars out there that I'm not sure which will best suit my purposes.
I want to create an events calendar, which I suppose looks and functions in much the same way as google calendar. But users shouldn't need to sign up for a gmail account or a google account. Users of my social network website should be able to create events in the calendar and share it with other friends in their "friend network". In month, year or day views, you can mouse hover events to see a bubble dialog that lists events in detail. People need to pay a monthly fee to use my website (not sure if this prevents me from using google apps).
So is something like Google Calendar the way to go? Or are there other php/javascript calendars out there that already meet my needs? Or will it just save me more time to build my own?

Check out full calendar by arshaw.
This is a jQuery plugin that provides a full-sized, drag & drop calendar just like google calendar. one can also customize it easily.
Full Calenadar Link.

if you are going your own route then best to build on something already there and open. iCal is an open and available calendar spec and there are php implementations, but they would be extensible and you would following a standard.

Related

Is it possible to sync custom events data to separate google calendar account?

I have a restaurant reservation website build with Laravel and running for merchant and customer.
What I would like to do is, when customer successfully booked at merchant's restaurant, I would like to sync reservation data to "merchant's google calendar" as well as "customer's google calendar".
Is it possible to do with Google Calendar? If so what's the approach to do that?
What would be the seamless approach to sync data between their own calendar and my calendar (from my website)?
As far as I understand your use case from the comments, you actually need to do two different things:
1. Keep the merchant's calendar up to date
For this, a sync might indeed be the best solution. A Calendar API "sync" is just a usual read operation which includes a sync token you can use in later reads to reduce the number of needed operations. It is described in the docs.
2. Add the event to the customer's calendar
You do not want to sync your calendar with the customers' calendar here, just add one event. Of course, you can add an event via the API; however, a much better solution seems to be providing a link for the customer to add the event himself:
https://www.google.com/calendar/render?action=TEMPLATE&text=Your+Event+Name&dates=20150998T224000Z/20150998T221500Z&details=For+details,+link+here:+http://www.example.com&location=Waldorf+Astoria,+301+Park+Ave+,+New+York,+NY+10022&sf=true&output=xml
It is much easier technically, and the customer does not need to give you full access to his calendar (there is no write-only permission).

Creating a Google Calendar remotely

I've been researching this question for the last few weeks and have had no success trying to connect to Google through OAuth1 OR 2.
I have a client that needs a separate Calendar for each of the homes they are building. On creation of a new home in the database, I want to create a calendar and save the Id of the created calendar.
What options do I have to do this?
It seems like the only way is to have the user get redirected to Google and login to add a calendar... I want to use a static Google account and simply create the calendar that way, without having the annoying "Login to google" screen.
Google api lets you to do whatever you need with a Calendar using their provided libraries. Let's take a look: Google Developer: Instantiate Google Calendar
This SO posts discusses that. Specifically pay attention to the line in the accepted answer where it is mentions the process for adding a new calendar is similar to adding an event.
SO: Google Calendar API Selecting and creating Calendars
I also came across this tutorial which may be helpful in terms of other actions on the calendar once it has been created.
IBM Developer Works: Integrate your PHP Application with Google Calendar

Integrating Outlook Calendar to Website / Other

When the users add events to the online calendar they also can be added to the outlook calendar (synchronize). Obviously a site built using PHP can not integrate with desktop application directly, so I am looking alternative options.
Options I found:
Using PHP ICAL library creates an .ics file and the user can download it and install. Not the most user friendly way of doing it, might work.
Use SharePoint or exchange server- but have no previous experience working Microsoft technologies, so it not ideal.
Use Google Calendar and Zend Library (gdata), create online calendar and add events to that. Then using Google Calendar Sync tool the user can sync the online calendar to outlook. But the problem here is the all users need a gmail account to use the Sync tool, it not ideal when you have thousands of users on the site. Unless I create one global gmail account and create many calendars on that account, if that even possible.
Questions:
Are there any outlook plug-ins paid or free (ideally) that can achieve this?
Are there any web service/ APIs that can achieve this?
Any other ideas or solutions?
Office 365 comes with an REST API that can be used to read/write to calendars.
Here's some documentation on this. http://msdn.microsoft.com/office/office365/api/calendar-rest-operations
Alternatively, the EWS Managed API might be able to help you: http://msdn.microsoft.com/en-us/library/office/dd633696(v=exchg.80).aspx and
http://msdn.microsoft.com/en-us/library/office/dd633702(v=exchg.80).aspx
you could do this by having the outlook subscribe to the online calendar.
with phpicalendar you can have other clients subscribe to your calendars (here)
you may want to tweak the generated .ics file to include X-PUBLISHED-TTL - Recommended update interval for subscription to the calendar
To get the calender event follow these step:
Sign in to Calendar
On the toolbar, click Share
Select the calendar that you want to export/embed.
Click Get a link.
Under Show event details (click Create)
Note: If step number 5 is already performed, just skip it and click Link to event details
Copy the link that you needed and paste it on the desired program/website.
Use EWS exchange webservice to achieve this.
If it is a website with a no. of users u will need to create OU in exchange server and add a admin user who has read permissions to all accounts in the DL.
EWS exposes endpoints where in u can fetch the calendar mail add read and do all kind of operations.
Building off Rahul's idea but using a different approach - Microsoft provides something similar to a "RSS feed" that auto updates each time you GET the URL, except it's an feed of "ICS" event data:
Open up Outlook Web Access (OWA), e.g. if you are using a microsoft.com account the URL might be https://outlook.live.com/calendar/ (if you are using some other Microsoft 365 account the URL may be different)
On the top right, click the Settings icon
Click View all Outlook Settings
Click Calendar > Shared Calendars > and under Publish a calendar, select the calendar, then under Select permissions, choose as appropriate, then click Publish
It will give you HTML and ICS links. Copy the ICS link URL.
Use your favourite programming language/tool/software to periodically do a HTTPS request (using CURL or AJAX or some other HTTP fetch) using GET method to the URL you got in step 5. You will get back a bunch of calendar data in ICS format. Use this however you need. You may be able to find some pre-written code from elsewhere that parses ICS data for you, or you can manually create your own parser code if you have to.

Zend Framework Project - Calendar: Need web calendar with events (like google calendar) for every user separately

I doing multi users website (it should works for more than 100,000 users) with Zend Framework.
I need to create event calendar like google calendar (If it was possible to use google calendar i will do it- please tell me).
I have to do that from zero or exist some good Calendar that will work well with Zend?
Thanks
Check out full calendar by Arshaw.
This is a jQuery plugin that provides a full-sized, drag & drop calendar just like google calendar. one can also customize it easily.
Full Calenadar Link.
There are some calendars proposals on ZF, e.g. this Zend_Calendar proposal. You can easily extend it with Google Calendar as a data provider.
Take a look at alternative to Google Calendar, written in jQuery: wdCalendar as well.
If you want to do it with Google Calendar, have a look at Zend_Gdata:
Google Data APIs provide programmatic interface to some of Google's online services. The Google data Protocol is based upon the ยป Atom Publishing Protocol and allows client applications to retrieve data matching queries, post data, update data and delete data using standard HTTP and the Atom syndication formation. The Zend_Gdata component is a PHP 5 interface for accessing Google Data from PHP. The Zend_Gdata component also supports accessing other services implementing the Atom Publishing Protocol.
Specifically the chapter on Using Google Calendar:
You can use the Zend_Gdata_Calendar class to view, create, update, and delete events in the online Google Calendar service.
Also see http://code.google.com/apis/gdata/ for more information about Google Data API.
Also see the answers to these questions:
Know of any open source Zend Framework calendar?
Which PHP calendar will suit my needs? Or build my own?
Calendar using Javascript/ PHP/ mySQL
I think that you could use Google Calendar Api. You would need to create a calendar for each user using Calendar Data API. And when a user is logged show him his calendar in a google calendar embed. I didn't try that, but I will try tomorrow. If it is not posible I will let you know.

Best way to implement a Calendar interface using Google Cal feeds for events?

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?
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?
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.
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?
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.

Categories