X-MAS Style mit Schneeflocken !!!?? == FRAGE ZU SCRIPT ==

Alles zu Styles, Templates, Icons und Smilies für phpBB 2.0, sowie allgemeine Designfragen zur Integration von phpBB in bestehende Websites.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
Guido
Mitglied
Beiträge: 1307
Registriert: 06.10.2002 09:44
Wohnort: Rheinland
Kontaktdaten:

Beitrag 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...
Benutzeravatar
Helmut71
Mitglied
Beiträge: 1152
Registriert: 07.07.2003 23:03
Wohnort: Hohenau/Österreich

Beitrag von Helmut71 »

ps: die Flocken gehen bei mir auch nur bis zur Hälfte - jemand der weiß, wieso??
Es tanzt ein Bi Ba Butzemann.
Gast

Beitrag 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
Benutzeravatar
Helmut71
Mitglied
Beiträge: 1152
Registriert: 07.07.2003 23:03
Wohnort: Hohenau/Österreich

Beitrag 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?
Es tanzt ein Bi Ba Butzemann.
Benutzeravatar
mondi
Mitglied
Beiträge: 187
Registriert: 22.02.2003 10:14
Wohnort: Bremerhaven
Kontaktdaten:

Beitrag 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
..:: VERDI FOREVER ::..
Benutzeravatar
Helmut71
Mitglied
Beiträge: 1152
Registriert: 07.07.2003 23:03
Wohnort: Hohenau/Österreich

Beitrag 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??
Es tanzt ein Bi Ba Butzemann.
Sebby King
Mitglied
Beiträge: 41
Registriert: 28.09.2003 17:37

Beitrag von Sebby King »

Basti2003 hat geschrieben:also mit den schneeflcken hab ich schon hinbekommen, ...
könnte mir jemand die ganzen codes geben?
Sebby King
Mitglied
Beiträge: 41
Registriert: 28.09.2003 17:37

Beitrag 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?
MrMiller
Mitglied
Beiträge: 57
Registriert: 29.11.2003 21:03

Beitrag 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
Benutzeravatar
punker
Mitglied
Beiträge: 305
Registriert: 28.05.2003 11:11
Wohnort: Minden

Beitrag 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
Es grüßt
der Stefan :)
Antworten

Zurück zu „phpBB 2.0: Styles, Templates und Grafiken“