PDA

View Full Version : Forum Home Enhancements - Snow for your site :-)


UKBusinessLive
26 Nov 2008, 19:48
Hi Everyone ;)

Just found this great script on this site which lets you add a snow effect to your forums, its great to add on Christmas Day. The great thing about this script is that its free and you don't have to keep it just for snowing, you could add leaves, pumpkins (Halloween) for just about any graphic you want, credit goes to Sasa Skevin for creating such a good script.

You can see a DEMO HERE (http://www.dynamicdrive.com/dynamicindex3/snow.htm) on the Dynamicdrive homepage, its a great site with loads of scripts you could integrate within your forums.

Enjoy,

UKBusinessLive

-----

I have moved and edited this script for easy use by the members. I have added instructions and added the script to a file which is loaded.

This code is a free source from DynamicDrive.com. Users are NOT allowed to remove the copyrights.

Thanks,

-Roms :cool:


***********Update*****************

Just added a Valentine 10 x Hearts Collection, so you can use this as a treat on Valentines day

Enjoy

Winterworks
26 Nov 2008, 21:52
We kind of need the images.

UKBusinessLive
26 Nov 2008, 22:17
We kind of need the images.

Here you are

https://www.vbulletin.org/forum/external/2008/11/4.gif

There are images on the site which features in the link in my first post, or you can use any image you want. ;)

subz uk
26 Nov 2008, 22:30
My snow doesn't seem to show.

i added that code in the bottom in my header and added the snow image to outside of forum directory and linked to the snow image in the script.


maybe i am doing something wrong? :confused:

UKBusinessLive
26 Nov 2008, 22:39
My snow doesn't seem to show.

i added that code in the bottom in my header and added the snow image to outside of forum directory and linked to the snow image in the script.


maybe i am doing something wrong? :confused:

Have You added your picture url here??

//Configure below to change URL path to the snow image
var snowsrc="http://your directory.com/snow.gif"

Find:
var i, doc_width = 800, doc_height = 600;


and change the doc width and height to suit your forum 600 width and 600 height worked for me.

Find

var snowdistance = "pageheight";


and change "pageheight" for "windowheight"

;)

g0dfather1984
27 Nov 2008, 01:49
Thank you, works well!

ArnyVee
27 Nov 2008, 02:26
I'm assuming that if we'd like it to appear only on the forum home that we add it somewhere on the forum home template?

Any place in specific if we choose to go that route?

I think that I'm going to add the 'leaf' picture for the next week or so and then switch to the 'snowflake' :D

ArnyVee
27 Nov 2008, 03:19
Okay, got it to work only on forum home by going on forumhome template and placing just under the <head> tag :)

I'm using the "leaf" for the next week and a half or so and then I'll switch to the "snowflake" :D

CLICK HERE FOR DEMO: Walt Disney Boards (http://www.waltdisneyboards.com/forums.php)

Roms
27 Nov 2008, 04:33
Modification updated...

ArnyVee
27 Nov 2008, 04:44
Roms, anything different other than the actual instructions added?

Roms
27 Nov 2008, 04:56
Yes, a lot. This update is more streamlined and better for your forums. I would suggest you download the zip file and re-install the modification. You will be adding less code to your site... ;)

(if you want to edit the .js file to use your leaves do it with wordpad, notepad will mess it up... or just re-name your leaf file snowflake.gif.. LOL)

I will offer support as needed as this is UKBusinessLive modification, I am happy to help him become a Designer and will offer any support wanted. (Notice he now has the designed title :D).

ArnyVee
27 Nov 2008, 05:08
Gotcha! ;)

Thanks Roms. I was going to look into doing this myself. So, I'm glad that I didn't have to spend the time to do it. :D

Might want to include where to edit it in the .js file in the event that someone wanted to add a different image. Other than that, it's good.

Roms
27 Nov 2008, 05:25
Gotcha! ;)

Thanks Roms. I was going to look into doing this myself. So, I'm glad that I didn't have to spend the time to do it. :D

Might want to include where to edit it in the .js file in the event that someone wanted to add a different image. Other than that, it's good.

Added instructions to the zip file for using an alternate image... :D

UKBusinessLive
27 Nov 2008, 07:05
Thanks for the help Roms ;):)

Roms
27 Nov 2008, 07:08
Thanks for the help Roms ;):)

No problem, I'm glad to help. :D

UKBusinessLive
27 Nov 2008, 19:29
Okay, got it to work only on forum home by going on forumhome template and placing just under the <head> tag :)

I'm using the "leaf" for the next week and a half or so and then I'll switch to the "snowflake" :D

CLICK HERE FOR DEMO: Walt Disney Boards (http://www.waltdisneyboards.com/forums.php)

Your board looks great Arny :D I wonder how long it'll be before we see floating Mickies :D

I'm saving mine untill a week before Christmas:rolleyes:

I would like to say a mega thanks to Roms for helping me out here, Thanks buddy :)

ArnyVee
27 Nov 2008, 19:45
Floating Mickys? I'm way ahead of ya! ;)

Thanks to both of you for helping get the word out on this one. :D

arauf
28 Nov 2008, 10:48
Installed *

powerful_rogue
30 Nov 2008, 22:30
Hi,

Im using VBadvanced as my index page and was wondering if there was an easy way to get the snow to show on there as well as FORUMHOME?

UKBusinessLive
30 Nov 2008, 22:47
Hi,

Im using VBadvanced as my index page and was wondering if there was an easy way to get the snow to show on there as well as FORUMHOME? not sure as i've not tried but, give it a go

Just try adding this to the <body> of your VBadvanced index page



//Configure below to change URL path to the snow image
var snowsrc="snow.gif"
//Configure below to change number of snow to render
var no = 10;
//Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

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; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
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://dynamicdrive.com\"><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() { // IE and NS6 main animation function
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) { // iterate for every dot
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>



Don't forget to edit the top of the scrip and upload your snowflake images

Good Luck

:D

Bounce
30 Nov 2008, 23:08
Installed,tested and works well, will keep it for 1st day of snow here in scotland which shouldnae be far away LOL :up:

choccyclaire
01 Dec 2008, 11:04
Many thanks. :)

Virtualshiner
03 Dec 2008, 17:06
Is there any way to make this an option that can be changed in the ACP?

UKBusinessLive
03 Dec 2008, 18:25
Is there any way to make this an option that can be changed in the ACP?

I doubt it, Its a very bog standard java script, which some members will probably use just during the Christmas Period. I'm loading mine just before Christmas for probably the best part of a week, then its off to my script folder for next year.

To be honest once you've set the amount of snow and site size and uploaded your snowflake gif, theres nothing else to edit

Can't really think of much else to use it for

Sworm
06 Dec 2008, 19:37
Hi , good work UKB, but is possible to show the snow only on the home page of the portal (vb advanced) and on the homepage of the forum?

Thanks

UKBusinessLive
07 Dec 2008, 10:15
You may have to just add the code to the FORUMHOME page for the forum and in the index page for the VBAdavance but i've not tried it :o

Give it a go and see, remember to back up your originals, let us know how you got on :rolleyes:

Virtualshiner
07 Dec 2008, 16:27
Got it working on the vbAdvanced eventually.

If you have your forum in a folder like /forums you need to edit the location of the image file in the javascript file, save it and then re-upload and it should then work.

TheLastSuperman
07 Dec 2008, 17:27
Thanks for posting :D

I had done this w/o knowing about your post lol so good to see another DD Script!

I used a slightly different script though found here --> http://www.dynamicdrive.com/dynamicindex3/snownoimages.htm

Demo: (Different snow effect used than this mod) http://www.tournamentgamingworld.com/online/forumdisplay.php?f=21

You can use this too, pretty much follow the instructions on the DD page I linked to above ;)

