Here's an Add-On for an Audio alert in response to the presence of a message in someone's PM's INBox,
Depending on your setup: In the default.asp or privatemess.asp page look for:
if pmcount >= 1 then %> <IMG SRC="icon_pm_new.gif"> Then add : <EMBED SRC="http://xxx.com/snitz_forum/message.wav" WIDTH=1 HEIGHT=1 HIDDEN="true" AUTOSTART="true" LOOP="false" volume="100"></EMBED>
Will work with both IE and Netscape, use a sound file smaller than about 15k so it will not be interrupted while playing. Here's an exemple of : "Incoming Message" (female) wav file(12K). Click and let it play on your default wave or mp3 software. Then "save target as"
Here's an Add-On for an Audio alert in response to the presence of a message in someone's INBox,
In the default.asp page look for:
if pmcount >= 1 then %> <IMG SRC="icon_pm_new.gif"> Then add : <font color=red><EMBED SRC="http://xxx.com/snitz_forum/message.wav" WIDTH=1 HEIGHT=1 HIDDEN="true" AUTOSTART="true" LOOP="false" volume="100"></EMBED> </font id=red>
Will work with both IE and Netscape, use a sound file smaller than about 15k so it will not be interrupted while playing. Here's an exemple of : "Incoming Message" (female) wav file(12K). Click and let it play on your default wave or mp3 software. Then "save target as"
I just want to make sure that people realise that the <bgsound> only works with IE, not Netscape. The <embed> tag so far works with both (it's a Netscape's native code but works on my IE 5.5). As far as vbscript goes, I'm really new to it! This topic was mainly a simple way to give back to the generosity of the "Snitz" people.
I just want to make sure that people realise that the <bgsound> only works with IE, not Netscape. The <embed> tag so far works with both (it's a Netscape's native code but works on my IE 5.5). As far as vbscript goes, I'm really new to it! This topic was mainly a simple way to give back to the generosity of the "Snitz" people.
I tried the embed tag and it did not work on my I.E 5.5 so I have implemented a little code that will determine which browser the user is currently using and added:
<% if ns = "true" then %> <embed tag> <% else %> <bgsound tag> <% end if %>
If you want to add this to your page let me know I will get all of the code and post it here.
You can place both tags in your header. Netscape will just ignore the <bgsound> tag. I think IE is starting to support the <embed> tag, it got it working with it...sometimes, but older versions of IE don't use it. So placing both <embed> and <bgsound> tag in your headers will ensure that both older and newer versions of Netscape and IE will play the sound file. Don't necessarily need an if else statement. But if you prefer it that way...no harm done. :-)
<center><font color=green>*----*----*----*----*----*----*----*----* <font size=2>"To Get To Heaven, It's Who You Know That Counts."</font id=size2> *----*----*----*----*----*----*----*----*</font id=green></center>
I hacked my version of Snitz to add the ability to choose the PM Alert sound file. What I did was create two new fields in the MEMBERS table called PMALERT and PMALERTSTATE. PMALERT stores the path to the sound file. PMALERTSTATE is a 0/1 value to state whether to play the alert. The PMALERT is updated via the PM preferences page. The PMALERTSTATE is updated via the privatesendinfo page (i believe that's it). The idea is that the PMALERTSTATE is set to 1 for the recipient when privatesendinfo is executed. The PMALERTSTATE is set to 0 after the .wav is played, so the user only has to hear it one time for each new message. So far, my hack has worked well for me. I don't have the courage to post my ugly code here. Maybe I will install a clean version of snitz on my site for MOD development.
I must say one of the best features of snitz is that you can modify it sooooooo easily. I'm no coder, but even I've been able to add some cool stuff. :)
quote: You can place both tags in your header. Netscape will just ignore the <bgsound> tag. I think IE is starting to support the <embed> tag, it got it working with it...sometimes, but older versions of IE don't use it.
Hum, I did try, this, and I Had IE plays the sound twice... And... <EMBED> was working in IE4 and if I remember, even 3.01
Well i think this is a great place to give everyone a little help in generating wav files.
at&t has a site that will allow you to type in text, and it will generate the wav file, or a couple other formats. i dont think this site is something that people outside at&t are suposed to use, so please dont tell everyone about it, but this will help people wanting to change the PM wav file with a nice sounding voice
Here's a some "mail" sounds which I know the people encourage the spreading of their use (just save them first, don't link to their site).
The group's name is Metropolis, and they won the 1998 (or 99, can't remember which) A Cappella Harmony Sweepstakes. They are a barbershop quartet and consistently place in the top 20 in the world (I'm a barbershopper in case you haven't figured it out yet).
quote: I hacked my version of Snitz to add the ability to choose the PM Alert sound file. What I did was create two new fields in the MEMBERS table called PMALERT and PMALERTSTATE. PMALERT stores the path to the sound file. PMALERTSTATE is a 0/1 value to state whether to play the alert. The PMALERT is updated via the PM preferences page. The PMALERTSTATE is updated via the privatesendinfo page (i believe that's it). The idea is that the PMALERTSTATE is set to 1 for the recipient when privatesendinfo is executed. The PMALERTSTATE is set to 0 after the .wav is played, so the user only has to hear it one time for each new message. So far, my hack has worked well for me. I don't have the courage to post my ugly code here. Maybe I will install a clean version of snitz on my site for MOD development.
I must say one of the best features of snitz is that you can modify it sooooooo easily. I'm no coder, but even I've been able to add some cool stuff. :)
Indy
Indy,
Post it here and it'll be cleaned up ( thats the whole idea). I need this cos my pm mod is in my inc_top page and everytime you access a page the stupid sound will play as long you got new messages in your inbox. Don't know how to fix as of yet. I have to think hard on this
Here is code to be able to tell if the sound has playbed before or not. I have not seen the PM code so im not sure how to exactly have it, but this will give you an idea of how to do it so it only plays once.
strSQL="Select Count(*) As Tot from Messages Where ToUserID='" & globalUserID & "' AND HasBeenViewed='1'" Set rs = my_Conn.Execute(strSQL) strNewMessages = rs("Tot")
If cint(strMessagesCookiesNew) < cint(strNewMessages) Then Response.Write("<bgsound src=""mail.wav"">" & vbCrLf) ElseIf strMessageCookieDate < Date and strNewMessages > 0 Then Response.Write("<bgsound src=""mail.wav"">" & vbCrLf) End If Response.Cookies (strCookieURL & "PM")("New") = strNewMessages Response.Cookies (strCookieURL & "PM")("Date") = Date
you need to change the code that is bold. this is just what i used for a PM i wrote a long time ago to notify people when they had mail. you will also need to put somewhere in the private messages that when a message is deleted it updates the cookie, otherwise if you delete a PM, then another one comes in, it wont do anything
Here's how I got the sound not to play more than once. If it is the first visit it plays "gotmail.wav". After it plays it creates a session called "MM_newmail" set to a value of "x". The next time the user visits the page it tries to play a sound called "xgotmail.wav". You could add a new sound, but I just never uploaded one so it does nothing.
in privatemess.asp
if pmcount = 0 then %> <IMG SRC="icon_pm.gif"> <% end if if pmcount >= 1 then %> <IMG SRC="icon_pm_new.gif"> <EMBED SRC="http://www.domain.com/media/wav/<% =session("MM_newmail")>gotmail.wav" WIDTH=1 HEIGHT=1 HIDDEN="true" AUTOSTART="true" LOOP="false" volume="75"></EMBED> <% Session("MM_newmail") = ("x") %> <% end if %> <% end if %>