Helpful Information
 
 
Category: vB Chat
Sound when user posts or joins?

Is this hack supposed to have audio when someone posts?

If not, how can i make it have audio?

Not that easy! Especially the audio when someone logs in the chat.

You see, the messages are stored in the database, from where they are retrieved to be displayed. You could add something like


<embed src='sounds/Sound12.wav' autostart='true' loop='0' hidden='true'></embed>


to your chat_row, template, but then the sound will be played everytime a message shows. And as we know, the screen refreshes every now and then, which means you would be hearing a sound continuously, for each and every message shown. So, what we need is a method to play that sound, only for the new messages and not for the older ones.

As for the sound when a user joins in, the only way I 've managed to do it, is by counting the users in the chat and if that number goes up, then play a sound. Still, it is not full-proof, since this info is taken from the session table. So if a user keeps going back and forth between the chat window and the main forums window, you end up hearing that sound again and again and again.

Not easy!

Rgds










privacy (GDPR)