Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Free Plugin - Display total number of posts in chat room on home page

+1 vote
asked Mar 12, 2017 in Plugins by bluegenel
This allows users to see when new posts have been added to the chat room without visiting the chat room.

Q2A version: 1.7.3

1 Answer

+2 votes
answered Mar 12, 2017 by Scott
selected Mar 12, 2017 by bluegenel
Best answer
Interesting idea. Did you have a specific use case in mind?

Because the chat room only shows a certain number of messages at once, and your plugin counts all messages including ones that are not visible.
commented Mar 12, 2017 by bluegenel
Thanks Scott. The main idea is to highlight the fact someone has posted in the chat room. The total would go up. As people typically stay and post on the main question pages. On my website the chat room has got users posting there every now and again but no-one knows when there are users on there (the chat room). This isn't perfect but I have seen at least one question on here that requested something along the same lines. Ideally I wanted to show on the home page how many users are actually viewing the chat room as it does on the actual page. I settled for this.
commented Mar 12, 2017 by Scott
You could get how many users are currently in the chat room by selecting from the qa_chat_users table. See the users_online function in the plugin.
commented Mar 12, 2017 by bluegenel
Thank you. I will take a look.