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)

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 09:42 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.01046 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete