![]() |
Play a sound when a user has a new PM.
This is a simple template mod that will make a sound file play when your user has an unread private message.
No screen shots enclosed because I can't take a picture of a sound. ;) ------------- If you have firefox users, you may want to point them to this link if they are having issues: http://www.eaforums.com/forums/showthread.php?t=40220 ------------ Amy |
Can the user turn it off if they don't want a sound played?
|
You can set up a custom userfield and wrap a conditional around the code in the template. I am not posting the code here because supporting userfield conditionals for non-coders ends up being as fun as having a root canal without anasthesia :D
|
Quote:
Useful hack .. thanks amy Clicked install |
Quote:
Thanks for sharing, neat mod. :) |
Any screenshots?
[high]* aethro clicks install and runs away before being smacked [/high] :p |
he said that
Quote:
|
A) She.
B) He/she is obviously joking. Way to recognise jokes. :p |
Without the :p, I wouldn't have been sure myself ;)
|
Amy is there any way to have this NOT play when you are in the actual pm area? If you have more than 1 message waiting, it plays everytime you answer or view a message or listing.
|
The easiest and rather sloppy way of achieving that would be to change this line:
HTML Code:
<if condition="$vbulletin->userinfo[pmunread]>0"> HTML Code:
<if condition="$vbulletin->userinfo[pmunread]>0 AND THIS_SCRIPT != 'private'"> |
Quote:
Thank you, sir. ;) |
Can anyone recommend any free sounds for this?
|
I included one with the mod. Another I like is the AOL "You've got mail" wav.
Here's some others: http://humor.about.com/cs/soundbites/p/ds042804.htm |
Heh... Just fire up a sound recorder and make your own. Oh the fun I'm going to have with this! LMAO!
|
Wayne, I got one where the 7-11 guy says "You've got mail in your inbox". ;)
|
is there any way to play random sounds? thanks for a great hack
|
Yes. You could put your sounds in a folder and give them names like 1.wav, 2.wav etc. Then, have a plugin pick a random number to select the wav for you. That would be the easiest way that I can think of.
|
Quote:
|
I just followed that link through with all the .wav's and it gave me a trojan so yeah, just watch out.
|
thank you so much ! it's perfect !
|
just a hint for those that are looking for sounds, there was a hack released for 3.0.x that did this exact thing and had 10 small wav files that did it. :D I don't remember which one but a quick search will show it and you can grab those 10 wav files quickly. Fantastic though that someone brought it to 3.5.
Amy I'm one of those lurker types but I have to say you're fantastic :D |
Thanks I installed it and used a sound file for Meg Ryan from the movie you've got mail.
|
Has anyone installed this on 3.5 gold?
|
Quote:
|
Is this going to play just one time or every time a page is refreshed...?
I don't want to bother users and for it to get anoying... |
Quote:
|
Quote:
|
ok Guess Im dumb? I followe the instructions and nothign happens
I went into my style, and opened my navbar template (navbar breadcrumb section) and added this <!--- New Mail Wav --> <if condition="$vbulletin->userinfo[pmunread]>0"> <script> function EvalSound(soundobj) { var thissound=document.getElementById(soundobj); thissound.Play(); } </script> <embed src="/forums/message.wav" autostart=true hidden=true id="sound1" enablejavascript="true"> </if> I than copied my message.wav file to my websites root and forum directory and It doesnt do anything for me.. Im using VB 3.5 Gold.. Any help!? I also sent myself a number of new emails for testing.. |
It's not for emails. It's for private messages. Also, if you are testing it with private messages, what browser are you using?
|
sorry I meant Private Messages, and Im using IE Maxathon
|
I fixed it amy, it was a pathing issue to the sound file. Now has anyone figured out a way to allow it to only Say ONCE you have new mail when you login!?
|
One can you get it to play a small mp3 file with pm..
and 2.. I have a quicktime issue.. it works fine with fire fox but in IE it autostarts and has no control bar, even tho the code says autostart=false and controller =true... or whatever.. any ideas? Thanks |
well, installed does not work for me, can I add that code anywhere within the navbar template? I added it right at the bottm, very last thing.
|
again I beg, anyway to get the site to play a mp3 when a new pm arrives?
|
Quote:
<embed src="/forums/mp3" autostart=true hidden=true id="sound1" enablejavascript="true"> </if> |
anyway to put the script in another template, if they have a pm and dont check it it replays everytime they navigate on the site, maybe a way to have it just play once? any ideas?
I have it set for navbar to change colors on new pm now, and I added your script to the pm_messagelist template so when they load the pm list it plays the sound... Works for me.. |
Great addon...does anybody know how to make it so users can select to turn this option on or off and also maybe give the users the option of selecting a sound file on the server they prefer?
|
Quote:
any help here? Mine does not work at all, I added it right under the "<!-- breadcrumb, login, pm info -->" but it does not work for me...anyone please? |
Nice idea and I would install if user can on/off and it's only playing 1 time sound.
|
All times are GMT. The time now is 04:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|