Discourse 日历与活动

:discourse2: 摘要 Discourse Calendar and Events 为您的 Discourse 站点添加动态且互动的日历和事件功能。
:open_book: 安装指南 此插件已捆绑在 Discourse 核心中。无需单独安装该插件。

启用日历和事件

您可以通过切换开关或其设置来启用日历和事件插件,这两者均可在您的 admin/plugins 页面访问:

功能

毫不奇怪,Discourse Calendar and Events 为您的 Discourse 站点同时添加了日历和事件功能。通过这些功能,您可以创建单独的主题日历来追踪重要场合或时间线,在类别中显示日历,添加假期日历来标记休假、缺席或病假,创建互动的事件主题,以及显示所有即将发生的事件的易于访问的日历摘要。

日历

可以在多个主题中创建定制日历,您希望提高可见性的日历可以显示在类别的主题列表上方。

您可以在以下链接中找到有关如何创建和使用日历的更详细信息:

事件

事件功能允许在主题中插入互动元素,您的成员可以使用这些元素报名参加或参与您社区的活动。所有这些都会汇总在一个专用的全站日历中,并可以选择在导航菜单中添加一个易于访问的链接。您可以在以下链接中找到有关如何创建和使用此功能的更多信息:

:exclamation: 请注意不要将其与 Pavilion 的 Events plugin(注意是复数)混淆

日历设置

名称 描述
calendar enabled 启用 discourse-calendar 插件。这将为主题的第一篇文章添加 [calendar][/calendar] 标签的支持。
holiday calendar topic id 员工假期/缺席日历的主题 ID。
holiday status emoji 定义用于假期状态的 emoji。
delete expired event posts after 带有过期事件的帖子将在 (n) 小时后自动删除。设置为 -1 以禁用删除。
all day event start time 未指定开始时间的事件将从此时开始。格式为 HH:mm。对于上午 6:00,请输入 06:00
all day event end time 未指定结束时间的事件将在此时结束。格式为 HH:mm。对于下午 6:00,请输入 18:00
calendar categories 在类别顶部显示日历。必填设置是 categoryId 和 postId。例如:categoryId=6;postId=453[1] 其他有效设置:tzPicker[2],weekends[3] 和 defaultView[4]
calendar categories outlet 允许更改应显示类别日历的出口。
working days 设置工作日。您可以使用帖子中的 timezones 标签显示组的可用性,例如:[timezones group=admins][timezones]
working day start hour 工作日的开始时间。
working day end hour 工作日的结束时间。
close to working day hours extension 设置工作日小时数的扩展时间以突出显示时区。
calendar automatic holidays enabled 根据用户所在地区自动设置假期状态(注意:您可以在插件设置中禁用特定的自动假期)
map events title 根据类别映射侧边栏日历的标题。默认为“即将发生的事件”

事件设置

名称 描述
discourse post event enabled 启用事件功能。注意:还需要启用 calendar enabled
discourse post event allowed on groups 允许创建事件的组。
displayed invitees limit 限制事件上显示的邀请人数。
display post event date on topic title 在主题标题后显示事件的日期。
use local event date 在主题标题后使用本地日期而不是相对时间。
discourse post event edit notifications time extension 延长(以分钟为单位)事件结束后 going 邀请者仍会收到原始帖子编辑通知的时段。
discourse post event allowed custom fields 允许每个事件设置自定义字段的值。
events calendar categories 在类别顶部显示事件日历。
sort categories by event start date enabled 启用按事件开始日期对类别主题进行排序。
disable resorting on categories enabled 允许类别禁用用户在事件类别上排序的功能。
sidebar show upcoming events 在侧边栏的“更多”下显示即将发生的事件链接。需要 post event enabled
map events to color 将事件颜色分配给指定的标签或类别

:information_source: :curling_stone: discourse-post-event/events.json 端点现在添加了一个参数以在简单和详细响应之间切换。要获取详细响应,您可以添加 ?include_details=true

/discourse-post-event/events.json?include_details=true

通过 API 创建事件

您可以通过 POST /posts.jsonraw 字段中使用 [event][/event] BBCode 来创建事件。以下是如何设置 API 请求的详细信息:

  • 使用带有 raw 参数的 POST /posts.json
  • 事件语法:[event start="2024-05-10 20:00" status="public" timezone="America/Vancouver" end="2024-05-10 21:30" allowedGroups="trust_level_0"]\n[/event]
  • 在打开和关闭标签之间必须有一个字面 \n 换行符
  • 使用 JSON 时必须转义双引号(\"
  • API 用户账户必须有权创建事件(管理员或具有事件创建权限的组)
  • 通过 category 参数设置类别,传入类别的 id 作为值。

直播事件

对于现场活动,请使用直播功能让成员观看活动并同时参与聊天。

直播事件包括:

直播事件的前置条件

要使用直播事件,您必须启用 chat enabled,因为直播会创建一个聊天频道来配合您的活动,此外还需要启用 discourse post event enabledcalendar enabled

创建直播事件

要创建直播事件:

  1. 打开一个新主题。
  2. 选择编辑器工具栏中的 + 图标并点击 Create Event(如果事件尚未添加到您的主题中)。
  3. 在活动视频链接(例如 YouTube URL)粘贴到位置/URL 字段中。
  4. 开启“livestream”开关

然后您将看到事件和直播已创建,右侧还有一个配套的聊天频道。

一旦任何用户在事件上点击 Going,他们将自动加入聊天频道,从而参与对话!

直播 Zoom 网络研讨会

您可以使用直播直接在 Discourse 中主持 Zoom 网络研讨会,以便成员可以在不离开社区的情况下观看活动并参与配套的聊天频道。

Zoom 网络研讨会的前置条件

除了 直播前置条件 外,您还需要配置以下设置:

  • 开启 livestream zoom enabled
  • livestream zoom sdk key 设置中输入您的 Zoom Meeting SDK 密钥
  • livestream zoom sdk secret 设置中输入您的 Zoom Meeting SDK 密钥

获取 Zoom Meeting SDK 密钥和密钥:

  1. 前往 marketplace.zoom.us,点击 Develop,然后点击 Build app

  2. 当询问您要创建什么类型的应用时,选择 General App 并点击 Create

  3. 从应用的 App Credentials 页面,复制 Client ID(SDK Key)和 Client Secret(SDK Secret)。

  4. Embed 下,启用 Meeting SDK 权限。

  5. 在您的 Discourse 中,前往 Admin → All site settings 并将步骤 3 中的值输入到 livestream zoom sdk keylivestream zoom sdk secret 中。

为了让 Zoom 网络研讨会在 Discourse 中正常工作:

  • 网络研讨会不应要求注册或密码才能加入。

  • 禁用 Zoom 内置的网络研讨会 聊天 以确保所有讨论都在单一的 Discourse 聊天频道中进行,以保持所有聊天在一个地方,并确保研讨会结束后对话可以继续。

创建 Zoom 网络研讨会直播事件

要为您的 Zoom 网络研讨会创建直播事件:

  1. 打开一个新主题,选择 + 图标,并点击 Create Event
  2. 将您的 Zoom 网络研讨会链接(例如 https://zoom.us/``...) 粘贴到 URL/Location 字段中。
  3. 开启 Livestream
  4. 根据需要设置事件名称、开始时间、结束时间和其他事件详细信息。
  5. 发布主题。

与其他直播事件一样,此事件将创建一个配套的 Discourse 聊天频道,成员在 RSVP 为“Going”后会自动加入。

成员体验

以下是您的成员体验网络研讨会的方式:

活动前

在活动开始前 30 分钟显示 Join Zoom 按钮。在此窗口之外,按钮将禁用并显示消息,指示何时可用。

活动期间

一旦成员点击 Join Zoom,网络研讨会将加载到主题页面(或者,如果主持人尚未开始活动,成员需要等待主持人开始才能看到视频)。

加入网络研讨会时音频不会自动连接;参与者需要点击或点击 Zoom 工具栏中的音频图标进行连接。这是 Zoom SDK 的限制,无法更改。

在移动设备上,网络研讨会以全屏 Zoom 视图打开(通过在事件主题 URL 末尾添加 /zoom 也可在桌面上访问),并带有一个浮动 Chat 按钮,他们可以在活动期间点击打开聊天覆盖面板。

活动后

在活动结束时间后 10 分钟隐藏 Join Zoom 按钮。聊天频道将对参与者保持开放,直到您关闭它。

与其他插件的集成

您可以将此插件中的组件与 Right Sidebar Blocks 一起使用。您需要确保在 Right Sidebar Blocks 组件中启用了所需的路由。块名称将是 upcoming-events-list。历史上,日历插件本身需要额外的设置,但这已经简化了。

这是侧边栏日历的默认外观。

如果您不想要时间,您可以在组件的块设置中添加一个空的 timeFormat 值。

:discourse2: 由我们托管?此插件在我们的 Business 和 Enterprise 层级可用 Calendar | Discourse - Civilized Discussion


  1. categoryId 是日历将显示在其上方的类别。
    postId 是您使用 [calendar][/calendar] 放置日历的帖子 ↩︎

  2. 它可以在日历右上角显示时区选择器。默认为 False,您可以通过 tzPicker=true 启用它 ↩︎

  3. 它可以隐藏日历中的周六和周日。默认为 True。您可以通过 weekends=false 将其设置为 false。 ↩︎

  4. defaultView 将设置日历的视图(日、周等;)。可以设置为:

    defaultView=agendaDay
    defaultView=agendaWeek
    defaultView=month(默认)
    defaultView=listNextYear ↩︎

101 个赞
How to use the calendar plugin?
Discourse Calendar - How to?
Calendar plugin, nothing is displayed
Discourse 2.2.0.beta3 Release Notes
How to use the calendar plugin?
Discourse Calendar dislpay link text rather than link url
Ability to mark any post as unread
Is there a room booking plugin?
📅 Event List Widget (Layouts Plugin)
I am looking for a webhook or event api
Inserting date/time into new topic's title field (ie, right here > !)
Db:migrate fails on discourse-calendar
Moderator/Admin Off Duty Button
Go from a Wordpress + Discourse structure to a Discourse site only?
Creating sub-communities in a discourse server
Vacation autoresponder for users who are away?
Please better document the Discourse Calendar plugin
Plugin to gather approvals / signatures on an initiative?
Plugin to show upcoming events on hosted discourse
Is there any way to change the starting date of the Calendar?
SEO applied to Discourse Official Plugins
Add color to events based on event category or tag?
Add recurrent items within a date-range
Use Case Question - Room/Equipment Booking
Best practices for communicating to user base
Integrate with Discourse-calendar
My Wiki of useful Meta (and other) links
Quotes in event name clears attendees
Calendar in Discourse
Show Cakeday dates on the Calendar plugin
Agenda de colegio
What are your favorite plugins for your community?
Display a category as a calendar by scheduled Topic-timer dates
Why you should use Discourse internally for your company/team instead of Slack (4 years use case)
Newbie question: Is there a comprehensive guide to configuring and administering Discourse instance?
Angus' Events Plugin :calendar:
When "closing" event it moves it to today's date & time
How to display different calendar views?
Discourse calendar and event iCal integration?
Can the auto-responder fire on @mentions?
Event/Calendar Plugin - Cannot select a user for bulk-invite
Bulk Invite via modal only allowing one user (and not displaying correctly)
Help us test Horizon, our newest theme
500 Error when posting, moment.tz runtime error
Best practice for a topic for a recurring event
How to get "back" btn
Event Chat Channels Now Available
📅 New Calendar Feature: End Date for Recurring Events
🌍 New Calendar Feature: Show Local Time
What livestream/webinar platforms do you use?
Custom Wizard Plugin :mage:
ICS → Discourse Importer
How have you built a local community around Discourse?
Angus' Events Plugin :calendar:
What happens next?
Bundling more popular plugins with Discourse core
Calendar subscription URLs for external calendar apps
Listing event invitees with email addresses
Discourse Daily Challenges
Upcoming Events Extra Buttons and Enhancements
Horizon: High Context Topic Cards
Besoin de renseignement pour informer une annulation d'événement
Current Projects - May 2026
It's easier than ever to create events in Discourse!
Easily create Events categories using the Calendar and Events plugin
It is very difficult to make events all day in the events modal (and 00:00 is confusing)
Discourse Calendar - How to?
Angus' Events Plugin :calendar:
Topic List Previews (TLP)
New Topic button text does not change to New Event in sidebar in events category in Horizon Theme
Current Projects - June 2026
Event Duplicator: duplicate calendar events/topics into a new time period
Event Creation
Category Calendar with defaultView="listNextYear" not showing events
Calendar Core - Needs any special theme?
Creating and managing calendars
Sorting Categories by Title
Creating and managing events
Category Calendar with defaultView="listNextYear" not showing events
The "Save Changes" button is very low on my user preferences interface page
Group Timezones
Easily create Events categories using the Calendar and Events plugin
Available hours / work hours flair
Could use help, setting up new community
Feature request: wrap calendar items when there's just one per day
Right Sidebar Blocks
Custom Discourse instance for a writers club
Unread messages blue numbers appearing in Latest lately (when they shouldn't)?
Database migration chokes on huge value of a "calendar-details" item in table "post_custom_fields"
"Out of office" user indicator
Database migration chokes on huge value of a "calendar-details" item in table "post_custom_fields"
Angus' Events Plugin :calendar:
Angus' Events Plugin :calendar:
Calendar plugin features to make it really useful for us
"Out of office" user indicator
Can discourse display topic replies in reverse order?
Discourse Livestream
New to Discourse, have some questions :)
Expired events with end times are being removed from upcoming-events even with setting set to -1
Setup Continuous Integration using GitHub Actions
Add color to events based on event category or tag?