1
Shijk
Let it snow!
  • 2003/12/2 22:14

  • Shijk

  • Just popping in

  • Posts: 51

  • Since: 2003/8/7 2


Hi There,

Does anyone know how I can let it snow at my site?
I don't know anything about that javascripts etc.

Please help

Greetzz

Mark

2
CBlue
Re: Let it snow!

This sitehttp://petitoops.net/ has a christmas theme that has snow coming down in it. You can either register there, download the theme and use it for your site or...follow the instructions at this sitehttp://www.hypergurl.com/snow.html
and save the snow.gif to your theme folder in the same place your theme.html file is. Then copy the javascript right under the body tag in your theme.html file. Don't forget to delete the files in your templates_c folder of your XOOPS site.

3
Shijk
Re: Let it snow!
  • 2003/12/2 22:31

  • Shijk

  • Just popping in

  • Posts: 51

  • Since: 2003/8/7 2


I use..Xoops 2.0.5.1

So will it also work under this? instead of petitoops?

4
Herko
Re: Let it snow!
  • 2003/12/2 22:33

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


This is for IE only I guess, because in my Mozilla it's like an australian christmas....

Herko

5
CBlue
Re: Let it snow!

Yes it should work. I can test it on my site and let you know. If it works, then I'll post it here with a link to my site so that you can see it. I am using 2.0.5.1 too.

6
Shijk
Re: Let it snow!
  • 2003/12/2 22:36

  • Shijk

  • Just popping in

  • Posts: 51

  • Since: 2003/8/7 2


Ow I would really appreciat that..

Because I don't know how to fix it in my XOOPS files.

Thank you very much already!

(sorry for my bad english)


Greetzz

Mark

7
CBlue
Re: Let it snow!

It's working.http://magazine.crazy4realitytv.com/

You just have to make sure that you put the full url for the link to the snow gif in the script. It has to have the full url to work.

8
CBlue
Re: Let it snow!

Here is the entire script that gets put exactly under the <body> tag of your theme.html file.

<script language="JavaScript1.2">
<!-- Copyright Altan (snow@altan.hr) -->
<!-- Altan's Web site:http://www.altan.hr/snow -->
<!-- used at Hypergurl;http://www.hypergurl.com -->
<!-- This script is provided free at Hypergurl -->
<!--http://hypergurl.com -->

<!-- Begin
var no = 15; // snow number
var speed = 9; // smaller number moves the snow faster
var snowflake = "http://www.yoursite.com/anyfolderyouwant/snow.gif";

var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
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 (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
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 (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
}
}
}
function snowNS() { // Netscape main animation function
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();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() { // IE main animation function
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();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// End -->
</script>

You just have to save the snow gif from this pagehttp://www.hypergurl.com/snow.html to your site.

9
Shijk
Re: Let it snow!
  • 2003/12/2 22:44

  • Shijk

  • Just popping in

  • Posts: 51

  • Since: 2003/8/7 2


Ok, cool

I'll will give it a try right now!

10
Shijk
Re: Let it snow!
  • 2003/12/2 22:51

  • Shijk

  • Just popping in

  • Posts: 51

  • Since: 2003/8/7 2


This is my theme.html

I can't find the <body>
Only at the top bottom..
And this one...the beginning of this...



<body onmouseover="MM_displayStatusMsg('<{$xoops_slogan}>');return document.MM_returnValue">
<table align="center" cellpadding="0" cellspacing="0" class="head_buttons">
<tr>
<td align="right" class="buttons_menu"><span class="right"> </span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /></span>
<span class="right"><a href="<{$xoops_url}>">Home</a> </span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /></span><span class="right"><a href="<{$xoops_url}>/modules/newbb/">
Forums </a></span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /></span><span class="right"><a href="<{$xoops_url}>/modules/news/">
Nieuws </a></span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" />
</span><span class="right"><a href="<{$xoops_url}>/modules/mydownloads/">Downloads
</a></span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /></span>
<span class="right"><a href="<{$xoops_url}>/modules/mylinks/">Links </a></span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /></span>
<span class="right"><a href="<{$xoops_url}>/modules/contact/">Contact </a></span><span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /></span><span class="left" align="bottom">
</span></td>
</tr>
</table>
<table align="center" cellpadding="0" cellspacing="0" class="head_table">
<tr>
<td width="32" class="head_logo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>images/logo.jpg" border="0" alt=""></a></td>
<td valign="middle" class="head_banner"><br />
<form style="margin-top: 0px;" action="<{$xoops_url}>/search.php" method="post">
<input type="hidden" name="action" value="results" />
<input type="text" name="query" size="14" />
<input name="submit" type="submit" value="Zoek" />
<span class="left" align="bottom"><img src="<{$xoops_imageurl}>images/spacer.gif" alt="" border="0" /></span> <br />
</form></td>
</tr>
</table>
<table align="center" class="body_table">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr> <{if $xoops_lblocks}>
<td rowspan="2" valign="top" id="leftcolumn">
<!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}> <{include file="shijk/theme_blockleft.html"}>
<{/foreach}>
<!-- End left blocks loop -->
</td>
<{/if}>
<td height="17" colspan="2" valign="top" class="body_bar"><p><a href="<{$xoops_url}>/"> </a> <span class="right">
</span><span class="left" align="bottom">
<script type="text/javascript">
<!-- // Array ofmonth Names
var monthNames = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
var now = new Date();
thisYear = now.getYear();
if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem
document.write(monthNames[now.getMonth()] + " " + now.getDate() + ", " + thisYear);
// --></script>
-<{if $xoops_isuser}> Welkom, <a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>
<img src="<{$xoops_imageurl}>images/divider.gif" alt="" height="14" border="0" /><{else}>
<a href="<{$xoops_url}>/register.php">Register!</a> or <{/if}></span>
<span class="right"> <{if $xoops_isuser}> <a href="<{$xoops_url}>/user.php?op=logout">loguit</a><{else}>
<a href="<{$xoops_url}>/user.php">log in</a> <{/if}></span><span class="right">
</span></p>
</td>
<{if $xoops_showrblock == 1}> <{/if}> </tr>
<tr>
<td align="center"> <{$xoops_banner}><!-- Display center blocks if any -->
<{if $xoops_showcblock == 1}>
<table cellspacing="0">
<tr valign="top">
<td colspan="2" id="centerCcolumn">
<!-- Start center-center blocks loop -->
<{foreach item=block from=$xoops_ccblocks}> <{include file="shijk/theme_blockcenter_c.html"}>
<{/foreach}>
<!-- End center-center blocks loop -->
</td>
</tr>
<tr>
<td valign="top" id="centerLcolumn">
<!-- Start center-left blocks loop -->
<{foreach item=block from=$xoops_clblocks}> <{include file="shijk/theme_blockcenter_l.html"}>
<{/foreach}>
<!-- End center-left blocks loop -->
</td>
<td valign="top" id="centerRcolumn">
<!-- Start center-right blocks loop -->
<{foreach item=block from=$xoops_crblocks}> <{include file="shijk/theme_blockcenter_r.html"}>
<{/foreach}>
<!-- End center-right blocks loop -->
</td>
</tr>
</table>
<{/if}>
<!-- End display center blocks -->
<div id="content"> <{$xoops_contents}> </div></td>

<!-- Start right blocks loop -->
<{if $xoops_showrblock == 1}><td valign="top" id="rightcolumn">
<{foreach item=block from=$xoops_rblocks}> <{include file="shijk/theme_blockright.html"}>
<{/foreach}>
<!-- End right blocks loop -->
</td>
<{/if}>
</tr>
</table></td></tr></table>

<br />
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="footerbar"><br />
<br />
Theme design by <a href="http://www.montisarts.com" target="_blank"><font color="#FFFFFF">Montisarts & Shijk
Webdesign</font></a> © 2003</td>
</tr>
</table>
</body>
</html>

Login

Who's Online

181 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits