vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Private Message Sound Notification (https://vborg.vbsupport.ru/showthread.php?t=65570)

350Chevy 05-26-2004 10:00 PM

Private Message Sound Notification
 
Private Message Sound Notification plays a random .wav file whenever your users recieve a Private Message. I have included 10 .wav files in the zip that you can use or you can find and replace the .wav files with any file(s) of your choosing.

This is installed at: http://www.lssix.com (You will have to register and just PM yourself to test.)

- This used to be installed on my site running vB2 and was originally requested by myself and written by EvilLS1.

DATABASE QUERY (1)

FILE MODIFICATIONS (2)
  • global.php
  • profile.php

TEMPLATE MODIFICATIONS (2)
  • navbar
  • modifyoptions

ADD PHRASE (1)

FEATURES:
  • Plays ten(10) random .wav files when a user recieves a PM (you can change this to any number)
  • User CP option to allow your users to turn the sounds on/off
  • Plays the .wav file from any page on your forum as the code is located in the navbar template
  • Sounds are ON by default
  • Sounds do NOT play when you enter the User CP or when entering the Private Messages. Thanks to EvilLS1!
  • Sounds do NOT play if the member is a part of a special usergroup who does not have access to read PMs. Thanks to Onkel_Tom!

* Last Updated 06/20/2004

For more sounds click here - Thanks to colicab-d for providing a few more sounds. :)

EvilLS1 05-27-2004 03:06 AM

I'll add this one 350. Thanks! :)

dcevoclub 05-27-2004 11:53 AM

*installed* :)

Boofo 05-27-2004 12:47 PM

Installing and clicking! ;)

shelaby 05-27-2004 01:23 PM

Nice Hack!
*installed and klicked* :D

RichieBoy67 05-27-2004 03:33 PM

Installing now! Thanks...nice one...

350Chevy 05-27-2004 03:48 PM

Didn't realise anyone else would want this, I wasn't even going to release it because I didn't want to waste anyone's time. Thank EvilLS1 for talking me into it. https://vborg.vbsupport.ru/external/2004/05/1.gif

Glad everyone likes it. :)

RichieBoy67 05-27-2004 04:06 PM

I love this hack! Installed in about 5 minutes without a hitch... Totally cool bro..

Thanks

Boofo 05-27-2004 04:07 PM

Quote:

Originally Posted by 350Chevy
Didn't realise anyone else would want this, I wasn't even going to release it because I didn't want to waste anyone's time. Thank EvilLS1 for talking me into it. http://www.lssix.com/forums/images/smilies/icon_lol.gif

Glad everyone likes it. :)

If EvilLS1 backs it up, then it is the hack to have. ;)

colicab-d 05-27-2004 05:04 PM

Great hack heres some new sounds :)

Classic Beep
Txt Messge

MaxScript 05-28-2004 01:10 AM

is there an AOL sounds package ?

Revenge 05-28-2004 01:40 AM

Hm, plays also sound when I go in the Usercp and click any link... every time a new page is loaded...???

mharmon 05-28-2004 01:57 AM

This is a great hack but I agree with the above comment... Is there anyway to make this so it will play ONCE per session? You have to listen to it 3 times before you actually read your message.

350Chevy 05-28-2004 03:09 AM

I did this so it played on every page no matter what page your users were viewing.

You can take the $sound out of the navbar template and just place it in the FORUMHOME template anywhere you wish. If you do that it will only play the wav file when they're on the Forum's home page. Since it's a random sound I don't think users mind hearing a different sound two times more before reading thier message. And with the option to turn it off they can disable it if choosen.

Adding the option not to play a sound when entering the private messages would require much more hacking and not really worth it. ;)

350Chevy 05-28-2004 03:11 AM

Quote:

Originally Posted by MaxScript
is there an AOL sounds package ?


What are you looking for?

Here you can find some AOL "YOU GOT MAIL" type message .wav files. :)

http://www.emailgifsandsounds.com/index-eng.html

350Chevy 05-28-2004 03:13 AM

I've also noticed about 3 or 4 of you that posted haven't clicked the "installed" link. :) Please click it if you plan to keep it.

As for the sound being played after you enter the Private Message panel I'll look into changing that. Pretty tired now though and the weekend ahead I doubt I'll be able to get to it until Monday (if I can even do it at all.. lol)

EvilLS1 05-28-2004 03:33 AM

Quote:

Originally Posted by 350Chevy
Adding the option not to play a sound when entering the private messages would require much more hacking and not really worth it. ;)

You could use a conditional in the navbar template like this:

Code:

<if condition="THIS_SCRIPT!='private'">       
        $sound
</if>

If ya also want to stop the sound when viewing the usercp use this:
Code:

<if condition="THIS_SCRIPT!='private' and THIS_SCRIPT!='usercp'">       
        $sound
</if>

Gotta love template conditionals. :)

350Chevy 05-28-2004 12:37 PM

Oh yeah.. never thought of that. Too tired lastnight. Thnx Evil. :)

First post updated. :)

The Realist 05-28-2004 01:49 PM

Installed.

Thanks M8 :)

Revenge 05-28-2004 01:57 PM

Perhaps there is an easy way, that the sound only plays once, so if the user does not read the mail it is still playing until he reads it?

The Realist 05-28-2004 02:01 PM

This is a good thing. At lease by playing the sound all the time, it makes them clear there inbox.

Quote:

Originally Posted by Revenge
Perhaps there is an easy way, that the sound only plays once, so if the user does not read the mail it is still playing until he reads it?


350Chevy 05-28-2004 02:20 PM

Are you asking if you can make the sound play over and over?

Or are you asking that the sound only be played once?

I'm not sure I understand the question but both of those are easily possible. :)

MindTrix 05-28-2004 03:38 PM

Works perfect for me, thanks

