vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding snow? (https://vborg.vbsupport.ru/showthread.php?t=72650)

Kahoona 12-09-2004 12:34 AM

Adding snow?
 
Could someone please tell me how to add falling snow to my forum page.

Bad_i_BILL 12-09-2004 01:10 AM

Like on mine?

www.gcindiana.info/forum3

Kahoona 12-09-2004 01:14 AM

Yeah like that!

But without the big snowflakes in the top left.

Gio~Logist 12-09-2004 01:54 AM

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


but that in your header template in the apropriate spot, thats what i did to get the side menu on

www.urbandynasty.com/forums

Kahoona 12-09-2004 02:08 AM

I did that, and it wouldn't work...

Darat 12-09-2004 09:11 AM

I've just tried the code from http://www.dynamicdrive.com/dynamicindex3/snow.htm .

The code seems to be fine, I put it in the headerinclude template and it is inserted into my forum pages, but it displays just one snowflake at the top left. If I use "preview" from the template manager it shows it working with moving snowflakes.

Anyone know why it won't work with a vBulletin forum page?

kall 12-09-2004 09:26 AM

Quote:

Originally Posted by Darat
I've just tried the code from http://www.dynamicdrive.com/dynamicindex3/snow.htm .

The code seems to be fine, I put it in the headerinclude template and it is inserted into my forum pages, but it displays just one snowflake at the top left. If I use "preview" from the template manager it shows it working with moving snowflakes.

Anyone know why it won't work with a vBulletin forum page?

Are you using firefox, by any chance?

Try this:

PHP Code:

  //Configure below to change URL path to the snow image

var SnowPicture "http://www.yourdomain.com/forum/images/misc/snow.gif"
var no 10;

var 
browser_IE_NS = (document.body.clientHeight) ? 0;
var 
browser_MOZ = (self.innerWidth) ? 0;

var 
SnowTime;
var 
dxxpyp;
var 
amstxsty;
var 
iBrowser_WidthBrowser_Height;

if (
browser_IE_NS)
{
Browser_Width document.body.clientWidth;
Browser_Height document.body.clientHeight;
}
else if (
browser_MOZ)
{
Browser_Width self.innerWidth 20;
Browser_Height self.innerHeight;
}

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

for (
0no; ++ i)
{
dx[i] = 0;
xp[i] = Math.random()*(Browser_Width-50);
yp[i] = Math.random()*Browser_Height;
am[i] = Math.random()*20;
stx[i] = 0.02 Math.random()/10;
sty[i] = 0.7 Math.random();
document.write("<\div id=\"snowflake"+"\" style=\"position: absolute; z-index: "+"; visibility: visible; top: 15px; left: 15px;\"><\img src='"+SnowPicture+"' border=\"0\"><\/div>");
}

function 
SnowWeather()
{

for (
0no; ++ i)
{
yp[i] += sty[i];

if (
yp[i] > Browser_Height-50)
{
xp[i] = Math.random()*(Browser_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("snowflake"+i).style.top=yp[i]+"px";
document.getElementById("snowflake"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}

SnowTime setTimeout("SnowWeather()"10);

}

SnowWeather(); 
</
script

(Copy that over everything from the path to snow.gif down.)

Darat 12-09-2004 09:53 AM

Thanks for the response and code.

I am using Firefox and the (original) code does work in the template preview (and the site's demo works) and when I checked it in IE 6 it also wasn't working.

I've just tried your code and I don't even get the solitary snowflake in the top left. :( (But again if I do preview from the template editor your code is working.) :disappointed:

kall 12-09-2004 10:02 AM

Weird...

Check my site... http://www.nzboards.com ..

Does that work for you?

Darat 12-09-2004 10:15 AM

In IE yes, in Firefox no.

Kahoona 12-09-2004 02:22 PM

Well it worked until I refresh, but now I get "Done, but with errors on page." On the status bar.

Could you show me how to just add the white dots falling down, and not the images.

Zachery 12-09-2004 03:09 PM

http://www.vbulletin.com/forum/showp...8&postcount=30 :)

Kahoona 12-09-2004 06:17 PM

That website inside that link does not work.

Zachery 12-09-2004 06:39 PM

Quote:

Originally Posted by Kahoona
That website inside that link does not work.

there, check now ;P

Kahoona 12-09-2004 06:58 PM

Thanks again Zack. :)

Romeos Tune 12-13-2004 02:03 AM

Where the heck should we put it? In the header template or the headerinclude? And where at? There is no <body> tag anywhere in there. Anyone?

Zachery 12-13-2004 02:25 AM

did you try reading my post?

Quote:

headinclude near the bottom

Romeos Tune 12-13-2004 02:28 AM

Yeah.....I got the little snow that uses the snow.js script and that's working fine.... The big flakes are what I can't seem to get to work?

Zachery 12-13-2004 02:46 AM

Quote:

Originally Posted by Romeos Tune
Yeah.....I got the little snow that uses the snow.js script and that's working fine.... The big flakes are what I can't seem to get to work?

They flatout dont work in Firefox IIRC and if any of your users are on lower end systems its not going to be a good time for them.

SHOBizzy 12-28-2004 03:04 AM

Older topic yes, but I'd like to add my input on the snowflake js just so others who may be stumbling on this topic late like me will have a little more info.

The smaller flakes work great on both html based home pages like mine and when using the script like Zachery provided for the vB forum software. They have very little effect on page loading, etc.

The biggest hitch I had with using the larger snowflake js was that it increased my system's processes a LOT whenever the page using them was loaded, to the point that it slowed my browsing abilities and that to me is just not acceptable. I was concerned about the users on my BB who don't have as speedy computers and/or connections. I don't know if the script would have an effect on dial-up users or not but I wasn't willing to take the chance.

IMO the small flakes are more tasteful anyway because they add just a touch of class that doesn't distract the user from why they're visiting my board to begin with.

Sorry again for chiming in late.

Edit: My board with the smaller flakes.... www.shoforum.com
If you click the link for "Main Forum Listing Page" you'll see the vB software using the small flakes. I'm in process of learning how to change templates/styles right now they don't show up very well within the forum. Ahhh...things to come.


All times are GMT. The time now is 03:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01288 seconds
  • Memory Usage 1,783KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete