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.


All times are GMT. The time now is 01:41 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.01094 seconds
  • Memory Usage 1,762KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete