View Full Version : Play a sound when new PMs are recieved..
EvilLS1
11-16-2002, 10:00 PM
This is a very simple little hack that will play a sound when you have a new (unread) private message.
A friend was asking if there was a hack to do this so I searched the hacks database and this forum and didn't see anything, but I'd be suprised if someone hasn't already done it because its so simple. So if this has already been done by someone else, my appologies..
We just converted over to vB from phpBB a few weeks ago, and for some reason the import script set everyones preferences to not be notified by email or pop-up when new PMs are recieved. So this helps make sure that they notice them anyway.
:)
hehe, cool idea :)
* DWZ imagines AOL's "You've got mail" thing playing on new PM
corsacrazy
11-17-2002, 11:20 AM
nice one maty :D has any one got any more sounds to have ? ? installed :D
EvilLS1
11-17-2002, 11:37 AM
Thanks. :)
Here's a couple of sites with a lot of free sound files:
http://www.eventsounds.com/
http://www.top50wavsites.com/
EvilLS1
11-17-2002, 11:53 AM
Originally posted by DWZ
hehe, cool idea :)
* DWZ imagines AOL's "You've got mail" thing playing on new PM
I can't take credit for the idea. Someone else has done the same thing for phpBB forums. :)
Chris M
11-17-2002, 02:38 PM
But they havent for vB, so good going:)
Nice idea, but I dont like Wav's on websites;)
*installs on test board*
Satan
Obi-Wan
11-17-2002, 04:51 PM
Seems like a kewl hack m8, Thx.
were's the screenshot...HAHAHA
350Chevy
11-17-2002, 07:36 PM
Works like a charm! :)
I'll be playing around with figuring out how to get random PM's from a folder to play instead of just one. ;)
Link14716
11-17-2002, 08:33 PM
A similar hack has been made from FireFly, only his makes the header of the PM table flash a different table.
Nice job on this hack, nevertheless :)
EvilLS1
11-17-2002, 09:54 PM
Thanks. Glad a few others found it useful. 350Chevy is the friend I mentioned above (his idea to do this mod for vB). He's another phpBB traitor like me. :laugh:
I installed the flashing PM hack by Firefly too. Awesome! Yet another way to make new PMs more noticible. :)
ManagerJosh
11-18-2002, 03:29 AM
Bleah..I hate using WAVs. They seem to use too much bandwith :(
But nevertheless, great hack :)
350Chevy
11-18-2002, 03:37 AM
Originally posted by ManagerJosh
Bleah..I hate using WAVs. They seem to use too much bandwith :(
But nevertheless, great hack :)
Nah, the wav files I use are usually less than 10k... I bet your Banner takes up more Bandwidth than that! :)
Intex
11-24-2002, 07:42 AM
Nice1. Will it work ok on 2.2.6?
EvilLS1
11-24-2002, 07:59 AM
It should work fine with 2.2.6. :)
Chris M
11-24-2002, 09:25 AM
It should work with any 2.2.x version of vB;)
Satan
Dean C
11-24-2002, 09:29 AM
A midi would be a bit better :)
- miSt
EvilLS1
11-24-2002, 10:29 AM
Originally posted by Mist
A midi would be a bit better :)
- miSt
It will play midis too. :)
Schorsch
01-22-2003, 05:07 PM
very nice, thank you :banana:
amykhar
03-17-2003, 06:35 PM
Removed to release independantly.
amykhar
03-17-2003, 06:48 PM
Removed to improve and release independantly.
Jucin
03-17-2003, 09:58 PM
Im not getting any sound???
is the code supposed to be put like this
if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
}//new PM sound hack
if ($unreadpm['messages']==0) {
$sound='';
} else {
$sound='<embed src="message.wav" autostart="true" hidden="true">';
}
//end new PM sound hack
or have no break in it like this?
if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
}
//new PM sound hack
if ($unreadpm['messages']==0) {
$sound='';
} else {
$sound='<embed src="message.wav" autostart="true" hidden="true">';
}//end new PM sound hack
Boofo
03-17-2003, 10:12 PM
Today at 02:35 PM amykhar said this in Post #19 (https://vborg.vbsupport.ru/showthread.php?postid=368205#post368205)
That hack works quite well when you are on the main page. I have modified it a bit to work on any pages.
Add a new template called head_sound
This is the contents of the new template:
<embed src="message.wav" autostart="true" hidden="true">
In global.php Find:
eval("\$headnewpm = \"".gettemplate('head_newpm')."\";");
Place above:
eval("\$headnewpm = \"".gettemplate('head_sound')."\";");
That should do it. I am going to put an addon that allows the member to select whether or not they want sounds to play.
Amy
Is this code supposed to be added to the main one in the first post or is this to replace it?
amykhar
03-17-2003, 10:57 PM
Replace it. I am using his sound file or I would have just released it as a new hack :D
Amy
Boofo
03-17-2003, 11:05 PM
Thank you very much. ;)
EvilLS1
03-17-2003, 11:21 PM
Today at 12:57 AM amykhar said this in Post #23 (https://vborg.vbsupport.ru/showthread.php?postid=368349#post368349)
Replace it. I am using his sound file or I would have just released it as a new hack :D
Amy
Nice Amy. You should release your version as its completely different (and much better) than mine. :) You can still use the sound file. :p
Or if you don't want to release it seperately I can add your version (as a seperate hack) to the first post of this thread and put your name by it if you want.
amykhar
03-18-2003, 12:05 AM
Thank you EvilS1 :)
I am going to delete it for now and tweak it a wee bit. I wasn't paying attention this morning and the version I have now only works if popups are turned on. I'll fix that and release it when it's done tonight or tomorrow.
Amy
EvilLS1
03-18-2003, 12:23 AM
Jucin,
Add the code exactly as it is in the instructions.. It should look like this:
//new PM sound hack
if ($unreadpm['messages']==0) {
$sound='';
} else {
$sound='<embed src="message.wav" autostart="true" hidden="true">';
}
//end new PM sound hack
And make sure you added $sound to your forumhome_pmloggedin template.
If you've done that and uploaded message.wav to your forum directory then it should work.
-Sidekick-
06-04-2003, 08:26 PM
I installed a hack like this once for vB and it ended up breaking the Popup on PM feature. Does this hack interrupt that feature at all?
Also, could someone show me what would have to be modified to have this feature picked as default when signing up instead of email on pm.
EvilLS1
06-04-2003, 09:24 PM
Today at 10:26 PM -Sidekick- said this in Post #28 (https://vborg.vbsupport.ru/showthread.php?postid=404473#post404473)
I installed a hack like this once for vB and it ended up breaking the Popup on PM feature. Does this hack interrupt that feature at all?
Also, could someone show me what would have to be modified to have this feature picked as default when signing up instead of email on pm.
This will have no effect on the popup pm feature. And once you add the hack it will already be default for all users because its not selectable in the profile. If you would rather have it so that users can choose if they want a sound to play or not then take a look at amykhar's version of this hack.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.