Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2004, 12:34 AM
Kahoona Kahoona is offline
 
Join Date: Nov 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding snow?

Could someone please tell me how to add falling snow to my forum page.
Reply With Quote
  #2  
Old 12-09-2004, 01:10 AM
Bad_i_BILL's Avatar
Bad_i_BILL Bad_i_BILL is offline
 
Join Date: Nov 2004
Location: Greene County Indiana
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like on mine?

www.gcindiana.info/forum3
Reply With Quote
  #3  
Old 12-09-2004, 01:14 AM
Kahoona Kahoona is offline
 
Join Date: Nov 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah like that!

But without the big snowflakes in the top left.
Reply With Quote
  #4  
Old 12-09-2004, 01:54 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 12-09-2004, 02:08 AM
Kahoona Kahoona is offline
 
Join Date: Nov 2004
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did that, and it wouldn't work...
Reply With Quote
  #6  
Old 12-09-2004, 09:11 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 12-09-2004, 09:26 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.)
Reply With Quote
  #8  
Old 12-09-2004, 09:53 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #9  
Old 12-09-2004, 10:02 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weird...

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

Does that work for you?
Reply With Quote
  #10  
Old 12-09-2004, 10:15 AM
Darat Darat is offline
 
Join Date: Aug 2004
Posts: 329
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In IE yes, in Firefox no.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:07 PM.


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.08144 seconds
  • Memory Usage 2,274KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete