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?
Et comment puis-je définir le statut « Non répertorié » via l’API ? Je ne trouve pas les API correspondantes dans mon fichier comment-embedding.js. Merci.
La méthode la plus simple pour comprendre cela consiste à désactiver puis réactiver le répertoriage d’un sujet via l’interface utilisateur de Discourse, tout en suivant les étapes décrites dans ce guide : Comment analyser l’API Discourse à l’envers.
Pour automatiser le processus via l’API, vous devrez configurer un webhook afin d’écouter les événements liés aux publications. Lorsque vous recevrez un webhook indiquant que le premier message de votre catégorie d’intégration a été créé, vous enverrez alors une requête API pour rendre le sujet non répertorié. Lorsque vous recevrez un webhook indiquant que le deuxième message d’un sujet a été créé, vous enverrez alors une requête API pour le répertorier à nouveau.
Comme mentionné ci-dessus, une approche plus judicieuse consisterait à rendre automatiquement le sujet non répertorié lors du premier clic d’un utilisateur sur le lien du sujet depuis un site de blog. Ainsi, le premier utilisateur à laisser un commentaire ne verrait pas le sujet marqué comme « Non répertorié ». Cela serait un peu plus complexe à mettre en place, mais cela pourrait être réalisé via l’API en écoutant les événements de clic sur les liens pointant vers vos sujets Discourse.
Oui, je pense qu’on devrait le faire @eviltrout. Peut-être la version la plus simple (non répertoriée par défaut, répertoriée dès qu’une réponse arrive) ?
Idéalement, ce sujet sera mis à jour lorsque la fonctionnalité sera disponible. Dans ce cas, vous recevrez une notification à ce sujet si vous réglez votre niveau de notification pour ce sujet sur « En veille ».
Je viens de voir cette fonctionnalité en direct ! Un grand merci à @codinghorror et @eviltrout. Merci d’être si réactifs aux demandes des utilisateurs.