Author |
Topic |
wedont
Junior Member
Canada
344 Posts |
Posted - 01 January 2001 : 22:25:38
|
UPDATED:Jan 3rd
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"
http://vcx.hypermart.net/images/message.wav http://vcx.hypermart.net/images/message_femail_08.wav
PS:Spent 4 hours seaching for decent wav file(english) for this.I all ready had mine (french!). By the way here's the french version :) http://vcx.hypermart.net/images/Message-9k_07.wav
And for the "dominance" inclined (english) ;) http://vcx.hypermart.net/images/master_gotmail-02.wav
Edited by - wedont on 03 January 2001 14:44:01
Edited by - wedont on 22 January 2001 22:05:21 |
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 03 January 2001 : 13:08:59
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> UPDATED:
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"
http://vcx.hypermart.net/images/message.wav
Wedont snitz ver3.1 sr2
Edited by - wedont on 02 January 2001 20:10:51 <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Its a nice mod, but i feel if you got a decent sounding wav sound for the new mail, more people would use it. :)
thx
Spoon
"uohh look at me, ive got a signature, uohh look at me!" :) |
|
|
kycable
New Member
USA
82 Posts |
Posted - 06 January 2001 : 22:40:54
|
here is the sound I use:
http://www.webzonecomplete.com/newmail.wav
I perfer to use this line of code:
<bgsound src="newmail.wav" loop="0">
and to make the messages gramatically correct I have changed these lines:
You have <% if pmcount = 1 then %> <% =pmcount %> new private message. <% else %> <% =pmcount %> new private messages. <% end if %>
Edited by - KYCable on 06 January 2001 22:48:36 |
|
|
wedont
Junior Member
Canada
344 Posts |
Posted - 06 January 2001 : 23:11:27
|
Thanks - KYCable,
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.
Wedont snitz ver3.1 sr2 |
|
|
kycable
New Member
USA
82 Posts |
Posted - 07 January 2001 : 08:12:37
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Thanks - KYCable,
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.
Wedont snitz ver3.1 sr2 <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
That is weird...
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.
|
|
|
Spoon
Average Member
Ireland
507 Posts |
Posted - 07 January 2001 : 10:37:21
|
maybe we could get something going, like a sound archive where people can pick the sound they want?
thx
Spoon
"uohh look at me, ive got a signature, uohh look at me!" :) |
|
|
wedont
Junior Member
Canada
344 Posts |
Posted - 07 January 2001 : 17:44:42
|
Thanks Kycable,
Sure would appreciate the code!(shouldn't it be more like: <% if ie = "true" then %> <bgsound tag> <% else %> <embed tag> <% end if %>
Since only IE uses the bgsound tag?
ps: Spoon: a sound archive would be great!
Wedont snitz ver3.1 sr2
Edited by - wedont on 07 January 2001 17:51:08 |
|
|
kycable
New Member
USA
82 Posts |
Posted - 07 January 2001 : 20:37:52
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Thanks Kycable,
Sure would appreciate the code!(shouldn't it be more like: <% if ie = "true" then %> <bgsound tag> <% else %> <embed tag> <% end if %>
Since only IE uses the bgsound tag?
ps: Spoon: a sound archive would be great!
Wedont snitz ver3.1 sr2
Edited by - wedont on 07 January 2001 17:51:08 <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Oooopppps, ah well 3½ hours of sleep for the last 4 nights gets to you eventally.
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 January 2001 : 23:19:45
|
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> |
|
|
Indy
Starting Member
17 Posts |
Posted - 08 January 2001 : 10:09:43
|
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 |
|
|
tilttek
Junior Member
Canada
333 Posts |
Posted - 08 January 2001 : 10:43:13
|
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
Philippe Gamache http://www.tilttek.com http://www.lapageamelkor.com |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 08 January 2001 : 12:32:17
|
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
http://www.research.att.com/~mjm/cgi-bin/ttsdemo
Brad |
|
|
davemaxwell
Access 2000 Support Moderator
USA
3020 Posts |
Posted - 08 January 2001 : 13:25:00
|
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).
Here's the link: http://members.home.net/peterandmin/mailsounds.htm
Dave Maxwell -------------- When's the next meeting of Snitzaholics Anonymous |
|
|
frankie
Junior Member
Vatican City
304 Posts |
Posted - 09 January 2001 : 02:07:19
|
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
ô¿~ |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 09 January 2001 : 07:12:49
|
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.
strMessagesCookiesNew = Request.Cookies(strCookieURL & "PM")("New") strMessageCookieDate = Request.Cookies(strCookieURL & "PM")("Date")
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
Brad |
|
|
seven
Senior Member
USA
1037 Posts |
Posted - 20 January 2001 : 13:24:05
|
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 %> |
|
|
Topic |
|