0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/plugins/discourse-calendar
Mark VanLandingham 21ec9c7b1e
FEATURE: Support category-scoped upcoming events calendars (#41561)
Previously, embedded upcoming events calendars always fetched all
visible events and created events without a category.

This change lets callers pass a category scope to
`UpcomingEventsCalendar`, uses it for event fetching and composer
defaults, and lets embedded callers opt out of the calendar's existing
route/date syncing via `@updateRouteOnDatesChange={{false}}`. The
default preserves the existing `/upcoming-events` behavior for backwards
compatibility.
2026-07-08 22:44:31 -05:00
..
app FIX: Topic Merging with Events (#41369) 2026-07-02 13:30:34 -05:00
assets FEATURE: Support category-scoped upcoming events calendars (#41561) 2026-07-08 22:44:31 -05:00
config I18N: Update translations (#41320) 2026-07-01 11:25:46 +02:00
db FEATURE: livestreams as a persistent event option (#41096) 2026-06-26 12:30:21 -04:00
jobs FIX: Enforce group visibility when filtering users by group (#41370) 2026-07-03 07:08:52 +02:00
lib FIX: re-validate permissions when running CSV export job (#41464) 2026-07-06 16:50:06 +05:30
spec FEATURE: Change default upcoming change promotion status to Beta (#41275) 2026-07-06 09:13:37 +10:00
test/javascripts FEATURE: Support category-scoped upcoming events calendars (#41561) 2026-07-08 22:44:31 -05:00
vendor/holidays DEV: Add 2026 Singapore holidays (#40318) 2026-05-27 06:59:10 +08:00
.prettierignore
package.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
plugin.rb FIX: re-validate permissions when running CSV export job (#41464) 2026-07-06 16:50:06 +05:30
README.md
tsconfig.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00

Discourse Calendar

Adds the ability to create a dynamic calendar in the first post of a topic.

Topic discussing the plugin itself can be found here: https://meta.discourse.org/t/discourse-calendar/97376

Customization

Events

  • discourse_post_event_event_will_start this DiscourseEvent will be triggered one hour before an event starts
  • discourse_post_event_event_started this DiscourseEvent will be triggered when an event starts
  • discourse_post_event_event_ended this DiscourseEvent will be triggered when an event ends

Custom Fields

Custom fields can be set in plugin settings. Once added a new form will appear on event UI. These custom fields are available when a plugin event is triggered.

Holidays

See an incorrect or missing holiday? Familiarize yourself with the holiday definition Syntax. Then make your updates in the vendor/holiday/definitions directory.

Generate updated holidays as follows.

cd vendor/holidays

# Generate holiday definitions
rake generate:definitions

Install the plugin and switch to the discourse root(not the plugin directory).

# Collect all holiday regions into assets/javascripts/lib/regions.js
bin/rails javascript:update_constants

Interactions with Other Plugins

You can use an element of this plugin with the Right Sidebar Blocks component. You'll want to ensure the desired route is enabled via the events calendar categories setting. In Right Sidebar Block's settings, the block name will be upcoming-events-list, and the params use this syntax, for example MMMM D, YYYY.