TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 02, 2024, 02:48:50 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 151
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 120
  • Total: 120

PM Audio Alert

Started by bigguy, September 10, 2006, 10:10:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

slvreagl

#30
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



brianjw

Is the gotmail.swf and other files needed in the right directory to be listed? ???

RoarinRow

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   ???

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

brianjw

Nevermind then, two people are getting this problem and one is RR so um obviously there is a problem, lol :2funny:

RoarinRow

#34
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.

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

brianjw

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...........

RoarinRow

I tried putting the code in different areas of the index.template.php file.  can't figure it out   :idiot2:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

bigguy

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.

slvreagl

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 :-\

bigguy

That is very wierd. I have never heard of it doing that. After I upgrade my forum I will take a look.