Discourse 活动

:discourse2: 摘要 Discourse Events 为您的 Discourse 站点添加了动态且交互式的日历和活动功能。
:open_book: 安装指南 此插件已随 Discourse 核心一起捆绑提供。无需单独安装该插件。

启用活动

可以通过切换开关或从其设置中启用 Events 插件,两者均可在您的 admin/plugins 页面访问:

:discourse2: 由我们托管?此插件在我们的 Business 和 Enterprise 套餐中可用 https://www.discourse.org/plugins/calendar.html

功能

不出所料,Discourse Events 为您的 Discourse 站点同时添加了日历和活动功能。通过这些功能,您可以创建单独的帖子日历来跟踪重要场合或时间线,在类别中显示日历,添加假日日历以标记休假、缺席或病假,创建交互式活动帖子,以及显示所有即将举行的活动的易于访问的日历摘要。

日历

可以在多个帖子中创建自定义日历,并且您希望给予更高可见性的日历可以显示在类别的帖子列表上方。

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

活动

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

:exclamation: 这不应与 Pavilion 的 Events 插件 混淆(注意是复数形式)

日历设置

名称 描述
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 允许更改应显示类别日历的 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 根据类别映射侧边栏日历的标题。默认为 “Upcoming events”

活动设置

名称 描述
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 创建活动

您可以使用 raw 字段中的 [event][/event] BBCode 通过 POST /posts.json 创建活动。以下是设置您的 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 作为值。

直播活动

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

直播活动包括:

  • 视频流(例如使用 YouTube)
  • 使用 Discourse Events 的日历活动
  • 自动为活动创建的伴随 聊天 频道

直播活动的前提条件

要使用直播活动,您必须启用 chat enabled,因为直播除了 discourse post event enabledcalendar enabled 之外,还会创建一个伴随您活动的聊天频道。

如果您想使用直播,但不想在其他地方使用聊天...
  • chat allowed groups 设置为默认配置,或包含 trust_level_0 以让全新用户参与直播聊天
  • direct message enabled groups 设置中移除组,以防止用户之间的私信
  • 不要创建其他聊天频道

创建直播活动

要创建直播活动:

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

然后您会看到活动和直播已创建,右侧还有一个伴随的聊天频道。

一旦任何用户在活动上点击 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 密钥)和 Client Secret(SDK 秘密)。

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

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

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

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

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

创建 Zoom 网络研讨会直播活动

要为您的 Zoom 网络研讨会创建直播活动:

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

与其他直播活动一样,此活动将创建一个伴随的 Discourse 聊天频道,成员在回复为“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。历史上,Calendar 插件本身需要额外的设置,但现在已经简化了。

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

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


  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
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?
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)
Event Creation
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
Discourse Calendar & Events: Webhook triggers & Automations Plugin
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
It is very difficult to make events all day in the events modal (and 00:00 is confusing)
Questions about the Zoom Livestream integration
Help us test Horizon, our newest theme
Discourse Calendar is now Discourse Events!
Category Calendar with defaultView="listNextYear" not showing events
Zoom webinar livestream in the Events plugin
Calendar Core - Needs any special theme?
Current Projects - August 2026
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?

这个插件很有前景,但缺少一些功能,这使我们无法从 Pavilion 的插件迁移过来

  • 在日历上显示带有开始时间的非全天事件,目前所有事件看起来都像全天事件。

  • 在撰写器中,标签选择器旁边有一个“添加事件”按钮(而不是隐藏在齿轮图标中)

  • 限制哪些类别可以有事件,以及事件在类别中是否是强制性的

锦上添花的功能:

  • 主题中的事件元数据仅出现在主题顶部(而不是光标所在的位置)
  • 能够限制哪些组可以在类别中创建事件(例如,只有“EventPlanners”组可以在“Discussion”类别中创建事件,但所有用户都可以创建非事件主题(或在主题设置为 Wiki 时编辑主题)
  • 将 /upcoming-events 的 URL 更改为 /calendar
13 个赞

2 篇帖子已拆分到新主题:Holiday status being incorrectly applied

你好,
感谢你的工作。

我有 2 个用户体验问题:

  • 是否可以在主题编辑器中将“添加事件”按钮显示在“添加位置”按钮旁边?就像 pavillion 插件那样?
    image

  • 是否有可能在顶部菜单中添加“日历”条目?我在设置中找不到它

这看起来很棒!一些想法/问题:

我是否可以假设,要创建一个日历,只需创建一个新帖子/主题,然后将以下内容粘贴进去:

日历名称

[calendar]
[/calendar]

然后,要向日历添加条目,只需在同一帖子中发布类似以下内容(通过点击帖子选项中的“插入日期/时间”图标):

事件/条目名称

[date-range from=2024-04-18 to=2024-04-19 timezone="Europe/London"]

这会将条目添加到日历中,这很棒,但是:

  • 是否有任何方法可以将条目添加到日历中,但让这些条目也有一个专用的帖子/主题?(我看到您可以在新帖子中添加事件,但似乎没有办法将这些事件添加到日历中)。
  • 是否有任何方法可以在摘要电子邮件中展示特定日历的“即将发生的事件”?或者也许是左侧栏,并且每个条目都链接到该条目的专用帖子?

如果目前不可能,您是否有计划添加这些功能?

1 个赞

@vinothkannans 你能帮我审查一下这个pr吗?

1 个赞

是否有计划添加用户可以订阅的 URL Feed?我敢肯定,对于所有活动与他们已回复的活动相比,这会很棘手。

其次,如果能识别私人活动(或者也许每个群组都有不同的 URL Feed),那么增加一个额外的层将是惊人的。

6 个赞

但是,/upcoming-events URL 没有rss feed——那将是一个很好的补充!

3 个赞

关于 CalDAV 同步怎么样?

6 个赞

那对我来说也是一个更换的理由,确实如此。

这需要更多更新,因为它提到了在作曲家(composer)中插入事件以及添加事件详情,与图中所示不符。除非事件是附加项?

我已经安装了插件,日历标签在主题的第一篇帖子中有效。但在齿轮菜单中看不到任何事件或日历选项:

有人能解释一下我需要做什么才能在齿轮菜单中获得事件选项吗?

您需要启用插件 discourse post event enabled 的事件部分。

2 个赞

谢谢。我不知道怎么错过了这个设置。

3 个赞

如何让“创建事件”在类别主题中显示,并且回复是事件?

我看到“创建事件”可以用于创建新主题。但我想在主题中有一个日历,并且回复可以添加事件。使用“插入日期”功能可以部分实现,但不如“创建事件”功能那样有更多选项。

1 个赞

目前用户可以在其个人资料偏好设置中选择地区。

我想让他们在注册时设置地区,在注册表单中显示此字段。这是否可行?

3 个赞

删除的回复是否仍会显示在日历上?

我找不到将每周第一天更改为星期一的任何设置,如果缺少此功能,是否很容易实现?:thinking:

另一个问题是时间和日期输入已损坏,如果这是一个全天事件,则应在时间输入字段弄乱日期之前提供选择它的选项,并且在编辑时日期似乎会随机更改。

我还注意到,可以在时间和日期中输入 00:00(有时有效,有时无效),这会导致日历出错,然后会导致与草稿发生冲突,从而导致重复的 422 错误,直到页面回滚到早期修订版,然后重新编辑等。

3 个赞

[quote=“slower, post:10, topic:277113, full:true, username:joo”]
激活此自动化时,“最后编辑者”内容会自动添加到日历。我想咨询一下这是个错误还是我的设置有问题。有人能帮忙澄清一下吗?


[/quote]请参考这里

1 个赞

没有这样的设置,所以我才不使用它。我敢打赌,如果这是一个微不足道的技巧,团队会修复那个错误。

1 个赞