Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Snow for Christmas Details »»
Snow for Christmas
Version: 1.00, by Ev!L ErN!E Ev!L ErN!E is offline
Developer Last Online: Oct 2015 Show Printable Version Email this Page

Version: 3.6.2 Rating:
Released: 11-25-2006 Last Update: Never Installs: 251
Template Edits
Additional Files  
No support by the author.

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 -->
(this will make it snow on all areas of your forum)

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 12-05-2008, 11:32 PM
Ev!L ErN!E Ev!L ErN!E is offline
 
Join Date: Feb 2006
Location: Michigan
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by angelpie View Post
hmmm not sure if i am doing this right? i cant get it to work! maybe im putting it in the wrong area in the ftp? i know its root its just been so long since i edited! the root is your public html area right? lol probably not
Your forums 'root' is the main folder that contains your forum files (ie the folder you installed your vB into)... so in your ftp look for the forum folder, or whatever the folders name is that you installed vB into, click on it and place the .js file in that folder and then do the edit in your stylemanger as explained above.

Hope that helps...

As for the problem with Firefox I do not know... I only use IE 7, sorry.
Reply With Quote
  #113  
Old 12-07-2008, 05:33 PM
exel exel is offline
 
Join Date: Jan 2008
Location: Southern California
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome
Reply With Quote
  #114  
Old 12-07-2008, 06:27 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks...
Reply With Quote
  #115  
Old 12-07-2008, 08:58 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL, I see DD is everywhere

Anyways same idea, another thread

https://vborg.vbsupport.ru/showpost....1&postcount=28

S-MAN
Reply With Quote
  #116  
Old 12-07-2008, 11:06 PM
Trickster303 Trickster303 is offline
 
Join Date: Oct 2006
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trickster303 View Post
Works just fine for me! Thanks

Wanted to make more snow, and made changes as such in the java script:

var num = 100; //Number of flakes
var timer = 30; //setTimeout speed. Varies on different comps

But nothing changed. Any suggestions as to get more flakes? Size is fine.
Thanks
Time to start the Xmas theme skin up again, and I have this mod on the skin. I asked last xmas if anyone had successfully increased the number of flakes as per above, and I see there have not been any responses, so will check again. Has anyone had any luck? If so how, as nothing changes by adjusting like I said above.
I don't want .gif images falling down the screen, I like this mod.
Appreciated.
Thanks
Reply With Quote
  #117  
Old 12-07-2008, 11:16 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trickster303 View Post
Time to start the Xmas theme skin up again, and I have this mod on the skin. I asked last xmas if anyone had successfully increased the number of flakes as per above, and I see there have not been any responses, so will check again. Has anyone had any luck? If so how, as nothing changes by adjusting like I said above.
I don't want .gif images falling down the screen, I like this mod.
Appreciated.
Thanks
In the snow.js file, find:

Code:
//Configure here.

var num = 40;   //Number of flakes
var timer = 30; //setTimeout speed. Varies on different comps

//End.
And change to suit your needs, just remember it may look better w/ more but some members may not like toooo much .

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.
You can copy then paste over the contents of your snow.js and try it then. Perhaps it's just an issue w/ you needing to clear your cookies/cache etc after you change and re-upload the file. Try that and post back however changing the variables should work!
Reply With Quote
  #118  
Old 12-09-2008, 03:32 AM
kylek kylek is offline
 
Join Date: Oct 2003
Location: British Columbia, Canada
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine with 3.8.0 Beta 4!
Reply With Quote
  #119  
Old 12-10-2008, 02:55 PM
Stryker412 Stryker412 is offline
 
Join Date: May 2005
Posts: 326
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same issue last year, on FF there are no where near as many flakes as IE.
Reply With Quote
  #120  
Old 12-15-2008, 06:49 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #121  
Old 12-17-2008, 05:01 PM
Collectors Collectors is offline
 
Join Date: Jul 2005
Location: Netherlands
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05101 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete