Seite 3 von 5

Verfasst: 22.10.2003 17:26
von Guido
Helmut71 hat geschrieben:Hmm habe eben den thread gefunden.

In dem code sind doch 4 gifs (s1-s5) aber hier sehe ich nur drei Flocken...

hat jemand die restlichen??
In diesem Script gibt es nur ein Bild (snow.gif)...Ich habe 3 zur Verfügung gestellt damit man sich eins aussuchen kann...

Verfasst: 22.10.2003 17:31
von Helmut71
ps: die Flocken gehen bei mir auch nur bis zur Hälfte - jemand der weiß, wieso??

Verfasst: 22.10.2003 20:42
von Gast
Ich habe die gif´s einfach kopiert und umbenannt so das 5 draus werden ergebnis kannst du dir ja auf http://www.c-kadett.com mal ansehen.

Gruß Tom0473

Verfasst: 23.10.2003 06:28
von Helmut71
Bei beiden scripts schneit es bei mir nur ca. bis zur Hälfte. Daher meine Frage: Ist das so vorgesehen? (sieht trotzdem gut aus..)


Oder hab ich irgendwas nicht beachtet?

Verfasst: 24.10.2003 10:14
von mondi
Hallo,

ich habe das mit diesem wunderbaren Regen / Schneeflocken-Skript gelöst. Das schneit dann auch über die ganze Seite und man muss nicht zwangsläufig eine Grafik verwenden.

Also: in die overall_header.tpl

hinter <head>

Code: Alles auswählen

<script language="javascript"> 

//Rain/Snow effect- By Craig Blanchette Craiga.topcities.com 
//Script featured on Dynamic Drive 
//Visit http://www.dynamicdrive.com for this script and more 

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=25; angle=30; drops=howmany} 
else{sym = rainsym; speed=50; 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>
und dann hinter </head>

Code: Alles auswählen

<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>

Im ersten Teil lassen sich Geschwindigkeit und Winkel regulieren (Schnee fällt natürlich anders als Regen). speed=25 und angle=30 fällt noch relativ zügig. speed=6 sieht natürlich schöner und gemütlicher aus, aber dann kommt es bei jedem neuen Seitenaufruf zu einer kurzen Pause, bis es wieder anfängt zu schneien. Vielleicht hat da jemand einen Tipp.

Im zweiten Teil die Farbe der Schneeflocken und des Regens.
Ich benutze statt des Sternchens eine Grafik, die natürlich im Root-Verzeichnis des Forums liegen muss.

Code: Alles auswählen

snowsym = "<img src=s1.gif>"  //These are the symbols for each 

Grüße
Mondi

Verfasst: 29.10.2003 18:32
von Helmut71
hmm ich hab das script jetzt mal ausprobiert: Der einzige Effekt (bei mir) war, dass das ganze Forum hinunter versachoben wurde...!!??


Funktioniert das bei anderen??

Verfasst: 29.11.2003 20:44
von Sebby King
Basti2003 hat geschrieben:also mit den schneeflcken hab ich schon hinbekommen, ...
könnte mir jemand die ganzen codes geben?

Verfasst: 29.11.2003 21:49
von Sebby King
ok, jetzt hab ich gesehen, wo es rein musste.

aber irgendwie ist dann immer nur die fläsche mit schnee, die man im ersten moment sieht.
scrollt man aber runder, wird der schneefall wie abgeschnitten ..
kann mir jemand helfen, woran das liegen könnte?

Verfasst: 29.11.2003 22:14
von MrMiller
@mondi: Bei deinem Script wird das Board komplett nach unten Verschoben und drüber ca. 6-10 Zeilen jeweils ein Sternchen...


Gruß
MrMiller

Verfasst: 30.11.2003 14:55
von punker
hier habe auch noch script gefunden

Code: Alles auswählen

############################################################## 
## 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