I had this code installed on SMF 1.1 RC3 before TP and it worked great. I have also packaged this code into a mod. Now that TP is installed it doesn't look like it wants to work. Here is the code:
http://www.smfhelper.info/forum/index.php/topic,14.0.html
Can anyone help me with this and maybe I can make a mod that works with TP and SMF.
Sorry to double post but I found a bit of the problem. When I turn off the user info for SMF through the TP settings it stops the Audible PM from sounding. Does TP use a different set of code for the PM's in the sidebar. If it does were would I find it. (I hope that was understandable)
Ok, I'm sorry to triple post but I think I have just packaged this for TP. What this does (even if "Show user info" is put NOT to display) is when a PM comes in it gives you an audible alert saying "You've got mail" it will keep repeating that until you check your PM's. What I owuld like is for someone that has a test site to test this and see if it works first before I release this version of the mod. If anyone wants to it would be a big help.
THIS HAS BEEN TESTED NOW
works great on my test site.
I'm glad it works for you. It took me a bit to figure it out but I got it. Hope you all enjoy it. :)
This is a TP mod not really a snippet. But I think it's worth keeping so it's going into the Code Snippets.
That's great to hear. I'm glad it's staying. I hope people can find it useful, thank you. :)
There has been an update to this mod that can be gotten from my site or simplemachines. Audible Pm 1.5 It only sounds off the "You've got mail" Once or twice.
good to hear :up: ill try it out as soon as i get some time :D thanks
Works great, thanks! 8)
im thinking of recordin my own sound file which will say "HEY! u got mail u dork!"
lol
Quote from: Aku on October 31, 2006, 04:59:46 PM
im thinking of recordin my own sound file which will say "HEY! u got mail u dork!"
lol
Hahahaha, I would love that one :2funny: I'd send all my active members a PM, but I'm sure they'd smite me :o
lool
hey bigguy i wanted to ask - u know those adverts getting posted after every X posts on your forum - is that a mod? is it available for DL anywhere?
found it
thanks
After installing the package for TP 15 - http://mods.simplemachines.org/index.php?mod=454
I went to my custom theme, opened up index.template.php and added this code right before
// display user name
//Sound Notify On Messages
if (($context['user']['unread_messages']) >= 1){
echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="gotmail" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="gotmail.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="gotmail.swf" quality="high" bgcolor="#ffffff" width="1" height="1" name="gotmail" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>';
}
if ((isset($_SESSION['unread_sound']) && $_SESSION['unread_sound'] < $context['user']['unread_messages']) || (!isset($_SESSION['unread_sound']) && $context['user']['unread_messages'] >= 1))
{
echo '
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="gotmail" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="gotmail.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="gotmail.swf" quality="high" bgcolor="#ffffff" width="1" height="1" name="gotmail" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>';
// Save a session so it wont loop
$_SESSION['unread_sound'] = $context['user']['unread_messages'];
}
Yeah this mod like most of the rest only installs to the default theme.
It only repeats [YOU GOT MAIL] once..thats all
PLAY LOOP?
This version does not play the loop. It should only play "You've got mail" once or twice.
Quote from: bigguy on October 31, 2006, 05:43:35 PM
This version does not play the loop. It should only play "You've got mail" once or twice.
I only heard it twice.
the notification plays each time you reload a page. Impossible not to notice.
wheres knat? lol he should have a sex sound on his site :2funny: since he runs a porn site
Quote from: Aku on October 31, 2006, 08:06:08 PM
wheres knat? lol he should have a sex sound on his site :2funny: since he runs a porn site
oh maybe I'll swap wave files for that :o
It's quite easy to do actually. Change a small line of code and the sound file. That should do it, although I have never experimented.
Nice piece of work I had to insert it into my theme as well but it went well. And I love it I'm always missing PM's
Really glad you like it. I will have version 2 out soon I hope.
Quote from: bigguy on November 01, 2006, 12:18:37 AM
Really glad you like it. I will have version 2 out soon I hope.
ohhh, what's v.2 going to have?
Not really to much different. It was supposed to be done last week, just haven't had the time.
can somebody make a PM Alert which uses gif animation instead of sound?
There's already a post on that. Feel free to use the search. In fact, its probably in the block code snippet index at the top of this page.
Quote from: yjobcreations on February 07, 2007, 03:44:54 AM
can somebody make a PM Alert which uses gif animation instead of sound?
Did you see this on SMF - Email Flash (http://www.simplemachines.org/community/index.php?topic=69182.0)
I tried this on my custom Helios theme and got nothing... running smf1.1.1 and tp 0.9.7 yet it works fine in my default theme
Quote from: RoarinRow on October 31, 2006, 05:05:50 PM
After installing the package for TP 15 - http://mods.simplemachines.org/index.php?mod=454
I went to my custom theme, opened up index.template.php and added this code right before
// display user name
Is the gotmail.swf and other files needed in the right directory to be listed? ???
Quote from: slvreagl on February 10, 2007, 03:53:52 AM
I tried this on my custom Helios theme and got nothing... running smf1.1.1 and tp 0.9.7 yet it works fine in my default theme
Quote from: RoarinRow on October 31, 2006, 05:05:50 PM
After installing the package for TP 15 - http://mods.simplemachines.org/index.php?mod=454
I went to my custom theme, opened up index.template.php and added this code right before
// display user name
//Sound Notify On Messages
if (($context['user']['unread_messages']) >= 1){
echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="gotmail" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="gotmail.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="gotmail.swf" quality="high" bgcolor="#ffffff" width="1" height="1" name="gotmail" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>';
}
if ((isset($_SESSION['unread_sound']) && $_SESSION['unread_sound'] < $context['user']['unread_messages']) || (!isset($_SESSION['unread_sound']) && $context['user']['unread_messages'] >= 1))
{
echo '
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="gotmail" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="gotmail.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="gotmail.swf" quality="high" bgcolor="#ffffff" width="1" height="1" name="gotmail" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>';
// Save a session so it wont loop
$_SESSION['unread_sound'] = $context['user']['unread_messages'];
}
i have several themes on my site I can't get it to work with all of them either ???
Nevermind then, two people are getting this problem and one is RR so um obviously there is a problem, lol :2funny:
Quote from: brianjw on February 10, 2007, 03:59:56 AM
Nevermind then, two people are getting this problem and one is RR so um obviously there is a problem, lol :2funny:
I ain't the creator. I just posted what I got out of my index.template.php file :o Hahaha, let me check my Helios index.template.php file. brb
Edit - just as I suspected, I don't have it in my Helios theme.
Quote from: RoarinRow on February 10, 2007, 04:08:12 AM
Quote from: brianjw on February 10, 2007, 03:59:56 AM
Nevermind then, two people are getting this problem and one is RR so um obviously there is a problem, lol :2funny:
I ain't the creator. I just posted what I got out of my index.template.php file :o Hahaha, let me check my Helios index.template.php file. brb
Edit - just as I suspected, I don't have it in my Helios theme.
lol! :2funny: well then the problem is on...........
I tried putting the code in different areas of the index.template.php file. can't figure it out :idiot2:
Try this version. The code you have to insert if you use a custom theme is as posted.
In your index.template.php find:
if($context['TPortal']['showtop']==1)
After that add:
if ((isset($_SESSION['unread_sound']) && $_SESSION['unread_sound'] < $context['user']['unread_messages']) || (!isset($_SESSION['unread_sound']) && $context['user']['unread_messages'] >= 1))
{
echo '
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="0" height="0" id="gotmail" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="gotmail.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="gotmail.swf" quality="high" bgcolor="#ffffff" width="1" height="1" name="gotmail" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>';
// Save a session so it wont loop
$_SESSION['unread_sound'] = $context['user']['unread_messages'];
}
I will attach the file to this post which should be installed first before doing these edits to your custom theme.
Thanks bigguy that piece of code did make the audiable pm work in my helios_multi11_rc3_tp theme, however it re-enabled my top header with the user box and created a second instance of my AJAX ShoutBox inside the userbox :idiot2:
Here is my index.template code, without your code. Maybe you can see why this happens :-\
That is very wierd. I have never heard of it doing that. After I upgrade my forum I will take a look.
Well i have added the code and there are no erros. See if this works or not:
Quote from: bigguy on February 14, 2007, 10:11:29 PM
Well i have added the code and there are no erros. See if this works or not:
Same problem using your attached file, audible pm works but shows a userbox and news box above the button menu on the top of the page, and adds another instance of my shoutbox inside the userbox
Well, I will have to look into this further then. I am very sorry for any inconvenience on your part. Obviously the mod was not supposed to work this way. If/when I figure it out I will post back. again I am sorry.