vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Play a sound when new PMs are recieved.. (https://vborg.vbsupport.ru/showthread.php?t=45812)

EvilLS1 11-16-2002 10:00 PM

Play a sound when new PMs are recieved..
 
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.


:)

DWZ 11-17-2002 09:56 AM

hehe, cool idea :)

[high]* DWZ imagines AOL's "You've got mail" thing playing on new PM[/high]

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

Quote:

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

Quote:

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

Quote:

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

Quote:

Today at 02:35 PM amykhar said this in Post #19
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:

Code:

<embed src="message.wav" autostart="true" hidden="true">
In global.php Find:

Code:

eval("\$headnewpm = \"".gettemplate('head_newpm')."\";");
Place above:
Code:

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

Quote:

Today at 12:57 AM amykhar said this in Post #23
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:
Code:

//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

Quote:

Today at 10:26 PM -Sidekick- said this in Post #28
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.


All times are GMT. The time now is 02:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03076 seconds
  • Memory Usage 1,774KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete