Discourse Calendar - 如何操作?

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 个赞

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 个赞

@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:

有人能分享一下声明日历时如何找到 Postid 的步骤吗?我卡在了这一步,非常感谢您的帮助。

编辑:找到了!如果有人还在挣扎,可以按照以下步骤找到 postId。以这个主题为例:

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

  1. 删除主题的 slug,使其看起来像这样:https://meta.discourse.org/t/165536/5
  2. 删除末尾的帖子编号(/5)并替换为 /posts.json,因此 URL 看起来像这样;
    https://meta.discourse.org/t/165536/posts.json
  3. 打开 URL,您将在第一行找到所需的 postId:
  4. 将 URL 粘贴到日历插件设置中,因此在我们的示例中,它看起来应该像这样:
  5. 您的类别中的日历现在应该会显示该主题中的所有 [date] 条目。
5 个赞

有人能解释一下这些设置是什么吗?我除了在这篇帖子中找到它们之外,没有找到任何参考,而且也没有解释。:sadpanda:

1 个赞
[calendar weekends="false"]
[/calendar]

将隐藏周末。

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

将默认显示列表视图(其他选项为 monthbasicWeek)。

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

将允许用户在日历的右上角选择时区。

4 个赞

有帮助,但这是否意味着此设置信息不适用,还是仅为帖子中指定的日历设置默认值?

:thinking: 对不起,我不确定我是否理解这个问题 :sweat_smile:
我想说的是,设置是按项目设置的,也就是说,是针对一个日历(在指定的帖子中)

很抱歉造成混淆。
在 Discourse 日历的设置中,您会看到我之前发布的图片。
它需要 categoryId 和 postID,然后列出其他有效的设置,但没有说明它们在此实例中的作用。

我想知道这是帮助文本不佳还是我对这些设置与“日历类别”设置的关系的理解不佳。

根据我的尝试,我没有看到任何效果,但我也许是错的。 :smiley:

1 个赞

哦,没关系,我的英语就像瑞士奶酪,大部分都是洞,所以才会疑惑

我认为它应该在没有双引号的情况下工作,例如
categoryId=31;postId=4867;tzPicker=true;weekends=false

2 个赞

我发现你把
meta.discourse.org/t/discourse-calendar-how-to/165536/6
改成了
meta.discourse.org/t/discourse-calendar-how-to/165536.json

1 个赞

同意。我认为有时说明是从开发者的角度编写的,需要为普通用户提供更多分步信息和图片。日历也许可以使用一个 Theme component 来让主题中的设置更清晰,或者其他类似的功能。

2 个赞

我最终没有使用“关于主题”日历,因为创建事件的简单方法始终是主题的第一个帖子,而您无论如何都会使用它来制作日历,而不是事件。

我能够编辑子类别现有主题的第一个帖子,然后子类别的颜色显示在父类别显示的日历中。

另外,您提到了主题组件,这暗示了可调整性;我所说的日历,也就是通过 Events Calendar Categories 管理设置实现的那个,我想能够调整:

  • 桌面网站上日历的大小,移动网站看起来还可以
  • 一周的开始日期

我在这里列出的东西不多,因为我不想吓跑别人,我猜想存在开发问题,导致超级用户需要有不同的方法来实现 discourse-calendar。

1 个赞

据我观察,我还没有看到日历伴侣 TC。您或许可以使用浏览器的检查元素功能创建一个自定义 Theme component,以识别和调整桌面版的日历大小。请确保将其放在桌面 CSS 标头中。

该团队最近发布了一个直播伴侣插件。这或许会引起您的兴趣。它使用了聊天和日历。

1 个赞

很好,我喜欢那个插件,虽然我不会经常用到😅 我是个喜欢私密论坛的人。也许有一天我会有足够的钱来直播物理复习

关于“按父类别日历”的说法,如果#uncategorized(可能?)能在主页(或#general类别)上显示日历,并将所有其他类别的活动合并在一起,那就太好了。

1 个赞