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 Sound When Private Message Received - the Amy Way (https://vborg.vbsupport.ru/showthread.php?t=50371)

amykhar 03-17-2003 10:00 PM

Play Sound When Private Message Received - the Amy Way
 
This hack is based off of one by EvilLS1 who also kindly contributed the wav file.

His hack plays a sound when the user visits the forumhome page if they have a new PM.

My version plays the sound on any page much the same as the PM popup works. In addition, my version has a usercp option for members to turn off sounds if they wish.

It's a rather easy hack to install.

Amy

Boofo 03-18-2003 12:52 AM

Excellent work there, young lady. Let me be the first to (c)lick the install button. ;)

filburt1 03-18-2003 12:55 AM

You see, Amy? Now who's flirting with you? :p

Nice :)

Boofo 03-18-2003 12:57 AM

Yeah, but I'm old and harmless. I can't even handle what I have at home let alone anything else. ;)

amykhar 03-18-2003 01:54 AM

I left out two steps in the documentation earlier. The zip is updated, but if you already installed, here is the rest:

Run this query:

ALTER TABLE `user` ADD `pmsound` TINYINT DEFAULT '1' NOT NULL;


In the modifyoptions template
Find:

Code:

<tr>
        <td bgcolor="{firstaltcolor}"><normalfont><b>Pop up a box when you receive a Private Message?</b></normalfont><br>
        <smallfont>This will pop up a small warning box when you receive a Private Message asking whether you want to view the message.</smallfont></td>
        <td bgcolor="{firstaltcolor}"><normalfont>
                <input type="radio" name="pmpopup" $pmpopupchecked value="yes"> yes
                <input type="radio" name="pmpopup" $pmpopupnotchecked value="no"> no
        </normalfont></td>
</tr>


Add after:


Code:

<tr>
        <td bgcolor="{firstaltcolor}"><normalfont><b>Play a sound when you receive a Private Message?</b></normalfont><br>
        <smallfont>This will play up a sound when you receive a Private Message.</smallfont></td>
        <td bgcolor="{firstaltcolor}"><normalfont>
                <input type="radio" name="pmsound" $pmsoundchecked value="yes"> yes
                <input type="radio" name="pmsound" $pmsoundnotchecked value="no"> no
        </normalfont></td>
</tr>


amykhar 03-18-2003 01:55 AM

See what happens when you guys flirt? I get distracted and make mistakes :D

Amy

Vile 03-18-2003 03:52 AM

Sweet hack.

*installed.

SgtSling 03-18-2003 11:47 AM

Amy.. I cannot get this to work...
No sound.. nothing

SgtSling 03-18-2003 11:49 AM

I checked my files.
and it looks like I did everything correctly..

and yes I checked recieve sound pm in modify options

amykhar 03-18-2003 01:24 PM

Quote:

Today at 08:47 AM SgtSling said this in Post #8
Amy.. I cannot get this to work...
No sound.. nothing

That's because I forgot another step in the documentation. I am not a night person. Gotta quit releasing these things at night.

In youre header template, you need to put :

Code:

$headsound
I put it at the very top of my header template.

Off to update the documentation.

Amy

partang2 03-18-2003 02:39 PM

Does not work for me.... No sound at all....
Have done all in the zip and all you have said over here...

Dean C 03-18-2003 03:41 PM

Might want to put some screenies in the thread somewhere amy ;)

- miSt

SgtSling 03-18-2003 04:27 PM

Quote:

Today at 03:24 PM amykhar said this in Post #10


That's because I forgot another step in the documentation. I am not a night person. Gotta quit releasing these things at night.

In youre header template, you need to put :

Code:

$headsound
I put it at the very top of my header template.

Off to update the documentation.

Amy



You must mean the headinclude template

SgtSling 03-18-2003 04:28 PM

Ok I put it in the headinclude template and it works like a charm!

Thanks!

SgtSling 03-18-2003 04:29 PM

does anyone have any variations of the sound.wav file?

I want a funny one...
like that says
Beeatch! You better check yo mail!

uh.. I am serious..
:)

amykhar 03-18-2003 05:45 PM

Quote:

Today at 01:27 PM SgtSling said this in Post #13




You must mean the headinclude template

It's actually working in my header. Well, at least we have a couple of different options to try :)

Amy

amykhar 03-18-2003 05:50 PM

Quote:

Today at 12:41 PM Mist said this in Post #12
Might want to put some screenies in the thread somewhere amy ;)

- miSt

