本文介绍了如何创建链接以将条目添加到日历?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为这家夜总会工作,目前正在为他们建立一个网站,他们举办了很多活动,他们的网站围绕活动建立了很多,今天他们为每个活动制作了一个 Facebook 活动,但这将是杀手有一个添加到我的日历"按钮,可将其添加到您的 iCal 或 Google 日历(甚至可能是 Outlook)中.

I'm working for this nightclub and are currently making a website for them, they've got lots events and their site is built a lot around events, today they make an facebook event of every event but it would be killer to have a "Add to my Calendar" button which added it to your iCal or Google Calendar (or maybe even Outlook).

我已经设法弄清楚如何制作日历提要,但随后它将作为新日历添加,唯一的好处是人们可以订阅活动",但是为每个活动都有一个日历很麻烦.所以我想知道如何实现一个功能,让他们轻松地将其添加到他们的主日历中.像 mailto 一样思考:链接,但如果可能的话,用于日历.

I've managed to figure out how to make an calendar feed but then it will be added as a new calendar, only good thing is that people can "subscribe to events" but it's quite messy to have an calendar for every event. So I would like to know how to implement a function which lets them add it to their main calendar easily. Think like a mailto: link but for calendars if that's possible.

另外,当我谈到这个主题时,有人知道是否可以自动将事件从 Facebook 导入 WordPress 或将事件从 WordPress 导出到 Facebook,这会很棒,但这并不重要.

Also while I'm on the subject, does anyone know if it's possible to automatically import an event from Facebook to WordPress or export an event from WordPress to Facebook that would be great, but that's not so important.

推荐答案

更新(免费供个人使用):
现在支持 HTTPS

UPDATE (free for personal use):
HTTPS IS NOW SUPPORTED

虽然我在下面详细说明每项服务的操作方法的答案将起作用,但 IMO 现在与像 AddThisEvent 这样的第三方合作要容易得多[https://addthisevent.com].它使您可以自定义许多选项以及添加到 Facebook 等等.不幸的是,他们现在将其作为非个人用途的付费服务,并强制执行.

While my answer below detailing how-to for each service WILL work, IMO it's much easier now to go with a third-party like AddThisEvent [https://addthisevent.com]. It lets you customize lots of options as well as add to Facebook and more. Unfortunately, they've now made it a paid service for anything other than personal use and do enforce this.

我认为还有其他类似的第三方解决方案,但我只能谈谈这个,到目前为止它对我们来说效果很好.

I assume there are other third-party solutions like this one, but I can only speak to this one, and it has worked great for us so far.

对于添加到我的 Google 日历",他们曾经有一个您可以使用的代码生成器表单,但后来取消了它.有关 Google 日历链接的更多详细信息,请参阅 squarecandy的回答如下.

For an "Add to my Google Calendar", they used to have a code generator form you could use, but have since taken it down. For more details on Google Calendar links, see squarecandy's answer below.

对于 Outlook,这有点复杂,但基本上您需要使用事件数据创建一个 .vcs 文件,然后创建一个指向该文件的链接.步骤-此处的分步说明.

For Outlook, it's a BIT more complicated, but basically you need to create a .vcs file with the event's data, and just make a link to that file. Step-by-step instructions here.

对于 iCal 链接,您可以使用 PHP 类 喜欢这个,或关注 此页面的说明 关于如何创建 ics 文件(iCal 文件).

For an iCal link, you could use a PHP class like this one, or follow this page's instructions on how to create an ics file (iCal file).

这篇关于如何创建链接以将条目添加到日历?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-05 09:27