安全共享的 Google 日历
我正在开发一个小型网站。它有一个非常简单的想法,有两组用户,办公室和工人,都必须登录才能访问该站点(该站点是使用 Zend 框架构建的)。
问题:我想要一个所有用户都可以访问的日历。办公室工作人员能够编辑日历,而工作人员只能查看日历。
由于其灵活性,我真的很想使用 google 作为日历的后端:几个办公室工作人员在路上工作(都有 Android 手机),因此可以与这些用户共享日历,并且他们可以使用移动设备来更新日历。
我遇到的问题是与工作人员共享日历。我想将可查看的日历嵌入到安全页面中 - 但显然用户必须以谷歌用户身份登录才能查看日历(它不能公开)。我曾希望可以使用 Zend_Gdata_Calendar 但似乎没有一种简单的方法来获取日历视图。有什么办法可以做到这一点吗? 是否可以让网站通过谷歌进行身份验证并获得嵌入的日历?
另一方面是我希望办公室用户能够添加到日历 - 这通过 Zend_Gdata_Calendar 很容易 - 也许不像我希望的那么整洁。
我想到的另一个选择是使用 Zend_Gdata_Calendar 和 jQuery Calendar 可能,然后允许不同的用户执行不同的任务。
有没有什么好的教程可以在这种情况下提供帮助?
I am working on a small scale website. It has a very simple idea, there are two sets of users, office and workers, both have to login to acess the site (the site is built with the Zend framework).
The problem: I want to have a calendar which is accessible by all the users. The office staff being able to edit the calendar and the workers only being able to view the calendar.
I really want to user google as the backend for the calendar due to its flexibility: A couple of the office workers work on the road (all have android phones) so the calendar can be shared with those users and they can use their mobile devices to update the calendar.
The problem I've got is sharing the calendar with the workers. I wanted to embed the viewable calendar inside a secured page - but obviously the user would have to be logged in as a google user to view the calendar (it couldn't be public). I had hoped I could use the Zend_Gdata_Calendar but there doesn't appear to be an easy way to get the calendar view. Is there any way to do this?
Would it be possible to get the website to auth with google and get an embeded calendar?
The other side is I want office users to be able to add to the calendar - which is easy enough through the Zend_Gdata_Calendar - maybe not as neat as I had hoped for.
The other option I was thinking was using Zend_Gdata_Calendar and a jQuery Calendar possibly, then allowing different users to do the different tasks.
Is there any good tutorials out there that could help in this situation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,经过大量搜索后,我决定实施自己的解决方案,因为我找不到符合我需求的解决方案。
我决定使用 FullCalendar 插件。它确实有一个 gCal 功能,可以从日历提要中获取数据,但日历需要公开才能使用此功能。所以我创建了自己的。
在页面视图(calendar.phtml)上:
在calendarAction方法中:
在我的日历控制器中,我添加了一个返回json数组的函数(CalendarControler.php):
最后是未完成的JS类(myCal.js) - 它是未完成的,因为我将挂钩 fullcalendar 的可编辑和添加操作,并使用一些 ajax 调用来创建对话框并添加新事件、编辑事件和删除事件 - 否则这基本上将是一个私有的嵌入式谷歌日历(就像向工作人员显示的那样) :
Okay after lots of searching, I have decided to implement my own solution seeings as I couldn't find one out there that matched my needs.
I have decided to use the FullCalendar Plugin. It does have a gCal function, where it will get the data from a calendar feed, but the calendar needs to be public to use this function. So I created my own.
On the page view (calendar.phtml):
In the calendarAction method:
In my Calendar Controler I added a function to return a json array (CalendarControler.php):
Finally the unfinished JS class (myCal.js) - It is unfinished as I will be hooking onto the editable and adding actions of fullcalendar and using some ajax calls to create a dialog and add new events, edit events and delete events - otherwise this would basically be a private embeded google calendar (like what is shown to the workers):