Yep. Here ya go.

partang2 03-18-2003 08:19 PM

Hm.... Still not working.... :(

amykhar 03-18-2003 09:09 PM

partang2, Here is how I would go about debugging.

In global.php comment out the code that resets the pmsound field to 1. Then send yourself a PM and make sure the database value is getting set to 2 when you do so.

If it isn't, your problem is in private.php.

If it is, then your problem is most likely that you either haven't created or called the templates. If you haven't uploaded the sound file, you will probably see an error. I did. However, make sure that the wav file is uploaded in binary format where it belongs.

Amy

Vile 03-18-2003 11:51 PM

After adding $headsound in the headunclude template, it worked fine for me :)

amykhar 03-19-2003 02:02 AM

I wonder why it's working in my header and you guys need to put it in the headerinclude? Ah well, these are the mysteries of coding for the web I guess.

Amy

partang2 03-19-2003 05:52 AM

Wonder if I have found the error.... In global.php there are several $templatesused.=' Witch one of them do I change?

SgtSling 03-19-2003 11:07 AM

partang2 put it in the headinclude template and it will work

zajako 03-19-2003 01:01 PM

sounds cool, however the blinking pm is what i use,and i think sound might take a bit longer to load. Ill possibly add this when i get my new server up and going.

Classy 04-06-2003 08:15 PM

Thank you, had no problems installing. Checked install :D

Red Blaze 04-08-2003 04:39 PM

Quote:

03-18-03 at 11:02 PM amykhar said this in Post #21
I wonder why it's working in my header and you guys need to put it in the headerinclude? Ah well, these are the mysteries of coding for the web I guess.

Amy

Do you have it between <head> </head> anything between that is part of headinclude, if not some of it. ^^;;

Anyway, nice hack I'm putting this one up too. :)

[high]* Red Blaze kicks and runs laughing. o.o?[/high]

Alien 04-10-2003 01:51 AM

Hey this is a really good idea.. Exactly how many queries will this add to things? :)

amykhar 04-10-2003 02:08 AM

Two if you have a PM. One to set the notifier that a PM exists and one to clear it when the window pops up.

Amy

Alien 04-10-2003 08:54 PM

Thanks so much for your quick reply, Amy! :)

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

SloppyGoat 04-10-2003 09:17 PM

Nice work! I had a little trouble, at first. I forgot something. DOH! But, it works great now. *Goes to click install* :)

Intex 04-27-2003 10:30 AM

Nice work Amykhar - works great :).

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

Mike11212 05-02-2003 01:40 PM

anyone have a better sounding wav
like maybe a girls voice saying you got a message

amykhar 05-02-2003 02:52 PM

<a href="http://www.kcbx.net/~rloomis/mailcall.html" target="_blank">http://www.kcbx.net/~rloomis/mailcall.html</a>

SemperFidelis 05-08-2003 02:18 PM

Nice work Amy
And thanks for the additional sounds too.

Would it also be a good idea to add this to the registeradult and registercoppa templates too ?
And if so is it just a case of adding the same code as added to modifyoptions ?

amykhar 05-10-2003 02:23 AM

You would have to hack register.php to insert the preferences in the database and not just modify the template.

Amy

-Sidekick- 06-05-2003 04:30 AM

This may be too much for such a hack, though this has been requested...

I have users that have their own wav they'd like to have play. So any chance of this hack being expanded to the point where in Options, users can choose from a list of wav files uploaded for the hack by a administrator?

amykhar 06-05-2003 11:19 AM

Sidekick, it could be done but I am probably not going to be doing it. Users on my board have mostly opted out of using the sound alert.

-Sidekick- 06-06-2003 02:55 AM

but it would be a nice edition. -.- :bunny:

Hobbes 06-10-2003 04:34 AM

Quote:

06-05-03 at 08:55 PM -Sidekick- said this in Post #38
but it would be a nice edition. -.- :bunny:

hehe....it would...anyway...

i placed it header....randomly...like...right dab in the middle...and it works....but,....it only plays it when
im in my PM box....not if im on forumhome....or anywhere else :(

Infopro 06-18-2003 04:13 PM

I have a user that uses Opera only, he suggested I add this to the code so he didn't have a big empty space on the top of his browser.
Code:

<embed src="message.wav" autostart="true" hidden="true" width="0" height="0">
I thought I'd pass it along. ;)


All times are GMT. The time now is 07:35 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.01589 seconds
  • Memory Usage 1,809KB
  • 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
  • (5)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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