gmarik 05-29-2004 09:27 AM

valuable one!

Revenge 05-29-2004 10:53 AM

>only be played once

Me and my english :D the last one... only one time to play. Perhaps in the moment the popup box popups :D

alfaowner 05-29-2004 08:43 PM

i agree, it should only play once really, any more than that and it would get disabled, which means no point in installing. great hack. if it does only play once until you read it, then rock on, ill install and click the button. keep up the great work. like your site btw

gopherhockey 05-30-2004 08:06 PM

I'm not sure whats going on, but I get this error every time I try change the PM sound option in the usercp:

Invalid SQL:
UPDATE user SET

showvbcode = 2,
pmpopup = 1,
pmsound = ,
maxposts = -1,
daysprune = 0,
timezoneoffset = '0',
startofweek = 1,
languageid = 0,
threadedmode = 0,
autosubscribe = 1,
options = 35159
WHERE userid = 2

The only thing I think I did different was run the initial SQL query from the admincp rather than from phpMyAdmin like I ususally do...

If I look there is nothing in the pmsound table for any user..

The sound itself works fine though.

alfaowner 05-31-2004 07:30 AM

Hi chevy,

Do you know the code to only make it play once full stop, once I have that, id gladly install it.

Thanks

350Chevy 05-31-2004 05:28 PM

Sorry guys, been really busy with work and at home,

Revenge and alfaowner try putting this code in global.php:

Code:

if ($bbuserinfo['pmpopup'] == 2 AND $bbuserinfo['pmsound'] == 0)
instead of:
Code:

if ($bbuserinfo['pmsound'] == 0)
And that should make the sound play only once. But it will not play a sound at all if they have PM pop-up notifications turned off. I'll see if I can find away around that as well if you'd like.

Glad you liked my site alfaowner. :)

gopherhockey, if you're still having that problem check the lines of code in global.php and profile.php very closly. More then likely something is botched up in there. I've installed this on 3 test boards and my own without a hitch. Are you running any other hacks that could conflict with this one?

Thanks to everyone who likes it. :)

will_lean 05-31-2004 06:15 PM

this hack c :surprised: :surprised: l

one question before i install this how can i use this hack with the option to play the wav files on a seperate server.
(my host doesnt allow sound files) :ermm:

350Chevy 05-31-2004 06:23 PM

Quote:

Originally Posted by will_lean
this hack c :surprised: :surprised: l

one question before i install this how can i use this hack with the option to play the wav files on a seperate server.
(my host doesnt allow sound files) :ermm:


Hrmmm... Server doesn't allow sound files? How strange! :)

in global.php edit this line to point to your sound files

find:
Code:

$sound = iif($bbuserinfo['pmunread'], '<embed src="sounds/message'.$srand_snd.'.wav" autostart="true" loop="0" hidden="true"></embed>');
change to example:

Code:

$sound = iif($bbuserinfo['pmunread'], '<embed src="http://www.lssix.com/forums/sounds/message'.$srand_snd.'.wav" autostart="true" loop="0" hidden="true"></embed>');
the above example should pull the sounds from my server..

if you wish to place the sounds elsewhere make sure you have the wav files installed on the other server all named messagexx.wav (xx denotes the number 1-10) and point it to that server and folder name. I haven't tested the above but don't see why it wouldn't work.

neocorteqz 05-31-2004 08:45 PM

Sweet addition.

/me clicks install.

Question, how many queries does it add? My guess would be one?

Thanks again for a cool hack.

neocorteqz 06-01-2004 06:20 AM

where do i set it to use more sounds?

Edit:

is anyone having problems in Mozilla??

And the pop up box is not popping up.

350Chevy 06-01-2004 02:13 PM

Quote:

Originally Posted by neocorteqz
Sweet addition.

[high]* neocorteqz clicks install.
[/high]

Question, how many queries does it add? My guess would be one?

Thanks again for a cool hack.


I never tested, it shouldn't add any queries until a PM is sent. If anything then yes, one query.

Quote:

Originally Posted by neocorteqz
where do i set it to use more sounds?

In global.php

Code:

        srand(make_seed()); $srand_snd = rand (1,10);
change the number 10 in rand (1,10) to whatever number you wish. :)

Quote:

Originally Posted by neocorteqz
And the pop up box is not popping up.

I just tested my board and the popups work fine for me with this. The code should not have any effect on the popups. ;)

neocorteqz 06-01-2004 09:07 PM

Quote:

Originally Posted by 350Chevy
I never tested, it shouldn't add any queries until a PM is sent. If anything then yes, one query.



In global.php

Code:

        srand(make_seed()); $srand_snd = rand (1,10);
change the number 10 in rand (1,10) to whatever number you wish. :)



I just tested my board and the popups work fine for me with this. The code should not have any effect on the popups. ;)


Thank you sir, other than popups not popping up, it works great. Nice Job. :)

I'll see if I messed something up. ;)

Onkel_Tom 06-03-2004 11:20 AM

nice hack, thanks !
clicked install

Flow Fusion 06-09-2004 09:27 AM

Very cool hack I get errors as well but yes I do have other hacks as well installed so my members will live.

TTG 06-09-2004 04:39 PM

Works well .. took 10mins to install ..

Thanks for that.

350Chevy 06-09-2004 08:48 PM

Quote:

Originally Posted by Flow Fusion
Very cool hack I get errors as well but yes I do have other hacks as well installed so my members will live.

What type of errors? Anything I can do to help?

monstergamer 06-10-2004 04:04 AM

some members are reporting that they dont hear any thing
what could be the problem?


All times are GMT. The time now is 07:44 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
  • Page Generation 0.01537 seconds
  • Memory Usage 1,828KB
  • 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
  • (8)bbcode_code_printable
  • (10)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
  • (40)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