The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Snow on my site... ?

+18
alb*angel
Raph95
Naki
Decibel
milanche
waqardaniel
Shawn Yue
mcaps
hoangcun
D@nny
dhanieowen
michael08gr
zinex
Luky
Terremer
Nessa
ScandalosMusic
A1Team
22 posters

Page 1 of 2 1, 2  Next

Go down

snow - Snow on my site... ? Empty Snow on my site... ?

Post by A1Team December 5th 2007, 10:10 pm

Hello.
I have a problem with JS(Java Script) Code... I can't add it..
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.

Whats wrong with the code? Embarassed
A1Team
A1Team
Forumember

Male Posts : 124
Reputation : 0
Language : English, Macedonian, Serbian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by ScandalosMusic December 6th 2007, 6:06 pm

me too

mine is:
Code:
    </head>
    <script>
    // seteaza numarul de fulgi (nu se recomanda mai mult de 30-40)
    var snowmax=40

    // seteaza culorile fulgilor.Puteti adauga cate culori vreti
    var snowcolor=new Array("#ffffff","#ffffff","#ffffff")

    // seteaza fonturile pentru fulgi. Si aici puteti adauga si alte fonturi daca vreti
    var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

    // seteaza caracterul pentru fulgi (recomandat: *)
    var snowletter="*"

    // seteaza viteza de cadere a fulgilor (valori recomandate: intre 0.3 to 2)
    var sinkspeed=0.20

    // seteaza dimensiunea maxima a fulgilor
    var snowmaxsize=20

    // seteaza dimensiunea minima a fulgilor
    var snowminsize=10

    // seteaza zona de cadere a fulgilor
    // 1 pentru cadere peste tot, 2 pentru stanga a ecranului
    // 3 pentru centru, 4 pentru dreapta ecranului
    var snowingzone=1

    ///////////////////////////////////////////////////////////////////////////
    // AICI SE TERMINA PARTEA DE CONFIGURARE
    ///////////////////////////////////////////////////////////////////////////


    // NU EDITATI ACESTE VALORI DE MAI JOS
    var snow=new Array()
    var marginbottom
    var marginright
    var timer
    var i_snow=0
    var x_mv=new Array();
    var crds=new Array();
    var lftrght=new Array();
    var browserinfos=navigator.userAgent
    var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
    var ns6=document.getElementById&&!document.all
    var opera=browserinfos.match(/Opera/)
    var browserok=ie5||ns6||opera

    function randommaker(range) {
    rand=Math.floor(range*Math.random())
    return rand
    }

    function initsnow() {
    if (ie5 || opera) {
    marginbottom = document.body.clientHeight
    marginright = document.body.clientWidth
    }
    else if (ns6) {
    marginbottom = window.innerHeight
    marginright = window.innerWidth
    }
    var snowsizerange=snowmaxsize-snowminsize
    for (i=0;i<=snowmax;i++) {
    crds[i] = 0;
    lftrght[i] = Math.random()*15;
    x_mv[i] = 0.03 + Math.random()/10;
    snow[i]=document.getElementById("s"+i)
    snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
    snow[i].size=randommaker(snowsizerange)+snowminsize
    snow[i].style.fontSize=snow[i].size
    snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
    snow[i].sink=sinkspeed*snow[i].size/5
    if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
    if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
    if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
    if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
    snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
    snow[i].style.left=snow[i].posx
    snow[i].style.top=snow[i].posy
    }
    movesnow()
    }

    function movesnow() {
    for (i=0;i<=snowmax;i++) {
    crds[i] += x_mv[i];
    snow[i].posy+=snow[i].sink
    snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
    snow[i].style.top=snow[i].posy

    if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
    if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
    if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
    if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
    if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
    snow[i].posy=0
    }
    }
    var timer=setTimeout("movesnow()",50)
    }

    for (i=0;i<=snowmax;i++) {
    document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
    }
    if (browserok) {
    window.onload=initsnow
    }
    </script>

on my preview page it works : http://scandalosmusic.all-up.com/fulgi-de-zapada-h1.htm
...but on my forum not Sad
i tried by html pages management but it write (ERROR)
avatar
ScandalosMusic
New Member

Posts : 5
Reputation : 0
Language : Romanian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Nessa December 6th 2007, 6:16 pm

Hi Hello I have snow on my forum as well. My Co Admin added the code in the site description in the admin panel. Is that where you have placed your code? and it's still not working? blackeye
Nessa
Nessa
Energetic

Female Posts : 6203
Reputation : 128
Language : English

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Terremer December 6th 2007, 6:18 pm

Hi,
For this, you can use the générator in the english version :
-> Générator

Cordially,
Terremer Wink
Terremer
Terremer
Forumember

Male Posts : 34
Reputation : 0
Language : French

http://my-forum-is-a-french-forum.com

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by ScandalosMusic December 6th 2007, 6:21 pm

whats your code ? and please explain me step to step ...i don not understand ...
avatar
ScandalosMusic
New Member

Posts : 5
Reputation : 0
Language : Romanian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 6th 2007, 8:48 pm

I am the co-admin Nessa was talking about.I used the script generator that Terremer posted . Use it to create the script and then add it to admin panel=>General=>Configuration=>Configuration look fro site description box and add the code in that box.
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Guest December 6th 2007, 9:28 pm

Is there a smaller code, as I thought we could only use up to 200 characters in our 'site description' field? I'd like to use this, too. Smile
avatar
Guest
Guest


Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 6th 2007, 10:21 pm

well if you use that script generator it will be small enough to be able to add it in the site description box.
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by ScandalosMusic December 7th 2007, 2:48 pm

where do you find this codes???....i don not know what I should paste in this fields ...Sad
please help me with more details
avatar
ScandalosMusic
New Member

Posts : 5
Reputation : 0
Language : Romanian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 7th 2007, 3:20 pm

Look for this link to make your scriptClick Here
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by ScandalosMusic December 7th 2007, 3:22 pm

i have looked for but i don`t know to use....have u yahoo id...i can speak romanian..?
or please add me....my yahoo id is vipsisu
avatar
ScandalosMusic
New Member

Posts : 5
Reputation : 0
Language : Romanian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by zinex December 7th 2007, 6:09 pm

Code:
<MARQUEE style="Z-INDEX: 1; LEFT: 127px; WIDTH: 16px; POSITION: absolute; TOP: 150px; HEIGHT: 512px" scrollAmount=1 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 165px; WIDTH: 16px; POSITION: absolute; TOP: 170px; HEIGHT: 382px" scrollAmount=7 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 212px; WIDTH: 16px; POSITION: absolute; TOP: 190px; HEIGHT: 346px" scrollAmount=4 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 263px; WIDTH: 16px; POSITION: absolute; TOP: 180px; HEIGHT: 528px" scrollAmount=3 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 325px; WIDTH: 16px; POSITION: absolute; TOP: 160px; HEIGHT: 450px" scrollAmount=5 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 235px; WIDTH: 16px; POSITION: absolute; TOP: 190px; HEIGHT: 277px" scrollAmount=7 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 140px; WIDTH: 16px; POSITION: absolute; TOP: 150px; HEIGHT: 246px" scrollAmount=7 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 287px; WIDTH: 16px; POSITION: absolute; TOP: 170px; HEIGHT: 274px" scrollAmount=5 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 111px; WIDTH: 16px; POSITION: absolute; TOP: 230px; HEIGHT: 235px" scrollAmount=3 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 358px; WIDTH: 16px; POSITION: absolute; TOP: 190px; HEIGHT: 439px" scrollAmount=3 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 390px; WIDTH: 16px; POSITION: absolute; TOP: 150px; HEIGHT: 527px" scrollAmount=3 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 437px; WIDTH: 16px; POSITION: absolute; TOP: 170px; HEIGHT: 447px" direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 477px; WIDTH: 16px; POSITION: absolute; TOP: 200px; HEIGHT: 384px" scrollAmount=7 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 552px; WIDTH: 16px; POSITION: absolute; TOP: 170px; HEIGHT: 494px" direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 595px; WIDTH: 16px; POSITION: absolute; TOP: 200px; HEIGHT: 446px" scrollAmount=4 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 535px; WIDTH: 16px; POSITION: absolute; TOP: 170px; HEIGHT: 393px" scrollAmount=4 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 612px; WIDTH: 16px; POSITION: absolute; TOP: 200px; HEIGHT: 336px" scrollAmount=2 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 646px; WIDTH: 16px; POSITION: absolute; TOP: 250px; HEIGHT: 384px" direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 694px; WIDTH: 16px; POSITION: absolute; TOP: 290px; HEIGHT: 521px" scrollAmount=4 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 650px; WIDTH: 16px; POSITION: absolute; TOP: 180px; HEIGHT: 201px" direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 688px; WIDTH: 16px; POSITION: absolute; TOP: 160px; HEIGHT: 252px" scrollAmount=5 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 725px; WIDTH: 16px; POSITION: absolute; TOP: 200px; HEIGHT: 441px" scrollAmount=3 direction=down><SPAN class=falling2>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 752px; WIDTH: 16px; POSITION: absolute; TOP: 150px; HEIGHT: 528px" scrollAmount=2 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 900px; WIDTH: 16px; POSITION: absolute; TOP: 150px; HEIGHT: 528px" scrollAmount=2 direction=down><SPAN class=falling1>.</SPAN></MARQUEE>
<MARQUEE style="Z-INDEX: 1; LEFT: 798px; WIDTH: 16px; POSITION: absolute; TOP: 180px; HEIGHT: 438px" scrollAmount=3 direction=down><SPAN class=falling2>.</SPAN></MARQUEE><A style="DISPLAY: block" href="http://mypsacehotline.com"></A>

this is what i use on my forum, its very discreet and goes in the homepage message box.
zinex
zinex
Hyperactive

Female Posts : 2804
Reputation : 93
Language : scotch och aye!
Location : Whats harder than a rock?!

http://asylum.forumotion.co.uk/forum.htm

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by ScandalosMusic December 7th 2007, 6:34 pm

where do you paste this all?
avatar
ScandalosMusic
New Member

Posts : 5
Reputation : 0
Language : Romanian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 7th 2007, 6:51 pm

What zinex posted needs to be posted here in the admin panel=>general=>Homepage=>Configuration in the homepage message, but the problem is that if you do that it will only work for the homepage, not the rest of the forum.
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Guest December 8th 2007, 12:53 pm

Works beautifully thanks zinex santa Very Happy
avatar
Guest
Guest


Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by michael08gr December 8th 2007, 1:08 pm

interesting@!
avatar
michael08gr
Forumember

Posts : 25
Reputation : 0
Language : english

http://www.pcripgames.com

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by dhanieowen December 8th 2007, 6:49 pm

Great!! Love it... my forum looks good. thanks Wink
dhanieowen
dhanieowen
New Member

Posts : 14
Reputation : 0
Language : English, Indonesian

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by D@nny December 8th 2007, 11:06 pm

Thank' s Zinex, it's really cool for the winter time & also i managed to have snow on every page, you only have to put the script in the free space of the => The Script Generator & that's it, you get snow on every single page of you forum. Very good
D@nny
D@nny
New Member

Male Posts : 5
Reputation : 0
Language : English & French
Location : Pas-De-Calais (France)

http://chatworldnetwork.forumotion.com

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by hoangcun December 9th 2007, 6:34 am

luky wrote:What zinex posted needs to be posted here in the admin panel=>general=>Homepage=>Configuration in the homepage message, but the problem is that if you do that it will only work for the homepage, not the rest of the forum.
I use this code at web https://illiweb.com/ForumActif/ but but it only works in other meta tag and not work in Site Description. So Snow only show in the homepage. When iI put snow code in site description it will lose. I dont know why, help me please
hoangcun
hoangcun
Forumember

Male Posts : 70
Reputation : 0
Language : Vietnamese, English
Location : Ha Noi

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 9th 2007, 9:35 am

I don't know why either, I used the code in site description and it works perfectly for the whole site. Sorry but don't know how to help you Sad
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by hoangcun December 9th 2007, 11:37 am

luky wrote:I don't know why either, I used the code in site description and it works perfectly for the whole site. Sorry but don't know how to help you Sad
Thank you anyway. But I want to show my problem at here. When I put snow code in Site Description and press save button, Snow code is disappeared, old site description text still exit. Before I know this code I put in site description some normal texts, like '' Hello all ''. It is awayls exit and only can replace by other normal text Sad
hoangcun
hoangcun
Forumember

Male Posts : 70
Reputation : 0
Language : Vietnamese, English
Location : Ha Noi

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 9th 2007, 12:28 pm

The site description was also a normal one(something like Hello!) but a simply copied and pasted it over the old description. Don't know how to help you though Sad
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by mcaps December 11th 2007, 6:12 am

I don't know how to use the generater. Does anyone know a good snow script that works on the forums? Doesn't need to be for every page, just the home page, preferably bigger snow that the little dots as given above.
avatar
mcaps
New Member

Posts : 24
Reputation : 0
Language : English

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 11th 2007, 9:10 am

Try this one
Code:
<SCRIPT type="text/javascript">
/*
Snow Fall 1 - no images - Java Script
Visit http://rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#AAAACC","#DDDDFF","#CCCCDD","#F3F3F3","#F0FFFF")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended: * )
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximum-size of your snowflakes
var snowmaxsize=22

// Set the minimal-size of your snowflakes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

  /*
  //  * NO CONFIGURATION BELOW HERE *
*/

// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/) 
var browserok=ie5||ns6||opera

function randommaker(range) {      
   rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
   if (ie5 || opera) {
      marginbottom = document.body.clientHeight
      marginright = document.body.clientWidth
   }
   else if (ns6) {
      marginbottom = window.innerHeight
      marginright = window.innerWidth
   }
   var snowsizerange=snowmaxsize-snowminsize
   for (i=0;i<=snowmax;i++) {
      crds[i] = 0;                     
       lftrght[i] = Math.random()*15;       
       x_mv[i] = 0.03 + Math.random()/10;
      snow[i]=document.getElementById("s"+i)
      snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
      snow[i].size=randommaker(snowsizerange)+snowminsize
      snow[i].style.fontSize=snow[i].size
      snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
      snow[i].sink=sinkspeed*snow[i].size/5
      if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
      if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
      if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
      if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
      snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
      snow[i].style.left=snow[i].posx
      snow[i].style.top=snow[i].posy
   }
   movesnow()
}

function movesnow() {
   for (i=0;i<=snowmax;i++) {
      crds[i] += x_mv[i];
      snow[i].posy+=snow[i].sink
      snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
      snow[i].style.top=snow[i].posy
      
      if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
         if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
         if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
         if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
         if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
         snow[i].posy=0
      }
   }
   var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
   document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
   window.onload=initsnow
}
</SCRIPT>
<p><font face="arial" size="-2">Free JavaScript from </font><br><font face="arial, helvetica" size="-2"><a href="http://rainbow.arch.scriptmania.com/scripts/">Rainbow Arch</a></font></p>


add it in the Homepage description box.
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Shawn Yue December 11th 2007, 12:15 pm

i lost my pw at the script generator pls help
Shawn Yue
Shawn Yue
Forumember

Male Posts : 111
Reputation : 0
Language : English And Chinese And Korean
Location : Korea

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by waqardaniel December 11th 2007, 8:51 pm

I am using snow flakes on my portal page and it really looks nice. You can go to Modules on left hand side click Portal Structure and then scroll down and click Custom Block. This will open the editor. Then fill in the table like this: Name of the block: Snowflakes, Use a Table Type click YES, Block Title Leave it blank and then open the HTML editor by clicking the Switch Editor Mode snow - Snow on my site... ? Switch10 then paste the following code

<DIV align=center><FONT face="Comic Sans MS" size=4>Christian Talk wishes you,&nbsp;a&nbsp;blessed Christmas and&nbsp;New Year</FONT><BR></DIV><MARQUEE style="Z-INDEX: 645; LEFT: 170px; POSITION: absolute; TOP: 70px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 220px; POSITION: absolute; TOP: 90px; HEIGHT: 250px" scrollAmount=5 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 270px; POSITION: absolute; TOP: 30px; HEIGHT: 370px" direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 320px; POSITION: absolute; TOP: 30px; HEIGHT: 340px" scrollAmount=7 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 240px; POSITION: absolute; TOP: 30px; HEIGHT: 70px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 140px; POSITION: absolute; TOP: 30px; HEIGHT: 50px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 290px; POSITION: absolute; TOP: 30px; HEIGHT: 60px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 100px; POSITION: absolute; TOP: 130px; HEIGHT: 80px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE></A><MARQUEE style="Z-INDEX: 645; LEFT: 360px; POSITION: absolute; TOP: 30px; HEIGHT: 330px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 390px; POSITION: absolute; TOP: 50px; HEIGHT: 400px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 600; LEFT: 440px; POSITION: absolute; TOP: 70px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 470px; POSITION: absolute; TOP: 100px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 560px; POSITION: absolute; TOP: 70px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 590px; POSITION: absolute; TOP: 100px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 520px; POSITION: absolute; TOP: 170px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 610px; POSITION: absolute; TOP: 200px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 650px; POSITION: absolute; TOP: 250px; HEIGHT: 340px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 690px; POSITION: absolute; TOP: 290px; HEIGHT: 380px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 660px; POSITION: absolute; TOP: 40px; HEIGHT: 70px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 690px; POSITION: absolute; TOP: 60px; HEIGHT: 90px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 720px; POSITION: absolute; TOP: 100px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 750px; POSITION: absolute; TOP: 170px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 780px; POSITION: absolute; TOP: 200px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 810px; POSITION: absolute; TOP: 250px; HEIGHT: 340px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 830px; POSITION: absolute; TOP: 100px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 860px; POSITION: absolute; TOP: 170px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 890px; POSITION: absolute; TOP: 200px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 920px; POSITION: absolute; TOP: 250px; HEIGHT: 340px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 950px; POSITION: absolute; TOP: 100px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 980px; POSITION: absolute; TOP: 170px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 1010px; POSITION: absolute; TOP: 200px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 1040px; POSITION: absolute; TOP: 250px; HEIGHT: 340px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 1070px; POSITION: absolute; TOP: 100px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 1100px; POSITION: absolute; TOP: 170px; HEIGHT: 300px" scrollAmount=4 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 1130px; POSITION: absolute; TOP: 200px; HEIGHT: 300px" scrollAmount=2 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE><MARQUEE style="Z-INDEX: 645; LEFT: 1160px; POSITION: absolute; TOP: 250px; HEIGHT: 340px" scrollAmount=3 direction=down><IMG src="http://www.123mycodes.com/fallingobject/objects/1945.gif" border=0></MARQUEE>
<DIV style="LEFT: 10px; WIDTH: 120px; POSITION: absolute; TOP: 10px; HEIGHT: 60px"><A href="http://www.123mycodes.com/" target=_blank></A></DIV><A title="Myspace Layouts, Graphics, Backgrounds, Comments, Cursors, Flash Toys and More" href="http://www.123mycodes.com/" target=_blank></A><BR>

Click save and go back to modules management and look for Snowflakes in Addition/deletion of personal modules and add it to the header and you will have falling and twinkling snowflakes on your portal page. If you want to put it on your Forum/Home page, then go to homepage and paste the code there.
avatar
waqardaniel
New Member

Male Posts : 7
Reputation : 0
Language : English

http://christian-talk.forumotion.com

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Shawn Yue December 12th 2007, 12:02 pm

Yeah My Website also have that Just Remember U Add This html code at the html code place

admin panel>general>homepage
if u want to see ur every forum snow
just go
admin panel>general>homepage>site description
or u just want the homepage snow u can copy the code into the html code place
Shawn Yue
Shawn Yue
Forumember

Male Posts : 111
Reputation : 0
Language : English And Chinese And Korean
Location : Korea

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by milanche December 15th 2007, 1:25 am

Luky wrote:Try this one
Code:
<SCRIPT type="text/javascript">
/*
Snow Fall 1 - no images - Java Script
Visit http://rainbow.arch.scriptmania.com/scripts/
  for this script and many more
*/

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#AAAACC","#DDDDFF","#CCCCDD","#F3F3F3","#F0FFFF")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended: * )
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximum-size of your snowflakes
var snowmaxsize=22

// Set the minimal-size of your snowflakes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1

  /*
  //  * NO CONFIGURATION BELOW HERE *
*/

// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/) 
var browserok=ie5||ns6||opera

function randommaker(range) {      
   rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
   if (ie5 || opera) {
      marginbottom = document.body.clientHeight
      marginright = document.body.clientWidth
   }
   else if (ns6) {
      marginbottom = window.innerHeight
      marginright = window.innerWidth
   }
   var snowsizerange=snowmaxsize-snowminsize
   for (i=0;i<=snowmax;i++) {
      crds[i] = 0;                     
       lftrght[i] = Math.random()*15;       
       x_mv[i] = 0.03 + Math.random()/10;
      snow[i]=document.getElementById("s"+i)
      snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
      snow[i].size=randommaker(snowsizerange)+snowminsize
      snow[i].style.fontSize=snow[i].size
      snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
      snow[i].sink=sinkspeed*snow[i].size/5
      if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
      if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
      if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
      if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
      snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
      snow[i].style.left=snow[i].posx
      snow[i].style.top=snow[i].posy
   }
   movesnow()
}

function movesnow() {
   for (i=0;i<=snowmax;i++) {
      crds[i] += x_mv[i];
      snow[i].posy+=snow[i].sink
      snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
      snow[i].style.top=snow[i].posy
      
      if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
         if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
         if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
         if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
         if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
         snow[i].posy=0
      }
   }
   var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
   document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
   window.onload=initsnow
}
</SCRIPT>
<p><font face="arial" size="-2">Free JavaScript from </font><br><font face="arial, helvetica" size="-2"><a href="http://rainbow.arch.scriptmania.com/scripts/">Rainbow Arch</a></font></p>


add it in the Homepage description box.

Hallo everybody!
I use this script for snow on my forum, but can someone explain me how to change speed of snow, number od snow?
And I'd like to know if it's possible to make snow fall from begining to end of my index page. Wink
avatar
milanche
New Member

Posts : 18
Reputation : 0
Language : english

http://zivetizajedno.userboard.net

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Luky December 15th 2007, 1:32 am

Hello! To modify the speed the following snow search the "var sinkspeed=006" line and change it to the number you want from 0.3 up to 2.
Sorry but you can't make the snow possible for the whole index page, just the title.
Luky
Luky
Energetic

Male Posts : 6106
Reputation : 264
Language : Romanian, English
Location : Bucharest, Romania

Back to top Go down

snow - Snow on my site... ? Empty Re: Snow on my site... ?

Post by Decibel December 15th 2007, 2:30 am

Luky wrote:Sorry but you can't make the snow possible for the whole index page, just the title.
santa My whole index page snows, although my script is different thyan the one posted.
Decibel
Decibel
Forumember

Male Posts : 201
Reputation : 10
Language : english
Location : Canada

http://decibels.forumsmusic.com

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

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