The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Snow for Christmas Details »» | |||||||||||||||||||||||||
Snow For Christmas
(not supported) This is a VERY simple addon that will give the effect of snow falling on your forums, its great for the holiday season, and makes it an easy way to give your forum that holiday feel without doing a bunch of editing or theme changes. Step 1. Download the attached snow.zip (unpack it) and upload the snow.js to your forums root (you can also edit the snow.js to change, speed & amount of snow that falls) Step 2. Go to ADMIN > STYLE MANGER > your style > HEADER In the "header" box add this code: Code:
<!-- Start Snow For Christmas Code --> <script type="text/javascript" src="snow.js"></script> <!-- End Snow For Christmas Code --> If you only want the snow effect to be seen on the main page of your forum then do Step 3 instead of Step 2 Step 3. Go to your styles "FORUMHOME" and add the above code just under the "<head>" This has only been tested on 3.6.2 using IE6 To stop this effect after the holidays, simply comment out the script code like this: Code:
<!-- Start Snow For Christmas Code --> <!-- <script type="text/javascript" src="snow.js"></script> --> <!-- End Snow For Christmas Code --> DEMO View a demo here (this demo is using STEP 3, snow only on the FORUMHOME) Please Click INSTALL Show Your Support
|
Comments |
#112
|
|||
|
|||
Quote:
Hope that helps... As for the problem with Firefox I do not know... I only use IE 7, sorry. |
#113
|
|||
|
|||
Awesome
|
#114
|
||||
|
||||
thanks...
|
#115
|
||||
|
||||
LOL, I see DD is everywhere
Anyways same idea, another thread https://vborg.vbsupport.ru/showpost....1&postcount=28 S-MAN |
#116
|
|||
|
|||
Quote:
I don't want .gif images falling down the screen, I like this mod. Appreciated. Thanks |
#117
|
||||
|
||||
Quote:
Code:
//Configure here. var num = 40; //Number of flakes var timer = 30; //setTimeout speed. Varies on different comps //End. That SHOULD work.... not sure why not? S-MAN Edit: Here's a newer version of the script: Code:
//Snow - http://www.btinternet.com/~kurt.grigg/javascript if ((document.getElementById) && window.addEventListener || window.attachEvent){ (function(){ //Configure here. var num = 30; //Number of flakes var timer = 30; //setTimeout speed. Varies on different comps var enableinNS6 = 1 //Enable script in NS6/Mozilla? Snow animation could be slow in those browsers. (1=yes, 0=no). //End. var y = []; var x = []; var fall = []; var theFlakes = []; var sfs = []; var step = []; var currStep = []; var h,w,r; var d = document; var pix = "px"; var domWw = (typeof window.innerWidth == "number"); var domSy = (typeof window.pageYOffset == "number"); var idx = d.getElementsByTagName('div').length; if (d.documentElement.style && typeof d.documentElement.style.MozOpacity == "string") num = 12; for (i = 0; i < num; i++){ sfs[i] = Math.round(1 + Math.random() * 1); document.write('<div id="flake'+(idx+i)+'" style="position:absolute;top:0px;left:0px;width:' +sfs[i]+'px;height:'+sfs[i]+'px;background-color:#ffffff;font-size:'+sfs[i]+'px"><\/div>'); currStep[i] = 0; fall[i] = (sfs[i] == 1)? Math.round(2 + Math.random() * 2): Math.round(3 + Math.random() * 2); step[i] = (sfs[i] == 1)? 0.05 + Math.random() * 0.1 : 0.05 + Math.random() * 0.05 ; } if (domWw) r = window; else{ if (d.documentElement && typeof d.documentElement.clientWidth == "number" && d.documentElement.clientWidth != 0) r = d.documentElement; else{ if (d.body && typeof d.body.clientWidth == "number") r = d.body; } } function winsize(){ var oh,sy,ow,sx,rh,rw; if (domWw){ if (d.documentElement && d.defaultView && typeof d.defaultView.scrollMaxY == "number"){ oh = d.documentElement.offsetHeight; sy = d.defaultView.scrollMaxY; ow = d.documentElement.offsetWidth; sx = d.defaultView.scrollMaxX; rh = oh-sy; rw = ow-sx; } else{ rh = r.innerHeight; rw = r.innerWidth; } h = rh - 2; w = rw - 2; } else{ h = r.clientHeight - 2; w = r.clientWidth - 2; } } function scrl(yx){ var y,x; if (domSy){ y = r.pageYOffset; x = r.pageXOffset; } else{ y = r.scrollTop; x = r.scrollLeft; } return (yx == 0)?y:x; } function snow(){ var dy,dx; for (i = 0; i < num; i++){ dy = fall[i]; dx = fall[i] * Math.cos(currStep[i]); y[i]+=dy; x[i]+=dx; if (x[i] >= w || y[i] >= h){ y[i] = -10; x[i] = Math.round(Math.random() * w); fall[i] = (sfs[i] == 1)? Math.round(2 + Math.random() * 2): Math.round(3 + Math.random() * 2); step[i] = (sfs[i] == 1)? 0.05 + Math.random() * 0.1 : 0.05 + Math.random() * 0.05 ; } theFlakes[i].top = y[i] + scrl(0) + pix; theFlakes[i].left = x[i] + scrl(1) + pix; currStep[i]+=step[i]; } setTimeout(snow,timer); } function init(){ winsize(); for (i = 0; i < num; i++){ theFlakes[i] = document.getElementById("flake"+(idx+i)).style; y[i] = Math.round(Math.random()*h); x[i] = Math.round(Math.random()*w); } snow(); } if (window.addEventListener){ window.addEventListener("resize",winsize,false); window.addEventListener("load",init,false); } else if (window.attachEvent){ window.attachEvent("onresize",winsize); window.attachEvent("onload",init); } })(); }//End. |
#118
|
|||
|
|||
Works fine with 3.8.0 Beta 4!
|
#119
|
|||
|
|||
Same issue last year, on FF there are no where near as many flakes as IE.
|
#120
|
||||
|
||||
no go for me and IE7. Its complaining about r.clientheight being null or not defined.
Googled this and found others with the same issue but no resolution. |
#121
|
|||
|
|||
This mod didn't work for me (vB 3.7.4, FireFox 3.0.5 and Explorer 7) but this one does: http://www.dynamicdrive.com/dynamici...ownoimages.htm
Isn't that the same mod? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|