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.

DjTaz 05-21-2006 05:33 AM

Quote:

Originally Posted by Cybertims
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.

Unfortunately my Javascript isnt the best so im limited to whats above, but im sure a pure PHP script could be written to check the folder for sound files and then make an array of the sounds in there and randomise them. Its getting that to work with vBulletin without conflict that might make it a bit tougher.
I just found it easier to rename the wav files to message1 message2 etc etc
and if you have more , just change the p=10 to p=11 and so on

Dr.Viggy 05-21-2006 01:10 PM

Quote:

Originally Posted by DjTaz
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.

That did the trick completely. Took that out and it works just fine. thanks.

*clicks install

DjTaz 05-28-2006 09:53 PM

Glad i could help out. If anyone has any other good sounds , please post them.

Dr.Viggy 05-28-2006 10:40 PM

tried to upload 2 wav files but it wouldn't let me

BeaLzeBuB 05-29-2006 12:18 AM

güzel...

ben seni bi yerden hatırlıyorum ama çıkaramadım tam.

koaka.com da bulundun mu hiç?

DjTaz 06-04-2006 06:07 AM

Quote:

Originally Posted by BeaLzeBuB
g?zel...

ben seni bi yerden hatırlıyorum ama ?ıkaramadım tam.

koaka.com da bulundun mu hi??


My Turkish isnt as up to date as it should be , can you translate that into english for me please ?

DjTaz 03-07-2008 12:39 AM

ill assume that was a no then

Eq4bits 03-27-2011 05:11 PM

Any chance this will be ported to work with 4.x? I really miss having it on my forum ;)


All times are GMT. The time now is 11:42 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.01738 seconds
  • Memory Usage 1,751KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete