bgsound does work only with IE, doesn't it ?
Main Topics
Browse All TopicsI have the following file used in the chat box that is installed in my forum, and I would like to add a code to have a sound notification whenever a member joinchat.
Here is the chatbox.php code:
define('IN_PHPBB', true);
$phpbb_root_path = './../';
include_once($phpbb_root_p
include_once($phpbb_root_p
include_once($phpbb_root_p
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0
//
// Start session management
//
$userdata = session_pagestart($user_ip
init_userprefs($userdata);
//
// End session management
//
$nick = $userdata['username'];
?>
<html>
<head>
<title><?php echo $nick . " - " . $lang['ChatBox'] . " " . _CHATBOX_VERSION; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['ENCODING']; ?>">
<link rel="stylesheet" href="<?php echo $chatbox_config['styleshee
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,win
{
window.open(theURL,winName
}
//-->
</script>
</head>
<?php
// Check User Session
if (!$userdata['session_logge
{
echo "<body>Please login to chat</body></html>";
exit();
}
user_join($nick,"online");
write_msg(_CHATBOX_SYSTEM_
", "");
?>
<frameset rows="*" cols="30%,*" scrolling=NO noresize framespacing=0 frameborder=NO border="0" onUnload="MM_openBrWindow(
<frame src="<?php echo append_sid("messenger_list
<frameset rows="80%, 20%" cols="*" scrolling=NO noresize framespacing=0 frameborder=NO border="0">
<frame src="<?php echo append_sid("messenger_view
<frame src="<?php echo append_sid("messenger_send
</frameset>
</frameset>
<noframes>
<body>
Your browser does not support this feature!!!</body>
</noframes>
</html>
And here is the code in index_body.tpl
<!-- BEGIN switch_user_logged_in -->
[ <a href="javascript:void(0);"
<!-- END switch_user_logged_in -->
Please help me out. Thank you!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
It's a workaround for NS < 4.05 (see http://www.experts-exchang
> A already is in the chat session. And B logged in the chat. Only B can hear his own joinchat sound notification, but A, who is already in chat, cannot hear anything
You didn't mention you wanted it to be heard by /all/ users :-/
To do that we'd need to go and edit smartor's chatbox code meaning you could never upgrade when he releases a new version (unless you know enough php to update the script/s each time), and I'm not one to do it :P
Have you thought that some users might find it annoying if they can't mute the entry sound?
>It also gives a error " Line 55 Error: Expected ')' "
Get rid of the linebreaks that experts-exchange adds in to the page looks pretty.
There shouldn't be a line break between:
window.open
and:
('{S_JOIN_CHAT}'
Thanks, ASCII_Man! The main reason for adding the sound notification is that people wants to get notified when somebody join chat. But only let people who already joined chat to hear the sound.
Well, I am going to wait a little bit to see if anyone else can come up a solution. I seriously doubt that smartor will come up with an upgrade, he mentioned that he is going to abandon this script. So upgrading is not an issue. I need this feature badly. If this is not possible, then I have to add jirc, I guess.
Business Accounts
Answer for Membership
by: ASCII_ManPosted on 2003-06-25 at 23:38:33ID: 8803488
As per my tests on http://www.yfclan.com
---------- ---------- ---------- --------- ape" && navigator.javaEnabled() && /x-wav'] && /x-wav'].e nabledPlug in) { play(false ,'" + soundtoplay + "')"); c = soundtoplay; /forum/cha tEnter.wav " LOOP=FALSE AUTOSTART=FALSE HIDDEN=TRUE MASTERSOUND> onClick="playsound('http:/ /www.yfcla n.com/foru m/chatEnte r.wav');wi ndow.open( '{S_JOIN_C HAT}','{CH ATBOX_NAME }','scroll bars=no,wi dth=540,he ight=450') ;">{L_CLIC K_TO_JOIN_ CHAT}</a>
---------- ---------- ---------- ---------- -
um/chatEnt er.wav" with the path to your wave or midi file... I don't know if MP3 would work (I doubt it would).
Replace the chatbox popup in index_body.tpl with:
--START CUT-----------------------
<script language="Javascript" type="text/javascript">
function playsound(soundtoplay) {
if (navigator.appName=="Netsc
navigator.mimeTypes['audio
navigator.mimeTypes['audio
eval("document['nssound'].
}
else{
document.all['iesound'].sr
}
}
</script>
<!-- BEGIN switch_user_logged_in -->
<bgsound id="iesound" loop="1" src=null volume="80">
<EMBED NAME="nssound" SRC="http://www.yfclan.com
[ <a href="javascript:void(0);"
<!-- END switch_user_logged_in -->
--END CUT-----------------------
Replace "http://www.yfclan.com/for