Discourse Calendar - How to?

Hello All,
First time Discourse installer / maintainer. Long time user.
I"m feeling a bit lost with some of the plug ins and apparent lack of documentation. My focus at the moment is the Discourse Calendar plugin.
I have found 2 threads.
The actual plug in - Discourse Calendar
A request for help How to use the calendar plugin?

Neither really explain how to use the plugin other than creating the main calendar in a first post, and how to add events to that main calendar in replies to the same post.
The screen shots show multiple colors which makes me think there may be a way for a calendar to draw from multiple categories?

In the plugin settings, there is also calendar categories setting, but Iā€™m unclear on how to use this. I was able to get a calendar to appear at the top of a Category display page, but it is empty.
Iā€™m currently using categoryId=7;postId=19 where catagory 7 is the catagory I want the calendar to appear at the top of. Then I wasnā€™t clear on postID. I tried a post that as an event in it. A post that has a calendar as the first post and dates as replies. The calendar appears at the top of the Catagory (in a misshaped non scrollable box), but no events appear on it, regardless of what postID I use.

The helper text also offers Other valid settings: tzPicker, weekends and defaultView.
but no explanation of how or what those do or how to use them.

So in short, Iā€™m looking for any pointers, or links to something that explains the plugin with a bit more detail.

Ultimately what Iā€™m hoping for is some way to have a calendar that is able to read into multiple posts in a Category. What Iā€™m doing now is instructing users to create 2 posts. Create a new topic and add an Event. Include the description of the event etcā€¦ This is the thread for discussion about the event.
Then I tell them to copy the link to that topic, and go to the pinned ā€œMaster Event Calendarā€ topic and reply to that inserting a date, and then pasting the link to the Event. That way the Master Event Calendar topic calendar has all of the events, but there are separate topics to allow for discussion about the events.

It feels like there has to be a better way, but I donā€™t know what it is.

Thanks very much for any insight.

6 Likes

Hi!
Postid is to be found in the json and is the Id of the post where the calendar is declared (not the topic Id)

About the color coded events, I believe those come (for now :sweat_smile: ) from the plugin events (but I might have missed a commit!)

And maybe this can answer some of your questions:

Thanks very much. PostID vs TopicID is where I was going wrong. That has cleared that up. I still wish there as a ā€œman pageā€ or something equivalent for all possible variables and inputs on the plugin, but Iā€™ll keep playing with it.

Also thanks for the link to the Event Plugin. As the post your link lead to, it is confusing how Calendar vs Date vs event are linked and not linked considering that the Event Plugin is part the Calendar Plug.

4 Likes

@ben_t , your use case describes exactly the type of functionality I was hoping forā€¦ various groups could have discussion threads about their events, but through the creation of their event in their topics they would populate the Master Events calendar which contains all events from all groups. Then, readers of the main event calendar could click any item in the calendar and be take to the thread for the event.

Donā€™t get me wrong, as it stands, I can appreciate the idea of an event in a thread that doesnā€™t make it to the main events calendar (say, the small group holding planning meetings leading up to the big event on the main calendar),

However, I do think our use case would be a great feature to have as I can see a number of implementations (school sports calendars, community bulletin boardsā€¦ )

As an aside. I found came across an alternative way to create the topic where you have the calendar in the first post and then reply to the calendar with dates that get added to the top post ā€¦ without going into settings and counting thread numbersā€¦
Somewhere in the first post, put

[calendar]
[/calendar]

I came across that on the [github page|https://meta.discourse.org/t/discourse-calendar/97376]
Think it mightā€™ve been added after you posted this though.

ā€¦ Iā€™m off to figure out this business with colors! :smiley:

Can anyone share the steps where to find the Postid to declare the calendar? I am stuck at this step and would really appreciate the help.

Edit: found it! In case anyone is struggling, you can take the following steps to find the postId. Letā€™s take this topic as example:

https://meta.discourse.org/t/discourse-calendar-how-to/165536/5

  1. Remove the slug of the topic so it looks like this: https://meta.discourse.org/t/165536/5
  2. Remove the post number at the end (/5) and replace it with /posts.json, so the URL looks like this;
    https://meta.discourse.org/t/165536/posts.json
  3. Open the URL and you will find the required postId in the first line:
  4. Paste the URL into the calendar plugin settings, so in our example it would look something like this:
  5. Your calendar in the category should now display all [date] entries from that topic.
5 Likes

Can anyone answer what these settings are? I havenā€™t been able to find any reference to them except in this post and thereā€™s no explanation. :sadpanda:

1 Like
[calendar weekends="false"]
[/calendar]

would hide the weekends

[calendar defaultView="listNextYear"]
[/calendar]

would show the list view as default (other options are month or basicWeek)

[calendar  tzPicker="true"]
[/calendar]

would allow the user to choose the timezone in the upper right corner of the calendar

4 Likes

Helpful, but does that mean this info for the setting is not applicable, or does it just set the default setting for the calendar in the post specified?

:thinking: Iā€™m sorry, iā€™m not sure I understand the question :sweat_smile:
Iā€™d say the settings are set per item, that is for one calendar (which is in the specified post)

My apologies for the confusion.
In the settings for Discourse calendar, you see the image i previously posted.
It requires the categoryId and postID then states the other valid settings, but not what they do in that instance.

Iā€™m wondering if this is a case of bad help text or bad understanding of how these settings work when related to the ā€œcalendar categoriesā€ setting.

From my trials, I donā€™t see anything happening, but I could be wrong. :smiley:

1 Like

Oh no worries, my english is like swiss cheese, mostly holes, hence the wondering

I think it should work without the double quotes, for instance
categoryId=31;postId=4867;tzPicker=true;weekends=false

2 Likes

I found that youā€™d change

meta.discourse.org/t/discourse-calendar-how-to/165536/6

into

meta.discourse.org/t/discourse-calendar-how-to/165536.json

1 Like

Agreed. I think sometimes the instructions are written from a developerā€™s perspective and need more step-by-step information and pictures for a layman. The calendar could maybe use a Theme component to make the setup clearer within a topic or something.

2 Likes

I ended up not using the About-Topic calendar, because the easy way to create an event is always 1st post of a topic and youā€™d be using that for calendar anyway not events.

I was able to edit 1st post of existing topics in sub-categories, then the sub-categoriesā€™ colour showed in the parent categoryā€™s displayed calendar.

Also, you mentioned theme component, which suggests adjustability; the calendar iā€™m talking about, the one implemented by the Events Calendar Categories admin setting, i would like to be able to adjust:

  • The size of calendar on desktop site, the mobile site looks ok
  • The day the week starts

Iā€™m not listing too many things here because i donā€™t want to put people off, i imagine there were development problems that meant there needed to be different ways for a superuser to implement discourse-calendar

1 Like

Well as far as I have observed havenā€™t seen a Calender companion TC. You might though be able to create a custom Theme component using inspect element in your browser to identify and adjust the calender size in Desktop. Just be sure to put it in the Desktop CSS header

The Team recently released a companion plugin for Live Streams. That maybe if interest. It used Chat & Calender.

1 Like

Good i like that plugin, not something i do often enoughšŸ˜… iā€™m a private forum kindda guy. Maybe one day iā€™ll have enough money to livestream physics revision

So much for the Per Parent Category calendar, it would be nice if Uncategorized (potentially?) were to display a calendar on the homepage (or General category), and merge together the events from all the other categories

1 Like