![]() |
New member in Chat sound problem
Zero,
I did some mods to play a sound, when a new member enters the chat room. Basically, the mod is adding a parameter, $playsound in vBChat.php, which is then checked with an if conditional in chat_row_bot. Here is the code I used in vBChat.php: I first changed the bot message code, to accept a new parameter: PHP Code:
PHP Code:
PHP Code:
Here is my chat_row_bot template: HTML Code:
<tr> a) the sound is not played consistently b) when it is played, I hear it as if it is played twice Any help on that issue? The same code works OK for me, in other areas of the forum, where a sound is played. As you understand, this is a feature suggestion for next release, LoL UPDATE As a matter of fact, it looks as if it works! I have probably done the last edits in the php file, while the twins were around, and never got the chance to upload it. As for the double sound, it comes from the two browsers I had open for testing (Firefox & IE). Crazy things happen. IF others would like that addition, and if you think the code is OK, you may of course include it in your next release. Rgds and tnx |
Quote:
Glad to see you got it working though :) - Zero Tolerance |
1 Attachment(s)
Quote:
One remark, if you would allow me. On a relatively busy chat room, a sound and a flashing box in the task bar, whenever someone answers, will be too intruding. I guess that the sound and flash should occur, whenever some new person enters the chat. My idea of course, you are the master coder here, so I am sure you'll make a wise decision. Sometimes, we have to trust the youngsters!! LoL |
Quote:
- Play Sound/Highlight Notification Upon User Posting New Message - Play Sound/Highlight Notification Upon User Joining - Don't play Sounds or Highlights I think that would resolve it, everyone has the choice then :) - Zero Tolerance |
Quote:
UPDATE ON SOUND Well, I guess I am not that lucky. The sound is inconsistent. Some times we hear it, some times we do not. And when we hear it, the focus of the chat window is lost, and you have to reload it to continue typing in the Post Message box. I tried a different approach, which required me to add a column in the vbchat_datastore table. The code is much simpler, and it appears as if it is working much better now. Unfortunatelly, no users are in the chat and I can rely only on my local tests. I use the number of users in the chat, as a test for playing or not playing the sound. Here is the code, if you care: PHP Code:
Rgds |
Hi sv1cec, I tried your embed sound in the chat_row template:
HTML Code:
<embed src='/forum/sounds/SOUND12.WAV' autostart='true' loop='0' hidden='true'></embed> John |
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, ..... |
Quote:
|
I have no idea, it all depends on Zero's availability.
|
All times are GMT. The time now is 03:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|