Falling Snow Help!!!!!!!!!!!! ASAP

Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 12:01 pm

Heya I Know You Can Get Scrits That Do Falling Snow But Only on the Homepage Is There Anyway of Doing It So Its On All Pages?
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by Adiex on January 2nd 2009, 12:43 pm

Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 2:54 pm

They Dont tell You How To Do It All Over The Pages I Dont Want It Just On Homepage I Want It On Every Page
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by Adiex on January 2nd 2009, 3:14 pm

hmm in that case you have to host your javascript on any free host.

For example take a look to this script.
Code:
<script type="text/javascript" src="http://boriskuzmanov.1sthost.org/sneg.js"></script>
<< i just grab somone script, too lazy make it myself Smile

copy script above & paste it on your site description
Admin panel :: General :: configuration :: Site Description :: Save

Btw, paste a javascript on every pages can make you forum really2 slow because its basically load the javascript everytime you refresh your forum page. so, its up to you! Smile

Another option is pasting your javascript on custom new HTML pages, ill explain later if you still interested to know Wink
Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 3:46 pm

Ok Then Tell Me About That
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 4:07 pm

Posted Below in A Code


Last edited by --daz-2k7-- on January 2nd 2009, 4:27 pm; edited 1 time in total
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by Adiex on January 2nd 2009, 4:13 pm

hello,
please put an [*code][/code*] tags (without star (*) before & and at the end of you javascript there. its simply mess up this this thread Wink

ill edit this pages later to tell you how to do it Smile
Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 4:26 pm

Code:
<script>

 //Here you can add your own picture for snow. Just change the url
var snowsrc="http://i13.servimg.com/u/f13/11/52/70/02/snowba10.png"
//how many snowflakes there will be (currently 12)
var no =40;
//How fast will the snow disappear (0 is never)
var hidesnowtime = 0;
//The height the snow will reach before it disappears ("windowheight" or "pageheight")
var snowdistance = "pageheight";
///////////////////////////////End of Settings///////////////////////////////////
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest()
{
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;
 
if (ns6up)
{
  doc_width = self.innerWidth;
  doc_height = self.innerHeight;
}
else
if (ie4up)
{
  doc_width = document.body.clientWidth;
  doc_height = document.body.clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();

for (i = 0; i < no; ++ i)
{
  dx[i] = 0;
  xp[i] = Math.random()*(doc_width-50);
  yp[i] = Math.random()*doc_height;
  am[i] = Math.random()*20;
  stx[i] = 0.02 + Math.random()/10;
  sty[i] = 0.7 + Math.random();
  if (ie4up||ns6up)
  {
      if (i == 0)
      {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://rftactical.darkbb.com/index.htm\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
      }
      else
      {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
      }
  }
}

function snowIE_NS6()
{
  doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
  doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
  for (i = 0; i < no; ++ i)
  {
      yp[i] += sty[i];
      if (yp[i] > doc_height-50)
      {
        xp[i] = Math.random()*(doc_width-am[i]-30);
        yp[i] = 0;
        stx[i] = 0.02 + Math.random()/10;
        sty[i] = 0.7 + Math.random();
      }
      dx[i] += stx[i];
      document.getElementById("dot"+i).style.top=yp[i]+"px";
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
  }
  snowtimer=setTimeout("snowIE_NS6()", 10);
}

function hidesnow()
{
  if (window.snowtimer) clearTimeout(snowtimer)
      for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}
   

if (ie4up||ns6up)
{
  snowIE_NS6();
  if (hidesnowtime>0)
      setTimeout("hidesnow()", hidesnowtime*1000)
}
</script>
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by Adiex on January 2nd 2009, 4:59 pm

hi,
Just for info, not all javascript type work if you embed it on html pages, for example your code above is not working at all Sad

BTW, this code should working on html pages. Simply create a new html pages

ACP :: Modules :: HTML :: HTML pages management :: Create new HTML pages

Paste this code on your html box, Before save don't forget to set 'Do you wish to use your forum page header and page footer ?' option to 'NO'. Now go back to html pages management.

ACP :: Modules :: HTML :: HTML pages management

Copy your new HTML pages link address & put it on this code :
Code:
<script type="text/javascript" src="http://YOUR HTML LINK.com"></script>
Now you can embed this code on site description follow step on previous post Smile

try look sample here : HERE

ps: im still prefer to use hosted js method instead of this because its give you a wierd browser bar problem lmoa Razz
Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 5:09 pm

This Does Not Appear To be Working For Me My Forum Link Is Vfkfamily.tk
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by Adiex on January 2nd 2009, 5:13 pm

its simply because your javascript there is not working at all Smile
try use this one :
Code:
//Snow - http://www.btinternet.com/~kurt.grigg/javascript

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

(function(){

//Configure here.

var num = 50;  //Number of flakes
var timer = 25; //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.
Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by --daz-2k7-- on January 2nd 2009, 5:14 pm

Thnak You Am I Able To Change The Image To Fireworks or ANything? or Do You Have Fireworks Scripts?
avatar
--daz-2k7--
Forumember

Posts : 97
Reputation : 0
Language : english

View user profile

Back to top Go down

Falling Snow Help!!!!!!!!!!!! ASAP Empty Re: Falling Snow Help!!!!!!!!!!!! ASAP

Post by Adiex on January 2nd 2009, 5:19 pm

im dont have it sorry (because i dont celebrate christmas Razz)

try search it on google Smile
Adiex
Adiex
Active Poster

Male Posts : 1014
Reputation : 33
Language : er?
Location : back alive & kicking xD

View user profile

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum