News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Having 2 shoutboxs(or chat) in one forum

Started by Blackphoenixz, April 28, 2016, 12:31:31 PM

Previous topic - Next topic

Blackphoenixz

Hi
I wanna add a second shoutbox or chat to my community....one of them is for public & i want add another one for admins & clanmembers....(im using smfshoutbox now)
Is there other plugin which works fine beside current shoutbox?
(Once i tried & my forum was bugged)


Kindred

bad idea...   you are almost definitely going to have conflicts between the two
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

br360

Chatboxes are resource heavy as it is, so having two at the same time would just probably cause issues like Kindred said. Why not just have a private board open to only admins and clanmembers instead?

qc

Well, all SMF chatboxes that I know of use polling (sending out regular HTTP requests) to check for new answers on your server. An alternative approach would be to use websockets, but they require you to have more control over your server (listen on a non-HTTP port, running services) which most webhosting packages don't include.

Therefore I assume you have to make do with polling. Using two different shoutboxes which both run their own polling schedule is a bad idea due to doubling the number of HTTP requests. The best solution is to stitch together your own chatbox that retrieves updates from the server for two different channels within the same request.

On the client-side, you can then easily sort out which messages belong to which chat by looking e.g. at a channel identifier. Of course, non-admins & non-clanmembers must only receive messages for the channel they have access to.

This solution requires you to have some practical programming knowledge though.
Playing quizduell? Having quizduell questions? Our german quizduell forum quizcommunity.de is looking for quiz freaks to come and play quizduell with us :)

Blackphoenixz

Quote from: br360 on April 28, 2016, 05:46:39 PM
Chatboxes are resource heavy as it is, so having two at the same time would just probably cause issues like Kindred said. Why not just have a private board open to only admins and clanmembers instead?
Well....we already have a category for admins...but for  normal chats(see who is online or who can go to servers or other things we need a shoutbox)if make a topic for that....it would be hard & like spamming.thats why i need a extra shoutbox for special groups...

@qc  can you explain more that how i can make 2 different channels on same shoutbox?

Advertisement: