News:

Wondering if this will always be free?  See why free is better.

Main Menu

Sound notice's

Started by Bigguy, December 19, 2005, 01:26:59 AM

Previous topic - Next topic

Bigguy

Would it be hard to make an audible alert when you have mail ??? Like say for example when you get mail a nice womans voice comes on and says "you have mail" or what ever that part can be customizable, you could also have it so that the user could switch this voice from male to female and back or to cartoon voices or whatever. Is is possible. or even a good idea  ???  :o

gri

#1
Quote from: Bigguy on December 19, 2005, 01:26:59 AM
Like say for example when you get mail
a nice woman's voice comes on and says "you have mail"
or what ever that part can be customizable,

or just a nice silent woman would come..
                                            with a packet.

Bigguy

That wasnt meant to sound rude or anything what I said. Like you could have any voice at all for all that matters, I just figured i`d ask. :-)

gri

Quote from: Bigguy on December 19, 2005, 02:04:15 AM
That wasnt meant to sound rude or anything what I said.
Like you could have any voice at all for all that matters,
I just figured i`d ask. :-)

It would better sound a voice of an Author.

I am given a chance today..

http://aga-delo10.narod.ru/chance.mp3  (~264 Kb)


Bigguy

Sure author`s or anything that might sound good to the person using it.

@ GC: Are you going to try this mod are you ???

Psyclones

#6
create a copy of index.template.php

download and open index.template.php in a php editor

find this

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.<br />';


add this underneath it
//play audio for you got mail
if (($context['user']['unread_messages']) >= 1){
echo '<embed src="gotmail00.wav" hidden="true" autostart="true" loop="false">';
echo '<noembed><bgsound src="gotmail00.wav"loop="infinite"></noembed>';
}



right click and safe this file in to your smf directory.

http://ltave.co.uk/gotmail00.wav


Now when a user has unread mail it will play the wav file, you might have to install quicktime or some similar plugin if you are not using IE

Hope this helps
I am a newbie php er so be gentle people.

Thanks
Psyclones

Bigguy

This will work in smf 1.0.5 ??? So all I do is download a copy of my index.template.php and add what you have put here. Then save the .wav file to my smf folder and that should be it. Is it that easy ?

Psyclones

let me check 1.0.5 index.template for the variables

but i think it will

definately works on rc1

back in 5 mins

Psyclones

yup should work on index.template 1.0.5

as always make a backup just to be safe

Bigguy

#10
I just tried this and it doesnt play a sound but there are NO errors at all so thats cool. But I can hear anything when get new mail.

EDIT: Sorry it does work in IE but not in Firefox.

Psyclones

#11
might of got the path wrong to the wav file

try putting it in the default themes directory.

what browser you using


Psyclones

you need to install the quicktime plugin for firefox to work with it.

firefox doesnt have standard audio plugins like IE does.

great news tho at last it works,

one added bonus it will make your users read new messages as it will remind you on very page reload tht you havenew messages until you read them once.


Bigguy

Yep it works real good in IE, this is perfect. Maybe it should be a mod. Good work, not one error and it only took about 3 minutes to do a manual install.

JayBachatero

I think you need to change the <embed> to something else.  I believe this only works in IE.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Psyclones

running it  in firefox here,  albeit i had to install the plugin quicktime for it


Psyclones

will look at maybe doing it in java script at a later dateif people get too many problems from this one.

Bigguy

#17
Were is the quicktime plugin for ff 1.5 I cant find it lol.

EDIT: Found it I think...

Psyclones

unfortunately you have to install quicktime full package and the plugin installs also

1MileCrash

i think flash would be the better choice for this feature. more browsers already have it, smaller file size, etc.
The only thing php can't do is tell you how much milk is left in the fridge.



Advertisement: