Topic Visitors Counter Plugin

AI-generated summary

Topic Visitors Counter Plugin

saqiqulhaq created a simple plugin to display the number of visitors viewing a topic, calculating visitors based on session ID. The plugin tracks users entering or leaving a topic, but can’t update data if a user closes their browser tab. saqiqulhaq plans to add functionality to set an expire time for tracked sessions and use a heartbeat system.

The plugin was created as a way for saqiqulhaq to familiarize themselves with Discourse before proposing a Google Summer of Code (GSOC) idea, “See who’s writing”. erlend_sh reviewed saqiqulhaq’s GSOC proposal, but saqiqulhaq didn’t receive the review due to it being posted in the admin-only comments section.

The plugin’s functionality was discussed, with Roxelle expressing excitement about the potential features. Bathinda asked if the plugin could serve the purpose of showing the number of visitors, logged in and anonymous, viewing their forum at the moment, and if there could be an option to show or hide this number to users.

Hi
I’ve made a simple plugin to display how many visitors are visiting a topic.

https://github.com/saiqulhaq/tvc

This plugin calculates visitors based on session id, so it will not increment the total viewer data if there is multiple browser tabs opening same topic.
It will track user when entering or leaving to another topic, but it can’t update the data if user close the browser tab. However it’s not a big issue, I already have plan for that, I can set expire time for each tracked session and use heartbeat system to check that user still viewing the topic.

I will start to add that functionality and some test after GSOC student apply deadline, so the background of why I create this plugin is because I need more familiarize my self with Discourse.
Few days ago I sent a GSOC Proposal for ‘Webhook for Discourse events’, but I still have no feedback from mentors, and I can’t find who is the mentor, so please let me know who is the mentor so I can contact with him.
Based on this groundwork, I want to propose ‘See who’s writing’ GSOC idea.

I know it’s not useful plugin, but I will very appreciate every feedbacks for this plugin.

6 « J'aime »

I don’t know why you got no feedback, @erlend_sh is in charge of that.

2 « J'aime »

oh okay, I am still waiting patiently
I’m just worrying because the deadline is less than 3 days away

2 « J'aime »

Désolé pour le retard dans les relectures, Saiqul. J’ai tout de même laissé un commentaire dans la section de relecture hier ; l’application GSoC n’envoie-t-elle pas de notification de ce type ?

Travailler sur un plugin comme celui-ci pour montrer tes compétences est une très bonne approche ! :thumbsup: Tu devrais le soumettre au répertoire Customization > Plugin une fois qu’il sera fonctionnel.

6 « J'aime »

It’s OK, I understand you must have been busy. I want to say thanks to you of your time for reviewing my proposal.
I just checked my email, my proposal file on google docs, and GSoC site, but I can’t find your review. Could you tell me more where you submitted your comment please?

OK absolutely will do.

1 « J'aime »

D’oh! I posted in the admin-only comments section. Sent you a message on Meta instead.

1 « J'aime »

Oh man! Good!
Maybe, finally, we will enjoy a lot of features that have many forums!

You’re going to expand this features?

Oui, bien sûr, je vais finaliser les fonctionnalités de base bientôt et les soumettre dans le répertoire Customization > Plugin, afin de pouvoir recueillir tes remarques/retours si tu n’as pas de problème.

6 « J'aime »

Hi @sam

I have read your message_bus library to complete the basic functionality of this plugin
I’ve tried some ways, but the way that works is by add some method on MessageBus middleware
please take a look at this gist.
how do you think? Would it be a problem for MessageBus performance or something awful?

Je veux savoir combien de visiteurs, connectés et anonymes, consultent actuellement mon forum.
Ce plugin peut-il répondre à ce besoin ?
Ou connaissez-vous une autre méthode ?

Ce serait très bien s’il existait une option pour afficher (ou masquer) ce nombre aux utilisateurs.