(ohh and all my code was placed in the header template of each style we use for I use sub-forums w/ different syles so you can use what UKBusinessLive posted or what I linked to for different sub-forum styles OR place it all in your header or navbar template of your single style ;))

S-MAN

TheLastSuperman
07 Dec 2008, 23:29
Modification updated...

TY Roms... I'm an Avid DD User ;)

Edit (WHAT?!?!?!?! it's just me :D)

macc
08 Dec 2008, 00:21
Thanks - nice hack for dark style ...

regards

macc

TheLastSuperman
08 Dec 2008, 01:31
Thanks - nice hack for dark style ...

regards

macc

Well, let's not invade/hijack UK's thread but I thought I would show you more options!

Someone already beat me to posting it here, I found it also here --> http://www.vbulletin.org/forum/showthread.php?goto=newpost&t=132475

Some like the images, some like the dots lol.

They also have a "Rain" Effect via a Rain/Snow script found via --> http://www.dynamicdrive.com/dynamicindex3/rain.htm

Enjoy & Thanks again for more useful tweaks UKBusinessLive... ( Edit: Removed Message to not further hijack this thread, UK, please check your PM's :D !!!)

S-MAN

UKBusinessLive
08 Dec 2008, 07:04
Its cool S-Man, as long as we help each other, thats what we're here for :D

mojo8850
08 Dec 2008, 15:53
Awesome, Works Like A Charm

TheLastSuperman
08 Dec 2008, 16:32
Its cool S-Man, as long as we help each other, thats what we're here for :D

I'm always here to help people ;) so anytime... in my younger days terminology... Just HoLLa @ Ya BoI!!!!!!! :D

ogameclub
30 Dec 2008, 21:52
İts good for new year.

ArnyVee
31 Dec 2008, 01:12
Anyone have a 'confetti' sort of gif for this one?

I'd like to use that tomorrow and the following day.

UKBusinessLive
31 Dec 2008, 17:29
Hi Arny ;)

Happy new year buddy, I looked for some confetti as a .png format and i found this

https://www.vbulletin.org/forum/external/2008/12/1.png

its got a transparent background so it should work out ok

Hope this helps

;)

ArnyVee
31 Dec 2008, 18:14
Ahh..very nice! :)

Thank you sir and may you have a successful and joyful 2009! :D

Vaupell
05 Jan 2009, 15:18
hehe installed.. lovely..

ArnyVee
05 Jan 2009, 17:51
Next up maybe we can use some floating hearts for Valentine's Day and some floating shamrocks for St Patrick's Day ;)

If anyone finds a .png of some hearts and shamrocks, please post for the benefit of all.

We might want to rename this thread/mod to the "holiday spirit" mod ;)

raja811
05 Feb 2009, 21:14
anything differnt!!!!

UKBusinessLive
06 Feb 2009, 00:12
Next up maybe we can use some floating hearts for Valentine's Day and some floating shamrocks for St Patrick's Day ;)

If anyone finds a .png of some hearts and shamrocks, please post for the benefit of all.

We might want to rename this thread/mod to the "holiday spirit" mod ;)

Heres some nice hearts for Valentine's day :D

ArnyVee
06 Feb 2009, 01:28
Thanks Gerry! :up:

Added the hearts, but won't show them off until next week. I'm also adding a "Valentine's Day" Disney-related playlist.com songlist to 'set the mood' :D

UKBusinessLive
06 Feb 2009, 19:50
Thanks Gerry! :up:

Added the hearts, but won't show them off until next week. I'm also adding a "Valentine's Day" Disney-related playlist.com songlist to 'set the mood' :D

Nice :D, Looking for some St Patricks Day Icons, would you settle for pints of Guinness?? :D

ArnyVee
06 Feb 2009, 23:13
LOL....I think that I'll wait to see if we can come up with some four-leaf clovers :D

ArnyVee
08 Feb 2009, 16:00
Alright...I've "activated" the hearts and the Valentine's Day picture along with my Valentine's Day Disney-related "Love" music! :up:

Check it out here: http://www.waltdisneyboards.com/forums.php

WDBers are a festive group :D

RedHacker
09 Feb 2009, 04:13
Where put the code..?I dont understand....

UKBusinessLive
09 Feb 2009, 07:08
Where put the code..?I dont understand....

Full instructions are in the Zip file ;)

RedHacker
09 Feb 2009, 08:58
ΟΚ I extract only 2nd Zip...

ArnyVee
14 Mar 2009, 15:47
I'll have the "floating shamrocks" going either today or tomorrow for the St Patrick's Day on Walt Disney Boards' forum home (http://www.waltdisneyboards.com/forums.php)

DobieGillis©
14 Mar 2009, 15:50
I'll have the "floating shamrocks" going either today or tomorrow for the St Patrick's Day on Walt Disney Boards' forum home (http://www.waltdisneyboards.com/forums.php)

Me too, lol!

ArnyVee
14 Mar 2009, 16:01
What's your site DobieGillis? I'd like to take a look! :)

DobieGillis©
14 Mar 2009, 19:23
What's your site DobieGillis? I'd like to take a look! :)

www.cooluniverse.net

enjoy!

ArnyVee
14 Mar 2009, 20:09
No permission to view DobieGillis :(

Gave me the "log in or you see nothin!" message :D

DobieGillis©
14 Mar 2009, 20:16
No permission to view DobieGillis :(

Gave me the "log in or you see nothin!" message :D

just register and I'll validate you

ArnyVee
15 Mar 2009, 03:08
Alrighty....got my shamrocks floatin', my Irish music pumpin' and my St Patty's Day Mickey salutin' .... what more could you ask for? :up:

http://www.waltdisneyboards.com/forums.php

UKBusinessLive
15 Mar 2009, 11:35
Alrighty....got my shamrocks floatin', my Irish music pumpin' and my St Patty's Day Mickey salutin' .... what more could you ask for? :up:

http://www.waltdisneyboards.com/forums.php

Lovely floating shamrock,

Thanks for my pint yesterday Arny :D

http://upload.wikimedia.org/wikipedia/en/9/91/GuinnessPint.JPG

Happy St Patricks day everyone :D

DobieGillis©
15 Mar 2009, 13:22
Cheers Gerry!

ArnyVee
15 Mar 2009, 20:52
Cheers Gerry! ;)

Gerry (or anyone else that finds some), the next holiday is Easter. Maybe we can find some nice Easter eggs out there! :)

Then, we have to get some firecrackers for the 4th of July (Independence Day here in the States). :up:

Keep an eye out folks!

UKBusinessLive
16 Mar 2009, 01:05
Cheers Gerry! ;)

Gerry (or anyone else that finds some), the next holiday is Easter. Maybe we can find some nice Easter eggs out there! :)

Then, we have to get some firecrackers for the 4th of July (Independence Day here in the States). :up:

Keep an eye out folks!

Heres a few for you Arny ;) For Easter

ArnyVee
16 Mar 2009, 01:18
Very nice Gerry! I might have to use that furry bunny! :)

If you happen to come across it....maybe a big multi-colored egg would be cool too. :up:

Thanks again! :D

MaRµ
24 Mar 2009, 07:42
Hi!... Is this code XHTML 1.0 Transitional validated????.


Thanks! Is really nice

UKBusinessLive
25 Mar 2009, 21:26
Hi!... Is this code XHTML 1.0 Transitional validated????.


Thanks! Is really nice

Try it and see, let me know lol :D

hambil
28 Mar 2009, 23:45
This is neat. It really should be made into a full mod and tied into the calendar to automatically use certain images on certain holidays. Also, you could set things like how often to show the images (have it snow once an hour, or once every 20 refreshes or something) and things like that.

TimberFloorAu
29 Mar 2009, 00:01
This is neat. It really should be made into a full mod and tied into the calendar to automatically use certain images on certain holidays. Also, you could set things like how often to show the images (have it snow once an hour, or once every 20 refreshes or something) and things like that.

