vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Random Sound on PM Message (https://vborg.vbsupport.ru/showthread.php?t=116037)

DjTaz 05-18-2006 10:00 PM

Random Sound on PM Message
 
What is this ?
This is a little hack that plays random sounds for users that have unread private messages. There are presently 10 sounds.

Modifications ?
1 template modification
1 folder upload (10 sound files)

Some History
I had a similar hack on 3.0.9 and when i went to search for it on 3.5 i discovered there was only one similar hack with only one sound and it used the embedding system which microsoft seem to dislike as it pops up an annoying activex window, so i did some research and came up with this.

What i cant do
I havent looked into making plugins and all that yet, so if someone else wants to go away and do as they wish with this to make it easier for everyone , please feel free, the easier things are for people the better.

ENOUGH OF THIS CHAT, WHAT DO I DO !!
ok,ok, heres what to do :


In the Navbar Template Find :
Code:


<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]"

2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>

below it add :
Code:


<!!-- RANDOM PM SOUNDS FOR UNREAD PM [DJTAZ] --!!>
<if condition="$vbulletin->userinfo[pmunread]>0">
<SCRIPT LANGUAGE="JavaScript">
        var p = 10;
        var whichSound = Math.round(Math.random()*(p-1));
document.write('<bgsound src="sounds/message'+whichSound+'.wav" autostart="true" loop="0" hidden="true">');
</script>
</if>
<!!-- RANDOM PM SOUNDS FOR UNREAD PM [DJTAZ] --!!>

Save and close the template , upload the sounds folder to your forum root , Click https://vborg.vbsupport.ru/ and your done - its simple enough as it stands really.


Support:
I will do my best to support this hack if there are any troubles , though i dont invisage any, but from today , i'll be on holidays for 2 weeks , and i may not have net access. Ill check things after that. Please do not ask for support if you havent clicked INSTALL

AfterThought :
After i did this thread i noticed that the 3.0.9 version was ported by paul and this version has an option to disable PM sounds - you can find it here :https://vborg.vbsupport.ru/showthrea...hlight=pmsound - its an excellent hack if you want that option

NokStar 05-19-2006 09:34 AM

Nice Thank you!

Snake 05-19-2006 06:36 PM

Looking good. Thanks!

DjTaz 05-19-2006 07:46 PM

anyone clicking INSTALL ?

Cybertims 05-19-2006 07:50 PM

Can this be tuned on or off by the user though? Handy if lets say they are in work and browsing the Forum.

Cheers.

DjTaz 05-19-2006 07:53 PM

Nope sorry - but the original hack that got me wanting this back on my boards can be turned off , i just didnt realise it was ported until after i did this up - the link is above to pauls port of the vb3 original hack.

(you can turn volume down if ur in work :p )

Cybertims 05-19-2006 08:59 PM

ok mate......one more question.

is it possbile to have it simply play a random wav file instead of ones only named message1.wav, meassge2.wav?

Cheers.

Amman-DJ.CoM 05-21-2006 02:50 AM

unfortunetly :( Didn't Work With Me

Destroied The NavBar Completly

Dr.Viggy 05-21-2006 04:19 AM

Quote:

Originally Posted by Amman-DJ.CoM
unfortunetly :( Didn't Work With Me

Destroied The NavBar Completly

same here

DjTaz 05-21-2006 05:29 AM

Quote:

Originally Posted by Amman-DJ.CoM
unfortunetly :( Didn't Work With Me

Destroied The NavBar Completly


Have u got other hacks on the profiles or the navbar ? What version of vBulletin are you running ?

Have you tried it without the :
<!-- RANDOM PM SOUNDS FOR UNREAD PM [DJTAZ] --!>
at the top and bottom ? (that caused my navbar to go strange the first time for some reason)

Is the hack in the place i said ? and if so,have you tried moving it about a bit - the very end of navbar may also work for you.

Just some suggestions - hopefully some will work.


All times are GMT. The time now is 08:37 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02378 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete