Calendário do Discourse - Como fazer?

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 curtidas

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 curtidas

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

Alguém pode compartilhar os passos para encontrar o Postid para declarar o calendário? Estou travado nesta etapa e apreciaria muito a ajuda.

Editar: Encontrei! Caso alguém esteja com dificuldades, você pode seguir os seguintes passos para encontrar o postId. Vamos usar este tópico como exemplo:

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

  1. Remova o slug do tópico para que fique assim: https://meta.discourse.org/t/165536/5
  2. Remova o número do post no final (/5) e substitua por /posts.json, então a URL ficará assim:
    https://meta.discourse.org/t/165536/posts.json
  3. Abra a URL e você encontrará o postId necessário na primeira linha:
  4. Cole a URL nas configurações do plugin de calendário, então em nosso exemplo ficaria algo assim:
  5. Seu calendário na categoria agora deve exibir todas as entradas [date] desse tópico.
5 curtidas

Alguém pode responder o que são essas configurações? Não consegui encontrar nenhuma referência a elas, exceto neste post e não há explicação. :sadpanda:

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

esconderia os fins de semana

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

mostraria a visualização de lista como padrão (outras opções são month ou basicWeek)

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

permitiria ao usuário escolher o fuso horário no canto superior direito do calendário

4 curtidas

Útil, mas isso significa que essas informações para a configuração não são aplicáveis, ou apenas definem a configuração padrão para o calendário na postagem especificada?

:thinking: Desculpe, não tenho certeza se entendi a pergunta :sweat_smile:
Eu diria que as configurações são definidas por item, ou seja, para um calendário (que está na postagem especificada)

Peço desculpas pela confusão.
Nas configurações do calendário do Discourse, você vê a imagem que postei anteriormente.
Ele requer o categoryId e o postID, em seguida, declara as outras configurações válidas, mas não o que elas fazem nessa instância.

Estou imaginando se este é um caso de texto de ajuda ruim ou má compreensão de como essas configurações funcionam quando relacionadas à configuração “categorias de calendário”.

Pelos meus testes, não vejo nada acontecendo, mas posso estar errado. :smiley:

1 curtida

Ah, sem problemas, meu inglês é como queijo suíço, a maioria buracos, daí a dúvida

Acho que deveria funcionar sem as aspas duplas, por exemplo
categoryId=31;postId=4867;tzPicker=true;weekends=false

2 curtidas

Descobri que você mudou
meta.discourse.org/t/discourse-calendar-how-to/165536/6
para
meta.discourse.org/t/discourse-calendar-how-to/165536.json

1 curtida

Concordo. Acho que às vezes as instruções são escritas da perspectiva de um desenvolvedor e precisam de mais informações passo a passo e imagens para um leigo. O calendário poderia talvez usar um Theme component para tornar a configuração mais clara dentro de um tópico ou algo assim.

2 curtidas

Não acabei usando o calendário do Tópico de Sobre, porque a maneira fácil de criar um evento é sempre o 1º post de um tópico e você o usaria para o calendário de qualquer maneira, não para eventos.

Consegui editar o 1º post dos tópicos existentes em subcategorias, então a cor das subcategorias apareceu no calendário exibido da categoria pai.

Além disso, você mencionou o componente de tema, o que sugere ajustabilidade; o calendário sobre o qual estou falando, o implementado pela configuração de administrador Calendário de Eventos por Categorias, eu gostaria de poder ajustar:

  • O tamanho do calendário no site desktop, o site móvel parece bom
  • O dia em que a semana começa

Não estou listando muitas coisas aqui porque não quero desanimar as pessoas, imagino que houve problemas de desenvolvimento que significaram que precisavam haver maneiras diferentes para um superusuário implementar o discourse-calendar.

1 curtida

Pelo que observei, não vi um TC companheiro de Calendário. Talvez você possa criar um Theme component personalizado usando o elemento de inspeção no seu navegador para identificar e ajustar o tamanho do calendário no Desktop. Apenas certifique-se de colocá-lo no cabeçalho CSS do Desktop.

A equipe lançou recentemente um plugin companheiro para Transmissões ao Vivo. Isso pode ser de interesse. Ele usava Chat e Calendário.

1 curtida

Bom, eu gosto desse plugin, não é algo que eu faça com frequência :sweat_smile: eu sou do tipo de fórum privado. Talvez um dia eu tenha dinheiro suficiente para fazer uma transmissão ao vivo de revisão de física

Tanto pelo calendário da Categoria por Pai, seria bom se Uncategorized (potencialmente?) exibisse um calendário na página inicial (ou na categoria General), e unisse os eventos de todas as outras categorias.

1 curtida