Or... lol

Why not tie it into the DSt settings, and timestamps, and locality temperatures from weather.com and snow at given periods and temperatures :):D

DobieGillis©
29 Mar 2009, 00:27
This is neat. It really should be made into a full mod and tied into the calendar to automatically use certain images on certain holidays. Also, you could set things like how often to show the images (have it snow once an hour, or once every 20 refreshes or something) and things like that.

good idea! Maybe we can have eggs fall on Easter?

ArnyVee
29 Mar 2009, 16:27
Gerry, with the St Patrick's Day clovers and the Easter png images, you should put a "holiday" packet together and put it out on the images portion of vb.org and then tie that in as sort of an "add-on" to this mod :D

stuky4ever
07 Jun 2009, 10:26
Can anyone help? When I uploaded the files and got everything working the pic fell and worked perfect. problem now is that IE users crash and cannot visit my forums V.V I removed the script and removed everything related to this and it still crashes the IE users. Please help me D:!

UKBusinessLive
07 Jun 2009, 16:05
Can anyone help? When I uploaded the files and got everything working the pic fell and worked perfect. problem now is that IE users crash and cannot visit my forums V.V I removed the script and removed everything related to this and it still crashes the IE users. Please help me D:!

Hi Not sure why it would do that, as long as you've just removed the script and nothing else??

I can't see why this simple script will make your forum Crash?? if you say that you've removed it and it still crashes then the problem surely has to be with something else, Does it come up in Firefox??

stuky4ever
07 Jun 2009, 20:24
This didn't happen before. I searched and it would be a cause of a new installed JA Script which was the client side Snow JA script. Now that is removed it still crashes IE users. This also happened to a friend on his Forums. No it doesnt come up in FireFox

UKBusinessLive
08 Jun 2009, 06:50
This didn't happen before. I searched and it would be a cause of a new installed JA Script which was the client side Snow JA script. Now that is removed it still crashes IE users. This also happened to a friend on his Forums. No it doesnt come up in FireFox

I've just installed it on my forum and deleted it also and my forums OK, no crashes nothing i'm on IE too, Its fine, You've probably got another problem or you've deleted something else,

strange how this hasn't happened to anyone else, can you restore your back of your forum and let me know if this continues?:eek: Is there any warning or errors showing on the screen?

ArnyVee
04 Jul 2009, 13:17
I couldn't find a good fireworks or firecracker png icon at the last moment, so I used the American flag icon (see attached) for the image on my site for today's Independence Day here in the United States. Sharing for those that might be interested. :up:

Demo here: Walt Disney Forums (http://www.waltdisneyboards.com/forums.php)

Frondy
06 Jul 2009, 12:47
Nice, work, thanks!

I tryed to make this effect working, but no success (it works only at "Forumhome" using IE, but Firefox not; demo page below works fine :confused: ) :

http://www.dynamicdrive.com/dynamicindex3/bubble.htm

I am not code expert, can you modify it for me?

And one suggestion:
It will be nice, if bubbles does not dissapear immediately on the top of the page, something like simulating the beer foam :)


Thanks in advance

(installed snow effect)

daveaite
06 Jul 2009, 16:59
thanks for post.

florkat
12 Jul 2009, 03:57
yeahhhhhhhh i did ittttttttttttt and loving it!!! marked as installed ^^ right now using snow because it's winter here (even if not snows) and then gonna use it for spring, halloween, christmas, always!! thanks!!

RobbieZ
16 Jul 2009, 13:53
How would you reverse the effect so that the images scroll up?

Eg: It would look better if you had balloons that were rising rather than falling if you get me.


Edit: You need to remove the supported tick !!!

