ios 添加日历提醒事件_将日历提醒事件添加到网页

ios 添加日历提醒事件

Publicizing real-world events on web pages is a great idea, but it assumes that readers will frequently revisit the site, or record the time and location of the event themselves.

在网页上公开真实事件是一个好主意,但是它假定读者会经常重新访问该网站,或者自己记录事件的时间和位置。

There are two ways that event information can be enhanced on web pages:

可以通过两种方式在网页上增强事件信息:

  1. Adding microformats and microdata to the HTML for enhanced access in search engines.

    HTML添加微格式微数据 ,以增强搜索引擎的访问权限。

  2. Encoding event data as a separate downloadable file that can integrate the information with calendar applications such as Microsoft Outlook and Google Calendar.

    将事件数据编码为单独的可下载文件,该文件可以将信息与日历应用程序(例如Microsoft Outlook和Google日历)集成在一起。

Screenshot of Outlook Calendar with exported .ics filesAs we’ll see over the next series of articles, these two goals are interrelated; in this article, I’ll look at the second option. On the whole, the technique is closely related to
adding personal information to contact management systems, a topic I covered earlier.

将个人信息添加到联系人管理系统密切相关,这是我之前讨论的主题。

It’s possible to write the code for calendar events manually, but it’s easiest to create them using an application such as Outlook, iCal, or an online generator. From Outlook, simply drag an appointment from the calendar view to your desktop. Then rename the file appropriately, upload it to your server and add a link from the relevant web page:

可以为日历事件手动编写代码,但是最简单的方法是使用Outlook,iCal或在线生成器之类的应用程序创建日历事件。 在Outlook中,只需将约会从日历视图拖到桌面即可。 然后适当地重命名文件,将其上传到您的服务器,并从相关网页添加链接:

<a href=showcase-night-1.ics>Add to your calendar</a>

As with .vcf files, you may find that your server does not deliver the .ics file correctly. If so, you will need to add the following line to your site’s .htaccess file:

.vcf文件一样,您可能会发现服务器未正确交付.ics文件。 如果是这样,则需要将以下行添加到站点的.htaccess文件中:

AddType text/calendar .ics

There is one other possible quirk: the .ics file will tend to associate itself with  applications, but it’s possible that the user might prefer to use an online scheduling system such as Google Calendar. That becomes a somewhat trickier proposition to integrate on a web page: while it’s usually easier to leave it to the user to download the .ics file and add it to Google Calendar manually, it is possible to create separate links for online calendars, together with an Add to Facebook button, a topic I will cover in another article.

还有一个可能的怪癖: .ics文件倾向于将其自身与应用程序相关联,但是用户可能会更喜欢使用诸如Google日历之类的在线计划系统。 整合到网页上变得有些棘手:虽然通常让用户下载.ics文件并将其手动添加到Google日历比较容易,但可以为在线日历创建单独的链接,以及添加到Facebook按钮,这是我将在另一篇文章中讨论的主题。

翻译自: https://thenewcode.com/668/Adding-Calendar-Reminder-Events-To-Web-Pages

ios 添加日历提醒事件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值