Cod: Selectaţi tot
##############################################################
## HACK Title: Snowflakes
##
## HACK Author: Siteflow (see NOTES below)
##
## HACK Author Email: webmaster@siteflow.co.uk
##
## HACK Description: fa-la-la-la-la, la-la-la-la (snow for
## christmas on your forum!)
##
## HACK Version: 1.0 (Tested on 2.0.6)
##
## HACK Example: http://www.bloodlust-uk.com/forum/index (during December...)
##
## Support: for support please vist http://www.siteflow.co.uk/contact.htm
##
## Installation Level: easy
## Installation Time: 1 Minute
## Files To Edit: includes/page_header.php
## templates/xx/overall_footer.php
##
##############################################################
## Before Adding This HACK To Your Forum, You Should Back Up
## All Files Related To This HACK
##############################################################
##############[Open includes/page_header.php]#################
############################[Find]############################
?>
########################[*AFTER* Add]#########################
## [amend first four lines of the javascript if required] ##
<style>
.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 8; color: blue }
</style>
<script language="javascript">
snow = true; // false-rain; true-snow
snowsym = " * " //These are the symbols for each
rainsym = " ' " //You can put images here.
howmany = 10 //How many drops/snowflakes?
/**************Do not need to change anything below***********/
if(snow){sym = snowsym; speed=1; angle=10; drops=howmany}
else{sym = rainsym; speed=10; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;
function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}
</script>
<script language="JavaScript1.2">
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=20
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
##############[Open templates/xx/overall_footer.php]##############
###############################[Find]#############################
</body>
###########################[*BEFORE* Add]#########################
<script language="javascript">
if (document.all){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()
ly = "document.all[\'"; st = "\'].style"
for(make = 0; make < drops; make++){
document.write('<div id="drop'+make+'" class=drop>'+sym+'</div>');
drop[make] = eval(ly+'drop'+make+st);
maxx = document.body.clientWidth-40
maxy = document.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/4;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = 'white'}else{col = 'blue'}
drop[make].color = col;
}
window.onload=moverain
}
</script>
##########################[Save and upload. Read these notes]#######
#
#############################[!!!NOTES!!!]##########################
#
# If you really wanted to be neat, you
# could throw the .drop style tag into the
# style sheet of the template you are using.
#
####################################################################
#
# The javascript author is unknown, I
# just packaged it into instructions on how
# to get it working on your phpbb.
#
####################################################################
#
# This script does rain too, though I haven't tried it. Let me know
# if you do, would be interested to see it in action.
#
####################################################################
# If you just use this seasonally, just
# comment it out for the rest of the year using /* and */ outside each
# <script and </script> tag. e.g.
#
# /*
# <script language.....
# </script>
# */
#
##########################[Save and upload]#########################
#
# EoM