ArnyVee
31 Oct 2009, 13:16
Happy Halloween with falling pumpkins today on Walt Disney Forum and Message Boards (http://www.waltdisneyboards.com/forums.php) :)

I've attached the pumpkin png for those that would like to use it :D

ImYourLady
02 Dec 2009, 14:42
Thank you

RealTesters
03 Dec 2009, 02:41
Work Fine....thanks.!!

ymam
04 Dec 2009, 17:44
Im having problems with the snowflakes appear on my portal page in IE.
They show up as red X's floating down the screen any suggestions?

worldwidereefer
05 Dec 2009, 00:12
Im having problems with the snowflakes appear on my portal page in IE.
They show up as red X's floating down the screen any suggestions?

Same here, I don't know why. Any help ?

TheLastSuperman
05 Dec 2009, 00:31
Im having problems with the snowflakes appear on my portal page in IE.
They show up as red X's floating down the screen any suggestions?

Same here, I don't know why. Any help ?

Per Roms use different image .txt file:

Instructions:

1. Open snowflake.js with microsoft wordpad (you can use notepad but it might create an error). ie: right the file and click "openwith" if it's enabled on your computer. DO NOT use dreamweaver as it will mess it up!!!!

2. look for:

var snowsrc="images/misc/snowflake.gif"

edit to the name of your file...

Save, upload, done!

or:

Just rename your image to snowflake.gif and you don't have to edit any files!!! What a concept! LOL :p

-Roms
Military Ltd and vBulletin.Org

That means make sure that it is using the correct image and it's in the correct folder i.e.

images/misc/snowflake.gif

Some need to add a / or not depending on your setup so it might look like:

/images/misc/snowflake.gif

Mike

benwilkshere
10 Dec 2009, 03:43
Amazing! Thank you so much!

ymam
11 Dec 2009, 00:38
Thanks...that fixed it!

ritunb
16 Dec 2009, 23:29
Thank You.

TheLastSuperman
17 Dec 2009, 00:04
Thanks...that fixed it!

Your welcome :D

also don't forget that in the future if something just does not seem right... it's usually a wrong url or a slash in with it OR htaccess that cause a lot of problems ;).

Mike

Bansheebob
17 Dec 2009, 02:07
just installed works great thanks!

vaguard
17 Dec 2009, 04:35
I'm interested in figuring out the "tick" that RobbieZ stated. If I wanted to add balloons and having them rise versus falls. Can anyone please explain this to me?

as-i-said
18 Dec 2009, 10:23
this is driving my members mad, one has had to call in virtual mountain rescue to find his laptop

bensterzback
18 Dec 2009, 10:42
installed THANKS

LIVE @ www.club-vaux.com

mp3u
20 Dec 2009, 16:03
Nice little seasonal addition - although I have 'Code:'

At the very top of my forum homepage now just above my logo. Any idea how to remove this?

Canron
20 Dec 2009, 17:57
Nice little seasonal addition - although I have 'Code:'

At the very top of my forum homepage now just above my logo. Any idea how to remove this?

It sounds like you actually copied the word "code" and pasted it in!

Remove the actual word/text "Code"

richTV
24 Dec 2009, 07:06
You may have to just add the code to the FORUMHOME page for the forum and in the index page for the VBAdavance but i've not tried it :o

Give it a go and see, remember to back up your originals, let us know how you got on :rolleyes:

i added it to the vbAdvanced rather than the FORUMHOME because some of my members either have poor systems/cpu's or a browser which they prefer not to use javascript.

i therefore added it to the adv_portal of the vbAdvanced Template so they would only briefly see the snow upon entering FORUMHOME.

in adv_portal

above </head>

add,

<!-- Start Snowflake Code -->
<script type="text/javascript" src="clientscript/snowstorm.js"></script>
<!-- End Snowflake Code -->

note: under our setup, i did not adjust the src="clientscript/snowstorm.js location code so only adjust if need be depending on ur server's forum folder.

vBAdvanced v3.0.1

HTH and thanks for the festive snow. :)

marshal_ramdev
24 Dec 2009, 17:59
thanks

bkm_mahdi
26 Dec 2009, 15:21
thank.nice

richTV
30 Oct 2010, 07:05
as with my above post, i'm now using it for Halloween using the pumpkin.png file someone posted earlier in this thread.

