You can't just add this to the chat_row template, because then it will play for every message that is printed on the screen.
I have managed to have a sound played when new members are added to the chat, but it's a complicated thing. I have to keep track of how many users are currently in chat and every time this number is raised, I play the sound. Nice to have, but the implications make it silly. Let alone, that if a member is going back and forth between the forums and the chat, then the members number keeps going up and down and the sound is played again and again.
Oh well, .....
|