Re: sound & smiley/online bug:
I found that by adding the following to the page holding my chat, the smiley/online hide/show seems to work fine in IE (so far):
<style type="text/css">
body, html {margin:0;padding:0;background:#ffffff;font-size:13px;
font-family:Verdana,Arial,Helvetica,san-serif}
</style>
(If someone could post the above in the correct place, that would be great, Thanks)
For adding sound to the new message event:
I created a swf file 1px x 1px clear, which carries a wav file, set to play onload, no loop.
(You'd have to change the value of the param movie and embed src tag to your swf file.)
Add this xajax function (innerHTML) if new chat message sent (not sure best place to put this, haven't studied your script too much.)
function soundalert()
{
$objResponse = new xajaxResponse();
$alert = "<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" id="ping" width="1" height="1">";
$alert .= "<param name="movie" value="/audio/ding.swf">";
$alert .= "<param name="loop" value="false">";
$alert .= "<param name="quality" value="high">";
$alert .= "<param name="wmode" value="transparent">";
$alert .= "<param name="bgcolor" value="#78A2BD">";
$alert .= "<embed name="ping" src="/audio/ding.swf" loop="false" quality="high" wmode="transparent" bgcolor="transparent" swLiveConnect="true" width="1" height="1" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>";
$objResponse->addAssign("sendalert","innerHTML",$alert);
return $objResponse->getXML();
}
Add this at the very top of chat.html.tpl.php to hold the object info:
<div id="sendalert"></div>
This worked for us, using thewall example in xajax. I'll certainly share my swf if someone could help in placing this code.