Events Plugin 📆


Thanks for that @Michaeld much appreciated

@angus on mobile should there be a button to add the event date. It’s just showing as a white square as per below.
If I click on the white square next to create new topic it brings up the date picker ok

(Angus McLeod) #24

Thanks for noting this. An omission from the update that added the events_event_label_icon setting. Fixed.


See: Events - Angus' Sandbox

(Anton) #25

Are you planning to make a “Calendar” view aka Google calendar, so that it’s more visual? There are JS plugins that generate calendars from JSON / JS ARRAY input.

What I mean is something like this:

So, talking about your two plugins, Locations and Events: Locations would open a map, Events would open a calendar.

(Angus McLeod) #26

Yes, I did consider this when building this plugin, but decided to go with the agenda format as it works well with the existing Discourse topic list. I will add this when I find some time over the next few weeks. Or, happy to accept a pr.


Full Calendar is great…you can modify the CSS to give it a Material look as well:

I am a bit new to discourse development - @angus is it possible to use the Discourse RESTful API to update posts/threads that are using your plugin-in (use-case: having my web application create and update event info in the OP)

(Angus McLeod) #28

It is now :slight_smile:

To add a date and time when creating a topic, pass a JSON event string with start and end set as datetimes in ISO 8601 format.

Example request:

curl -X POST \
  https://your_site/posts \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F api_key=your_key \
  -F api_username=your_username \
  -F 'title=Posting an event from the API :robot:' \
  -F 'raw=Boogey on down to funky town.' \
  -F category=Events \
  -F 'event={ "start": "2017-10-18T10:08:08Z", "end":  "2017-10-18T11:08:08Z" }'


Note: I’m not sure if it’s possible to pass custom parameters to methods available in the disocurse_api gem. @oblakeerickson?

(Tom Newsom) #29

Even better would be a .ics feed of all events (per category) so that Gcal (and other platforms) can subscribe to them.

(Thiago Machado Da Silva) #30

Thank you @angus for your plugins, they’re really nice!
I have this question (I’ll eventually try to learn how to code pluggins - so I can’t really PR):

Is there an option to remove the event from the map (with your other plugin), if that event is finished?


(Angus McLeod) #31

hm yes. The trick is to keep the locations plugin at arms length from the events plugin. Events is one use case for the locations plugin, but it is not the only one.

The first thought I had was that this could be handled by filtering closed topics. But you may want to close an upcoming event topics for other reasons.

So, I think the best way to handle this category of features is via allowing any plugin to add filter blocks to the locations map list query. And adding an appropriate filter in the Events plugin.


You can now filter out finished events from the map with the events_remove_past_from_map setting.

(Thiago Machado Da Silva) #32

whoa, that was fast and well worked out (for the long term)!
thank you!

(xiasummer) #33

I come to see another software, while a feature captured my attention. It is event subscribe or event regist function.

We pose an activity, and people can subscribe to see the exact activity Room or activity Time.

Don’t know whether this can come true?


(Angus McLeod) #34

Yes, adding an iCal feed is doable…maybe next week. We’ll see.

Keep in mind that iCal feeds are read only and not all commonly used calendar clients handle them well.

For example Google Calendar only syncs iCal feeds every 24 hours (or longer), and can be frustrating if used for time sensitive events.

(Anton) #35

Great approach!
Now, would it be possible for you to also add a filter to remove closed topics from the map?

(Angus McLeod) #36

Sure, this is purely a locations plugin setting though.


i think it would be also useful to have those filter options for the agenda list, so that you can filter out past events and/or closed topics from the agenda.

(Angus McLeod) #38

:+1: Added site and category-specific filters for closed topics in the agenda.

(Paul W) #39

recurring events ? (big ask I bet)

(Angus McLeod) #40

Yeah, probably a biggish task. Let’s try to think it through though. Here are some initial thoughts:


  1. Event topic is reused (‘evergreen’) and event times update after each instance passes; or

    • Problem: The content / discussion across multiple events may not neatly fit into the normal linear structure of a single topic, making it confusing to follow.
  2. New topic is created for each instance immediately after the recurring event is created.

    • Problem: This may clutter up your events category with topics for events far in the future.
  3. New topic is created for each instance some time(s) after the recurring event is created.


  • If each instance has its own topic:
    • How to you manage the ‘event series’ as a series? A new modal? Where would this modal go?

    • If you delete or close a topic which is an instance in a recurring event series what happens to future events in the series?


thanks for the agenda-filters!

on mobile devices the event dates are displayed after the topic title - not before the title like on desktops - and are inline with tags and category which can break the topic list:

on my sandbox i’m using the standard theme and have no other plugins installed besides your awesome event and location plugin. but on your sandbox the topic list on mobile devices is fine and the date will be displayed right before the title. any hints which could be wrong with my installation?


I can confirm I am getting the same issue