Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Play a sound when new PMs are recieved.. Details »»
Play a sound when new PMs are recieved..
Version: 1.00, by EvilLS1 EvilLS1 is offline
Developer Last Online: May 2021 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-16-2002 Last Update: Never Installs: 33
 
No support by the author.

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.


Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-17-2003, 09:58 PM
Jucin Jucin is offline
 
Join Date: Oct 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #23  
Old 03-17-2003, 10:12 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #24  
Old 03-17-2003, 10:57 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replace it. I am using his sound file or I would have just released it as a new hack

Amy
Reply With Quote
  #25  
Old 03-17-2003, 11:05 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much.
Reply With Quote
  #26  
Old 03-17-2003, 11:21 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Amy
Nice Amy. You should release your version as its completely different (and much better) than mine. You can still use the sound file.

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.
Reply With Quote
  #27  
Old 03-18-2003, 12:05 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #28  
Old 03-18-2003, 12:23 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #29  
Old 06-04-2003, 08:26 PM
-Sidekick- -Sidekick- is offline
 
Join Date: May 2002
Location: Cudahy, Wi
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 06-04-2003, 09:24 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05522 seconds
  • Memory Usage 2,297KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete