PDA
$threadinfo[title]
-


The Ice Man
December 11th, 2001, 15:38
this is a pretty cool script for he board, i use it on one of my boards, looks really nice, easy to add too, just go to the admin controls and go down to templats, and then go to forum display template, (also the forum homepage template) and add this code right under the <body*> tag

<script language="JavaScript1.2" src=http://us.shop1.yimg.com/shopping.yimg.com/js/snow2.js></script>

no class files or anything needed, real neat script

i aint going to tell you what it doe, u gotta try it :p

if anyone can figure out how to make it loop let me know

mesman00
December 12th, 2001, 03:01
cool script, i used it on my website!, check out the link below if ya want to, but i couldn't get it to loop either!

The Ice Man
December 12th, 2001, 07:03
your link doesnt work :cry:

mesman00
December 12th, 2001, 14:21
thats funny, it seems to work fine for me, tryit again, anyone else ever have a problem with my link?

RatTrap
December 12th, 2001, 16:52
download the javascript file.. and then when your browsing thru the code.. take away this part


setTimeout("sunshine()", 30000);

function sunshine()
{
snowSwitch('off');return false;
}


what it does is make the script timeout (quit) after 30 seconds.. if you want.. you can change the 30 000 to 60 000 and you get it up for a minute.. and so on..

also..

you can add more flakes by changing the value on the


var numflakes = 20;


to for example 50.. you'll see more flakes on the screen on the same time.. and if you wanna hang up ppls browsers.. just set it to a stupid number like 1500 or sumthing like that :D..

another


var swaymax = 20;


change this if you want the flakes to sway more..

anyways.. that script was pretty good.. but it had a bunch of stuff you don't really need to have in there for your website.. i sudgest editing so you only have the parts you need from it.. might teach you some javascript while your at it :)..

cheers :xmas:..

The Ice Man
December 12th, 2001, 17:06
wtf

umm, whered u get all this from? gah, all i did was snatch the code from wahoo shopping, so its just linked of them, thats why i cant edit anything, if u know how to get original code and stuff, pls post the whole thing,

thanks :D

RatTrap
December 12th, 2001, 17:41
hehe ehm hmmm.. i know it can be a lil hard to figure out for ppl that havent been around to long.. but ok:

<script language="JavaScript1.2" src=http://us.shop1.yimg.com/shopping.yimg.com/js/snow2.js></script>

if you see what's bold.. you can just copy&paste it into your browser and it'll start a download for you.. it's very very simple isn't it?.. all you do after that is save the file on your website after you edit it.. and on your page change the "src" parameter..

tip.. if your gonna link to a file on your own web directory.. never use http://.. use "/" and ".." to move thru the directory hirearchy instead.. saves the server some time..

The Ice Man
December 12th, 2001, 18:05
you are a god!



heres my own version, updated, abot 30 flakes, no timer :p

my lil blizzard :D

hey is there a code to make the flakes random colors?


-edit-

gah, cant attach that :(, ok, uploaded it, just download from here, pls dont link off my server! www.rocketblast.net/~tangier/ice/snow2.js

RatTrap
December 12th, 2001, 19:01
sounds very weird.. works just fine for me.. the one on your link at least works without problems for me.. you sure you checked if your still linking to an old unedited one? :p..

other thing you could do is just make them into comments..
just add // before the row you don't want the browser to try to execute.. or if you have a section you wanna comment out of the code (rem).. just add /* in the beginning and */ at the end.. like so:


//setTimeout("sunshine()", 30000);

/*
function sunshine()
{
snowSwitch('off');return false;
}
*/


all i can say is it works for moi.. if you can't get it to work.. well i dunno what your doing wrong :p.. and bout the colors.. those are pictures.. if you go thru the code you'll see some images being loaded into an array variable.. probably not too dificult to change that to your own pictures and add more pics too.. i sudgest going thru the code and actually trying to understand it.. programing in javascript is very simple compared to real programing.. most of the stuff is in plain english.. just it jumps around alot..

hiidy-ho

The Ice Man
December 12th, 2001, 19:03
sory about that, i got it working, i uploaded it to the forum display and forgot to also up it to the foru homepage, so when i saw it on the forum homepage i saw it wasnt working (course nt i didnt up it :rolleyes: )

anyways, working great now, thanks

Eagle
December 12th, 2001, 20:58
But any webmaster would want to make his page self-reliant so you need to download the following images, upload them to your own server and then change the values in the "flakes" array. I mean, what would happen if that us.yimg.com webpage went down. You'd have floating X's coming down through your webpage.


http://us.yimg.com/i/sh/hol/snwflk.gif
http://us.yimg.com/i/sh/hol/snwflk2.gif
http://us.yimg.com/i/sh/hol/snwflk3.gif
http://us.yimg.com/i/sh/hol/snwflk4.gif


var flakes = Array("relative path here/snwflk.gif","relative path here/snwflk2.gif","relative path here/snwflk3.gif","relative path here/snwflk4.gif");

The Ice Man
December 12th, 2001, 21:02
floating X's would be cool :p

might just have to try that :D

Eagle
December 12th, 2001, 21:17
You could also add your own snow flakes that way.

Eagle
December 12th, 2001, 21:21
After analyzing this code, I have one question, What is the launchRadio Function for. You can remove that. As well as the Getcookie and HasApp functions, they serve no purpose at all to the execution of the script. This is some very sloppy coding.

The Ice Man
December 12th, 2001, 21:29
hehe, underdstand, this code was stolen from yahoo shopping :p

and those are functioning, its just that they are used for something else, like i think on yahoo shopping you hear music, i dunno for sure, and im not sure about the get cookie code

mesman00
December 12th, 2001, 23:45
hey ice man, what is the link to ur webpage?

RatTrap
December 13th, 2001, 06:39
actually the coding is allright.. it's just it includes a hell of a bunch of stuff you don't really need.. as i said b4.. but i only like this code though coz it involves parts that are easy to learn.. and easy to kinda get you started on something more interesting with javascript.. it's why i sudgested you guys go thru the code and try to figure it out on your own..

you can strip almost half the code and in general you don't even need the gifs.. you could make a "." in diferent colours sway down from top to bottom.. would probably look better.. then if you wanna get really advanced.. you could make sure your page uses layer/divs.. make a position timeset funtion.. and then make them stick to the borders of your tables in your layers/divs.. would look like the snow is actually snowing on the tables of your website.. and if you REALLY wanna go advanced ;).. you can make them stick to your letters too.. after a minute i guess it would look like it had been snowing on your letters :D..

Slougi
December 13th, 2001, 10:44
then if you wanna get really advanced.. you could make sure your page uses layer/divs.. make a position timeset funtion.. and then make them stick to the borders of your tables in your layers/divs.. would look like the snow is actually snowing on the tables of your website.. and if you REALLY wanna go advanced .. you can make them stick to your letters too.. after a minute i guess it would look like it had been snowing on your letters ..
Why don't you do it to the Apollo homepage? ;)

RatTrap
December 13th, 2001, 12:35
nah.. if i was to work on any website right now there would be much more related things to do.. and i know those things don't take me just a few hours to make.. more like maybe a day or two.. wich i don't have the time for.. and a script that did that would take.. me at least.. a day or two to do.. even though i know how it works.. to build it would take alot of time and dedication.. i don't have that kind of time to spare.. only an hour here.. an hour there.. so it's why i'm not really helping any website atm..

Slougi
December 13th, 2001, 12:44
heh, take it easy ;)

RatTrap
December 13th, 2001, 15:30
hmm.. i think that is my point :p.. i AM taking it easy..

Slougi
December 14th, 2001, 14:29
umm. alright :P

Zero
December 18th, 2001, 11:32
Ho ho ho and a merry christmas to all :xmas:

Spinal
December 28th, 2001, 01:39
I don't think anyone cares about this, but we over @ nintendo64HQ have snow :P (its time to remove it soon tho)