Add Sound ?

Download and support for PhpBB3 PM Notify & Guest Register bar
Locked
jasper
BBCoder I
BBCoder I
Posts: 3
Joined: 18 Oct 2014, 07:19
BBCodes: 1

Add Sound ?

Post by jasper »

Hey Guys,

Love this MOD, worked out of the box, even with my custom template. And looks very professional... in all browsers.

Was wondering how easy it would be to insert a line of code to play a sound when a PM Notification occurs ??

I am no PHP guy, so I maybe way off here.

Cheers,

Jasper
User avatar
Stoker
Site Admin
Site Admin
Posts: 3558
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Add Sound ?

Post by Stoker »

You can embed a sound in this part of the html:

Code: Select all

<!-- IF not S_IS_BOT and S_USER_LOGGED_IN and S_USER_PM_POPUP and S_DISPLAY_PM and (S_USER_NEW_PRIVMSG or S_USER_UNREAD_PRIVMSG) -->
<div id="info"><div id="infobar">
<a href="{U_PRIVATEMSGS}"><img style="width:50px; height: 50px; padding-right: 100px; vertical-align:middle;" alt="" src="{T_THEME_PATH}/images/mail.png" />{L_PMG_HELLO} {S_USERNAME} {L_PMG_YOUHAVE} {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD --> {L_PMG_AND} {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --><img style="width: 50px; height: 50px; padding-left:100px; vertical-align:middle;" alt="" src="{T_THEME_PATH}/images/mail.png" /></a>
</div></div>
<!-- ENDIF -->
Just use autoplay and it will alert you on every page load.

EDIT: or use this one: http://www.4seven.de/forum/6test/viewtopic.php?f=6&t=66
Dont know how it works, havent testet it.
Board rules! No PM support
jasper
BBCoder I
BBCoder I
Posts: 3
Joined: 18 Oct 2014, 07:19
BBCodes: 1

Add Sound ?

Post by jasper »

Thank you for your quick reply.. I will give this a go, and provide feedback shortly.

Thanks again,

Jasper
User avatar
Stoker
Site Admin
Site Admin
Posts: 3558
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Add Sound ?

Post by Stoker »

I have done it on here using this code in overall_header:

Code: Select all

<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT and not S_IN_UCP -->
<div id="info"><div id="infobar">
<a href="{U_REGISTER}"><img style="width: 50px; height: 50px; padding-right: 100px; vertical-align:middle;" alt="" src="{T_THEME_PATH}/images/reg.png" />{L_PMG_WELCOME} {SITENAME}. {L_PMG_REGISTER}<img style="width: 50px; height: 50px; padding-left:100px; vertical-align:middle;" alt="" src="{T_THEME_PATH}/images/reg.png" /></a>
</div></div>
<!-- ENDIF -->

<!-- IF not S_IS_BOT and S_USER_LOGGED_IN and S_USER_PM_POPUP and S_DISPLAY_PM and (S_USER_NEW_PRIVMSG or S_USER_UNREAD_PRIVMSG) -->
<div id="info"><div id="infobar">
<a href="{U_PRIVATEMSGS}"><img style="width:50px; height: 50px; padding-right: 100px; vertical-align:middle;" alt="" src="{T_THEME_PATH}/images/mail.png" />{L_PMG_HELLO} {S_USERNAME} {L_PMG_YOUHAVE} {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD --> {L_PMG_AND} {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --><img style="width: 50px; height: 50px; padding-left:100px; vertical-align:middle;" alt="" src="{T_THEME_PATH}/images/mail.png" /></a>

<!-- IF S_USER_NEW_PRIVMSG -->
<object type="application/x-shockwave-flash" data="{ROOT_PATH}images/scmp3player.swf" id="mp3player1" height="1" width="1">
	   <param name="movie" value="{ROOT_PATH}images/scmp3player.swf" />
	   <param name="FlashVars" value="playerID=1&loop=no&autostart=yes&soundFile={ROOT_PATH}images/mail.mp3" />
	   <param name="quality" value="high" />
	   <param name="menu" value="false" />
	   <param name="wmode" value="transparent" />
</object>
<!-- ENDIF -->

</div></div>
<!-- ENDIF -->
you can test it by sending a pm to your self.
Board rules! No PM support
jasper
BBCoder I
BBCoder I
Posts: 3
Joined: 18 Oct 2014, 07:19
BBCodes: 1

Add Sound ?

Post by jasper »

Thank you Stoker,

That worked an absolute treat !! This MOD has covered 2 requirements in 1 for me. As it is very simple and easy to use, and very light on CPU, this is a fantastic MOD. And very professionally presented...

Thanks again,

Jasper
Locked