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

5 Likes

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

https://github.com/angusmcleod/discourse-events/commit/9d7a7618c626a70f6dd43fbe4656f0f03a9841bc

Example:

See: https://discourse.angusmcleod.com.au/c/events/l/agenda

7 Likes

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.

10 Likes

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.

7 Likes

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)

7 Likes

It is now :slight_smile:

https://github.com/angusmcleod/discourse-events/commit/33ba86f66e22afaab30dd64eb0e51e45f17860c9

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" }'

Result:
https://discourse.angusmcleod.com.au/t/posting-an-event-from-the-api-robot/79/1

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

12 Likes

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

9 Likes

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?

Cheers!

4 Likes

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.

Added.

https://github.com/angusmcleod/discourse-locations/commit/f3d731e540b1a94bf98bbf189eaf2ac121fd98f4

https://github.com/angusmcleod/discourse-events/commit/a69d0b65060c6eef03f3c1715ca2a8ccbc8fc4bb

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

10 Likes

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

5 Likes

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?

Yours.

5 Likes

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.

7 Likes

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

4 Likes

Sure, this is purely a locations plugin setting though.

https://meta.discourse.org/t/locations-plugin/69742/88?u=angus

5 Likes

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.

5 Likes

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

https://github.com/angusmcleod/discourse-events/commit/4500147f297d6439185ef38010a530a594e5f62d

6 Likes

recurring events ? (big ask I bet)

3 Likes

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

Topics

  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.

Management

  • 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?

3 Likes

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?

3 Likes

I can confirm I am getting the same issue

4 Likes