discourse/plugins/discourse-calendar
Joffrey JAFFEUX 1f97cf4229
FIX: ensures event builder correctly sets the description (#33700)
For now this commit is going to correctly ensure that when creating a
new event through the form builder we set the description as the body of
the event and not a property. This change allows us to have line breaks
in the description and is now correctly tested.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-07-21 12:49:46 +10:00
..
app FIX: Don’t create empty event dates in calendar 2025-07-17 16:53:14 +02:00
assets FIX: ensures event builder correctly sets the description (#33700) 2025-07-21 12:49:46 +10:00
config
db/migrate
jobs
lib
public/javascripts
spec FIX: ensures event builder correctly sets the description (#33700) 2025-07-21 12:49:46 +10:00
test/javascripts
vendor/holidays
.prettierignore
plugin.rb FIX: Serialize time objects properly in calendar plugin 2025-07-16 16:14:51 +02:00
README.md

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.