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 :
<!!-- 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 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
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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
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.