PDA

View Full Version : Sound on PM


Mobile
08-14-2001, 10:36 AM
Can we please have this hack because its better with a sound than scrolling all the way down to the bottom of the page and finding that you don't have a pm :(

Mobile

Znaper
08-14-2001, 02:01 PM
Search for this code in your index.php:


if ($newpm['messages']==0) {
$lightbulb='off';
} else {
$lightbulb='on';
}


and replace it with this:


if ($newpm['messages']==0) {
$pmsound = "";
$lightbulb='off';
} else {
$pmsound = "<bgsound src=\"gotmail.wav\" border=0>";
$lightbulb='on';
}


Now you can use the $pmsound variable in your forumhome template.
Replace the gotmail.wav with your soundfilename!

Steve Machol
08-14-2001, 02:38 PM
Good job Znaper! :)

Mobile, you can also do what I did and modify your formhome template to place the PM box at the top of your forums. Just put $pminfo right after the main table info, like this:

<!-- main -->
<table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="{contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextra} width="100%">
$pminfo
Also, could you please enter your customer info into your user profile? See my sig for details. Thanks!

Znaper
08-14-2001, 04:28 PM
@smachol:
I have allready entered my customer info into my profile!
Or you mean Mobile?

Steve Machol
08-14-2001, 04:31 PM
[QUOTE]Originally posted by Znaper
@smachol:
I have allready entered my customer info into my profile!
Or you mean Mobile?

Znaper
08-14-2001, 04:32 PM
No Problem! ;)

SirSteve
08-15-2001, 01:43 AM
Can anyone record a good clip that says this?

mojotim
08-15-2001, 08:48 AM
Go here and give it a try, it's what your looking for:

http://www.naturalvoices.att.com/demos/index.html#us_interactive

You type, and it will spit out a wav file for you.:D

webhost
08-15-2001, 09:34 AM
ok, I have a question how would you setup a welcome sound message to your board when someone comes to your board?
Like this one would be welcome to the forums by vbulletin or something like that.

Mobile
08-15-2001, 04:45 PM
Nice one Znaper it worked 100%
Also thanks smachol already had done that but looks no good :)


Thanks Mobile

SirSteve
08-15-2001, 06:01 PM
Webhost - that would get irritating quick! Each time you load that page, it'll sound off.

mojotim - thanks! This looks interesting!

webhost
08-15-2001, 07:46 PM
it wouldn't be that bad if it only came up the first time you came to site. Though after thinking about it I agree. How about this though when someone register's on your site you give them a voice message wav. welcome message

SirSteve
08-15-2001, 09:47 PM
This hack doesn't work on Netscape 4.03

almighty one
08-15-2001, 10:10 PM
Originally posted by Znaper

Now you can use the $pmsound variable in your forumhome template.

you just put that anywhere in forumhometemplate?

webhost
08-15-2001, 10:15 PM
almighty one

I am attempting to put it in now where it leaves a welcome message after someone register's if you are interested.

almighty one
08-15-2001, 11:26 PM
well this wouldnt do me much good seeing how my forums is a locked out community where all users registering come directly through me it is like a family :) but i got pm thing working fine thanx

Steve Machol
08-16-2001, 04:28 PM
[QUOTE]Originally posted by Mobile
Also thanks smachol already had done that but looks no good :)

Mobile
08-16-2001, 04:32 PM
moving the pm to the top of the board

Steve Machol
08-16-2001, 04:38 PM
Mobile, please enter your customer info into your user profile as I requested. See my sig for details. Thanks.

Mobile
08-16-2001, 05:05 PM
that better

Steve Machol
08-16-2001, 05:07 PM
[QUOTE]Originally posted by Mobile
that better

Mobile
08-16-2001, 05:29 PM
nothing

Steve Machol
08-16-2001, 05:32 PM
Hmmm.....all I can suggest is that you're not entering a valid customer number and password. Can you use those same things to get into the Members Area?

Mobile
08-16-2001, 05:46 PM
yes, i'll reply later m8.
Gotta go work :(

Steve Machol
08-16-2001, 06:07 PM
Just out of curiousity, why do you have this warning for people entering your site?

! If you are affiliated with any government, or ANTI-Piracy group or any other related group or were formally a worker of one you can NOT enter this web site, cannot access any of its files and you cannot view any of the HTML files.

danielillo
08-18-2001, 05:52 AM
Znaper, I've tried your hack in my forum, but if someone reads the PM and returns to main page, the .wav sounds again.
The unic way to disable it is mark all forums read just exiting Private Message Forum, and this is a little bit annoying.

Can we use the $pmsound variable just at the beggining of Head_newpm like:


<script language="JavaScript">
<!--
function confirm_newpm() {
$pmsound
input_box=confirm("


?

Excuse my English and my "code", but I've never written PHP code (I think It's gonna be obvious) :p

Znaper
08-18-2001, 06:56 AM
Ok im fixed this BUG!
The Sound plays so long, till you read the message!

Search for the fowling code into your index.php:


$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0");



And replace it with this code:


$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND messageread=0 AND folderid=0");



When you have read the message, the sound and the light bulb goes off.

water
08-18-2001, 09:52 AM
would it be possible to implement this for admins only for new post in specific forums?

:water

Znaper
08-18-2001, 10:26 AM
When I have time, then I code this for the Forums.

Chexbox
08-19-2001, 01:49 PM
I think this would be more compatible with most browser versions:

if ($newpm['messages']==0) {
$pmsound = "";
$lightbulb='off';
} else {
$pmsound = "<embed src=\"gotmail.wav\" autostart=true hidden=true></embed><noembed><bgsound src=\"gotmail.wav\" border=0></noembed>";
$lightbulb='on';
}



I don't have a way to test that out, but I think it should work.
I know a lot of HTML

NYI Fan
08-20-2001, 03:24 AM
Znaper -
Thanks for the help - this was great!
quick question though... you said we should replace the original line with this:

$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND messageread=0 AND folderid=0");

Shouldn't it be: (my change in red)

$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND messageread=0 AND folderid=0") $ignoreusers;

I couldn't get mine to work until I did it that way
Thanks again!

butty
08-20-2001, 10:29 AM
great work!!! thanks

NYI Fan
11-04-2001, 09:43 PM
OK
I had this working beautifully on 2.0.3

now in 2.2.0, when i try and edit the index.php for this:
if ($newpm['messages']==0) {
$pmsound = "";
$lightbulb='off';
} else {
$pmsound = "<bgsound src= c:\windows\media\"gotmail.wav\" border=0>";
$lightbulb='on';
}

and ensure that $pmsound is present in forumhome

I still have no sound

and if i make the change
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND messageread=0 AND folderid=0");
as suggested, i get errors on line 24 of index.php

anyone have any ideas???