Hey there, is there any way to not automatically create a topic for every blog post we publish on our website yet still keep the discussion section?
I feel it makes more sense to generate a topic automatically as long as there’s a comment on a certain blog post. Currently the logic is that the topic should exist before people can comment.
To be clear that we are not using any comment system other than Discourse. So what we want is to create a topic only when there is actually a comment on a post instead of a bunch of empty topics on Discourse like below:
Not really… How are users supposed to reply to a topic if it’s not already posted somewhere? Every topic has to start with 0 reply. I guess I’m missing something here
I think that what you want is have all topics that are pulled to Discourse from your website be marked as unlisted. When a topic receives a comment, it would automatically be marked as listed. Unlisted topics do not appear in the topic list, so this would prevent the topic list on your site from being full of topics with no responses.
This type of configuration makes sense for sites where people are accessing Discourse topics by clicking a “Start Discussion” link that is displayed below a blog post. Discourse does not have a setting for this, but I think it would be a reasonable feature request. The DIscourse WordPress plugin has this functionality, but it uses the Discourse API for unlisting and listing the topics.
@simon That’s exactly what we want! Thanks for your reply. The problem is that our site is not built with WordPress. But we can take a look at the Discourse API.
Speaking of feature requests, where can I raise this request for Discourse?
@Canapin So we want the blog post to receive a comment first BEFORE it is listed as a Discourse topic. The post does exist on our site in the first place, doesn’t it?
That’s a good idea. The other option is to not create the topics until the user clicks through but I think your suggestion might be easier. Perhaps @eviltrout could consider this as a possible task for this release, next week?
La forma más sencilla de averiguarlo sería probar a ocultar y luego hacer visible un tema a través de la interfaz de usuario de Discourse, siguiendo los pasos descritos en esta guía: Cómo ingeniería inversa de la API de Discourse.
Para automatizar el proceso mediante la API, necesitarías configurar un webhook para escuchar eventos de publicaciones. Cuando recibas un webhook que te indique que se ha creado la primera publicación en tu categoría de incrustación, deberías enviar una solicitud a la API para ocultar el tema. Cuando recibas un webhook que te indique que se ha creado la segunda publicación en un tema, deberías enviar una solicitud a la API para hacer visible el tema.
Como se mencionó anteriormente, un enfoque mejor podría ser que el tema se oculte automáticamente la primera vez que un usuario haga clic en él desde un sitio de blog. De esta manera, el primer usuario que deje un comentario no vería el tema marcado como oculto. Esto sería un poco más complejo de configurar, pero podría hacerse a través de la API escuchando eventos de clic en los enlaces a tus temas de Discourse.
Sí, creo que deberíamos hacer esto @eviltrout. ¿Quizás la versión más sencilla (por defecto sin listar, pero que se hace visible una vez que llega una respuesta)?
Idealmente, este tema se actualizará cuando la función esté disponible. En ese caso, recibirás una notificación al respecto si configuras tu nivel de notificaciones para este tema en “Observando”.