內容簡介
一個簡單的區塊或小工具,可以顯示來自 Google 公開日曆、Microsoft Office Outlook 日曆或其他 iCal 檔案的活動,並且可以符合您網站的風格。
這個小工具可以從公開的 Google 日曆(或其他 iCal 格式的日曆)中获取活動信息,以簡單列表的方式顯示,您可以通過應用各種 CSS 完全適應您的網站。Google 提供了一些 HTML 片段,可以將公開的 Google 日曆嵌入到您的網站中。這非常好,但一旦您想要進行一些樣式方面的微調,就超出了一些基本的更改顏色之外的範圍了。
插件的功能如下:
日曆區塊或小工具,可顯示公開的 Google 日曆或其他 iCal 檔案的預約/活動。
區塊在編輯器中可以提供實時預覽,而且不受小工具區域的限制。老版的小工具將僅會顯示在遺留的小工具區塊中。
佔用空間極小,僅使用 Google 日曆的 ID、Outlook 的 ICS 鏈接或 iCal 檔案的 URL,通過 iCal 獲取事件信息。
合併多個日曆到一個區塊中。
管理 Google 日曆或其他 iCalendar 來源中的事件。
通過 CSS 完全適應您的網站。以無序列表的形式輸出,具有 Bootstrap 4 的列表群組類和詳細信息切換功能。
在設置屏幕中選擇適合您網站的日期/時間格式。
顯示每個活動的 DTSTART、DTEND、SUMMARY、LOCATION 和 DESCRIPTION。 DTSTART 是必需的,其他元素是可選的。
顯示最常見的重複事件。頻率包括每年、每月、每周、每日(不包括每小時、每分鐘和更短的時間段)。
在下面的截圖中,左側是使用默認設置的區塊,單擊其中一個摘要後,右側是使用了一些調整的設置。
文檔如下:
通過 iCal URL 或 Google 日曆 ID 獲取日曆事件。
將多個日曆合併到一個區塊中。
顯示所選數量的事件,或從現在起選定時間段內的事件列表。
顯示活動開始日期和摘要;可以切換詳細信息、描述、開始、結束時間和位置。
顯示最常見的重複事件。
頻率包括每年、每月、每周、每日(不解析每小時、每分鐘...)、間隔(默認為 1)、WKST(默認為 MO)。
重複活動的結束可以通過 COUNT 或 UNTIL 指定。
按日、月、月日或設置位置(BYDAY、BYMONTH、BYMONTHDAY、BYSETPOS)的方式指定(沒有其他方式)。
從 EXDATE 中排除重複的事件(在評估 BYSETPOS 後)。
尊重時區和夏令時。使用 PHP、Google 和 Apple 中使用的 Iana 時區來構建和測試。現在還使用 Microsoft 時區和未知時區進行了測試。對於未知的時區名稱,使用 WordPress 的默認時區(可能是本地時區)。
對於大多數使用者來說,時區不是問題。WordPress 安裝、日曆應用程序和活動的時區設置都相同。
外掛標籤
開發者團隊
② 後台搜尋「Simple Google Calendar Outlook Events Widget」→ 直接安裝(推薦)
原文外掛簡介
Simple block or widget to display events from a public google calendar, microsoft office outlook calendar or an other iCal file, in the style of your website.
The Gutenberg block requires at least WordPress 5.9.
This simple block/widget fetches events from a public google calendar (or other calendar in iCal format) and displays them in simple list allowing you to fully adapt to your website by applying all kinds of CSS.
Google offers some HTML snippets to embed your public Google Calendar into your website.
These are great, but as soon as you want to make a few adjustments to the styling, that goes beyond changing some colors, they’re not enough.
Plugin Features
Calendar block or widget to display appointments/events of a public Google calendar or other iCal file.
Block gives live preview in the editor and is not constrained to widget area. Old widget will be displayed in legacy widget block only in widget area. Old widget works also with Elementor (with some limitations e.g. preview in backend editor is not always available).
Small footprint, uses only Google ID of the calendar, or ICS link for Outlook, or Url of iCal file, to get event information via iCal
Merge more calendars into one block
Manage events in Google Calendar, or other iCalendar source.
Fully adaptable to your website with CSS. Output in unordered list with Bootstrap 4 listgroup classes and toggle for details.
Choose date / time format in settings screen that best suits your website.
Displays per event DTSTART, DTEND, SUMMARY, LOCATION and DESCRIPTION. DTSTART is required other components are optional.
Displays most common repeating events. Frequency Yearly, Monthly, Weekly, Dayly (not Hourly, Minutely and smaller periods)
Basic support for filter on Categories Warning: MS Outlook does not share categories via iCal now. Google and iCloud calendar don’t support categories at all. So this will not work with these calendars.
In the screenshot below: Left the block with default settings and clicked on one summary. Right with some adjusted settings.
Adjusted settings for start with summary:
Lay-out: Start with summary.
Date format first line: “.<\b\r>l jS \o\f F”
Enddate format first line: ” – l jS \o\f F”
Time format time summary line: ” G:i”
Time format end time summary line: ” – G:i”
Time format start time: “”
Time format end time: “”
Tag for summary: “strong”
Documentation
Gets calendar events via iCal url or google calendar ID
Merge more calendars into one block
Displays maximum the selected number of events as listgroup-items
Displays only events in a selected period with a length of the setting “Number of days after today with events” from now limited by the time of the day or the beginning of the day at the start and the and of the at the end.
Displays events in timezone of WordPress setting, or in Clients timezone with javascript REST call fetched from the clients browser.
Displays event start-date and summary; toggle details, description, start-, end-time, location.
Displays most common repeating events
Frequency Yearly, Monthly, Weekly, Dayly (not parsed Hourly, Minutely …), INTERVAL (default 1), WKST (default MO)
End of repeating by COUNT or UNTIL
By day month, monthday or setpos (BYDAY, BYMONTH, BYMONTHDAY, BYSETPOS) no other by…
(not parsed: BYWEEKNO, BYYEARDAY, BYHOUR, BYMINUTE, RDATE)
Exclude events on EXDATE from recurrence set (after evaluating BYSETPOS)
Respects Timezone and Day Light Saving time. Build and tested with Iana timezones as used in php, Google, and Apple now also tested with Microsoft timezones and unknown timezones. For unknown timezone-names using the default timezone of WordPress (probably the local timezone).
(This widget is a Fork of version 0.7 of that simple google calendar widget by NBoehr
https://nl.wordpress.org/plugins/simple-google-calendar-widget/)
Copyright and License
This project is licensed under the GNU GPL, version 2 or later.
2017 – 2023 © Bram Waasdorp.