however, i went ahead and edited the .js file in M$ Word and replaced with pumpkin.png rather than simply change the file extension or changing the name to snowflake.gif ...i also didn't want to convert it in my photoeditor.

tnx again! :)

yotsume
03 Dec 2010, 04:29
I installed this on my site with VBA.

I have a flash banner at the top of my site. Is there a way to make the snow fall in front of the flash? The banner is maintained on my site using CYBs banner mod. The snow goes over other flash elements such as my youtube embedded players or other flash videos.

Hmmm I wonder if there is "transparent" code missing somewhere?

Taurus1
04 Dec 2010, 10:18
Great. Thanks. Works great on vb4 too.

yotsume
13 Dec 2010, 07:02
Oh no Santa's Reindeer are escaping... thanks to this mod! LOL

Have a look here: http://www.globalschoolconnect.com/

Attached is the image I created for this.

Next I am going to create a snowman image.

Developer Question:
How can we code your mod so it uses random images each page refresh???

That would rock!!!

yotsume
13 Dec 2010, 07:17
Here is my image of poor frosty the snowman that you can use to make fall down your site.

yotsume
13 Dec 2010, 07:22
I updated this script to allow for random multiple images to fall on page reload or refresh!

HAPPY HOLIDAYS EVERYONE!

yotsume
13 Dec 2010, 16:43
Randoam Images On Page Reload or Refresh!

Ok with a little help from a coder over at www.dynamicdrive.com (http://www.dynamicdrive.com) I have made a serious improvement to this mod.

You can now have random multiple images fall on every page refresh. Meaning each time the page is refreshed of changed a different image will fall! The images can even be animated gifs to create a serious effect for your site.

Here is the new code for you all! Just change the path and list for the images highlighted in Red.

Here is a live demo: Live Example
(http://www.globalschoolconnect.com/example/random.html)
HAPPY HOLIDAYS!

/******************************************
* Original Snow Effect Script- By Altan
* Random Falling Images Script
* Dynamic Drive DHTML Code Library (http://www.dynamicdrive.com/)
* Last updated Dec 2010, by Yotsume. This notice must stay intact for use
******************************************/

//Configure below to change URL paths to your falling images
var imgs=[
'/images/misc/present.gif',
'/images/misc/reindeer.gif',
'/images/misc/santa.gif',
'/images/misc/santa2.gif',
'/images/misc/snowman.gif',
'/images/misc/bells.gif',
'/images/misc/snowflake.gif'
]

var snowsrc=imgs[Math.floor(Math.random()*imgs.length)];
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

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; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-100); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><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() { // IE and NS6 main animation function
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) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-100);
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)
}

yotsume
13 Dec 2010, 17:42
Here is my transparent animated Santa, and a flying dove. They are both made to be transparent so will match any site perfectly.

yotsume
13 Dec 2010, 18:12
Here is a transparent animated bells gif.

yotsume
13 Dec 2010, 18:17
Here is another transparent animated Santa.

yotsume
13 Dec 2010, 18:22
and here is a transparent animated gift that spins!

illkeyone
30 Dec 2010, 23:41
Is it possible to make it falling "multiple images" at the same time?

Like, 3 of the images are "Snow.gif", 2 of them are "Gift.gif", another 3 are some other images... just random, but not the same image at a time, at the same page...

Is it possible?

( Because I want 3-4 and maybe more or less different "New Year" celebration images to show up at the pages, instead of 1 )

Digital Jedi
31 Dec 2010, 01:09
Is it possible to make it falling "multiple images" at the same time?

Like, 3 of the images are "Snow.gif", 2 of them are "Gift.gif", another 3 are some other images... just random, but not the same image at a time, at the same page...

Is it possible?

( Because I want 3-4 and maybe more or less different "New Year" celebration images to show up at the pages, instead of 1 )
With this particular script, no.

SoniaTel
27 Dec 2012, 12:17
Great

thank u