Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Questions



Please Register to get full access to the forums.
Reply
 
LinkBack Thread Tools Display Modes



#1   11-27-2008, 09:11 AM
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee ArnyVee is a jewel in the rough Join Date: Apr 2008 Location: South Florida
iTrader: (0)
Illegal to sell used toys?
Snow and Leaves for your site! :D


Check out my forum home for a new little 'touch' towards the top....

Walt Disney Boards - Message Boards & Forum Discussing The Genius Of Walter Elias Disney!

....and it's all due to this mod

Some think it's sorta childish (hey, we're a Disney site! ) and it's just a little DynamicDrive code from this mod....

Snow for your site :-) - vBulletin.org Forum

....kinda fun and adds a little 'touch' to your sites.
--------------------
Walt Disney Boards
Walt Disney Buddies
Glam Rock Talk : Under Construction :D
Quote   |  



#2   12-02-2008, 10:38 PM
Soliloquy is a jewel in the rough Join Date: Jun 2007 Location: New York City
iTrader: (0)
Re: Snow and Leaves for your site! :D


I've added the (Javascript pixels version) snow to my site but haven't turned it or the Christmas skin on yet
--------------------
Science Chats | Disabled NYC | The Chic Petite
Quote   |  



#3   12-07-2008, 06:31 PM
glennybee is a jewel in the rough Join Date: Mar 2008 Location: Scotland
iTrader: (0)
Hi
Re: Snow and Leaves for your site! :D


Arny does this slow your site down or increase page loading times?
Quote   |  



#4   12-07-2008, 06:36 PM
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee ArnyVee is a jewel in the rough Join Date: Apr 2008 Location: South Florida
iTrader: (0)
Illegal to sell used toys?
Re: Snow and Leaves for your site! :D


It's slows things down just a bit for me. But, I'm not gonna have it for too much longer. After a couple of weeks, it goes away. So, just wanted something festive like that as a little 'touch' on the site. But, it's definitely not something that you should have all the time.
--------------------
Walt Disney Boards
Walt Disney Buddies
Glam Rock Talk : Under Construction :D
Quote   |  



#5   12-08-2008, 06:33 AM
glennybee is a jewel in the rough Join Date: Mar 2008 Location: Scotland
iTrader: (0)
Hi
Re: Snow and Leaves for your site! :D


Thanks Arny, might give it a go.
Quote   |  



#6   12-08-2008, 12:48 PM
Soliloquy is a jewel in the rough Join Date: Jun 2007 Location: New York City
iTrader: (0)
Re: Snow and Leaves for your site! :D


In the spring I plan to make a version with falling cherry blossom petals
--------------------
Science Chats | Disabled NYC | The Chic Petite
Quote   |  



#7   12-08-2008, 12:49 PM
Blake2181 is a jewel in the roughBlake2181 is a jewel in the rough Join Date: Mar 2008
iTrader: (0)
Re: Snow and Leaves for your site! :D


Here is another version that does not drag on your site much.

Code:
//Snow - http://www.btinternet.com/~kurt.grigg/javascript

if  ((document.getElementById) && 
window.addEventListener || window.attachEvent){

(function(){

//Configure here.

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

//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.
Its just a javascript...It can be edited to basicly do whatever you want.

To use it save as snow.js with any editor. Then call it with something like this:


<!-- Start Snow For Christmas Code -->
<script type="text/javascript" src="snow.js"></script>
<!-- End Snow For Christmas Code -->

But yeah people forget how much fun you can have with stuff like this . You might want to also add a custom mouse cursor. Maybe a Xmas tree or something. Would be nice touch.
--------------------
Out Of Work Admin
Quote   |  
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A good site to find out stats about your own site glennybee General Discussion 22 11-30-2008 07:24 PM
Umm...what's the name of the hack where if someone leaves your page.... ArnyVee vBulletin Questions 7 08-11-2008 08:04 AM
"Snow on text" tutorials Soliloquy Photoshop Tutorials and Graphic Resources 7 07-21-2008 05:36 AM
Wikipedia leaves 100 Million dollars on the table Brent General Discussion 13 10-18-2007 04:02 AM
Snow and Mud.com Brandon vBulletin Setup Clients 0 06-05-2007 09:32 PM


All times are GMT -6. The time now is 07:10 PM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions
vBulletin Skins, Styles, Templates, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory