vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB Chat (https://vborg.vbsupport.ru/forumdisplay.php?f=107)
-   -   Sound when user posts or joins? (https://vborg.vbsupport.ru/showthread.php?t=78733)

UltimatePhysiqu 03-24-2005 11:09 PM

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?

sv1cec 03-28-2005 01:07 PM

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

HTML Code:

<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


All times are GMT. The time now is 11:15 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
  • Page Generation 0.00923 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete