|
|
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo
|
|
Przesunięty przez: Boltex 06-05-2012, 01:11 |
Ró?ne dodatki do forum efekty w JavaScript (w panelu admina) |
Autor |
Wiadomość |
rzuf
Posty: 2
|
Wysłany: 23-12-2005, 23:30
|
|
|
KILLLER napisał/a: | Mam pr?be zeby ktoś zrobić kodzik zeby pada? snieg !!! i prosze wytłumaczyj jak go wstawić do forum by przemo ? |
takie znalezione cos o sniegu:
Kod: | easymod compatible
##############################################################
## MOD Title: Bloody Snowflakes
##
## MOD Author: Legendary GIR <administrator@legendarygir.us> http://www.legendarygir.us
##
## MOD Description: Creepy snowflakes for dark forums.
##
## MOD Version: 1.0.0
##
## INSTALLATION DIFFIULTY: VERY EASY
## INSTALLATION TIME: 2 MINUTES, 30 SECONDS WITH EASYMOD :)
## FILES TO EDIT: includes/page_header.php
## templates/subSilver/overall_footer.tpl
##
##############################################################
## NOTES: Before Adding This MOD To Your Forum, You Should Back
## Up All Files Related To This MOD
##############################################################
## I didn't write this mod on my own. Basically I found the
## the javascript on a scripting website and I incorporated it
## with the dark theme of my forum.
##############################################################
## If you want the snowflakes to be white then go through this
## mod and change all the red to white.
##############################################################
#
#-----[ 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: yellow }
</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/subSilver/overall_footer.tpl
#
#-----[ 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 = 'RED'}else{col = 'red'}
drop[make].color = col;
}
window.onload=moverain
}
</script>
#
#-----[SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM |
|
|
|
|
|
Gadatliwa Kasia
|
|
|
|
hecz
Posty: 73
|
Wysłany: 26-12-2005, 15:02
|
|
|
Pojawiła się nowa wersja skryptu "padający śnieg". Działa pod FF1+ IE5+ i Opr7+. Wystarczy tylko wkleić kod i zmienić ścieżke do śniegu.
PA Ogólne Konfiguracja Strony głównej Banner w nagłówku forum TAK
Kod: | <script type="text/javascript">
/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/
//Configure below to change URL path to the snow image
var snowsrc="SCIEZKA DO ŚNIEGU!!!!!!!!!!!!!!!!!!!!"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
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 (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
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 (ie4up||ns6up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
}
function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
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();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}
function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}
if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}
</script> |
i śnieg
Kod: | http://www.dynamicdrive.com/dynamicindex3/snow.gif |
Więcej na stronie: http://www.dynamicdrive.com/dynamicindex3/snow.htm |
|
|
|
|
Szuszar
Posty: 25
|
Wysłany: 09-01-2006, 23:00
|
|
|
a co zrobić żeby ten śnieg się cały czas sypał??? bo zrobiłem to co w ostatnim poscie i jest super, ale spada pewna ilość płatków i tylko one dochodzą do dołu strony i nic... tzn jak zwiększyć ich ilość bo spada po kilka dosłownie... |
_________________ http://users.telenet.be/F...oilet.gif[/img]
[img]http://users.telenet.be/Flatron/Signature%20Bars/barca.gif |
|
|
|
|
Regss
Posty: 38
|
Wysłany: 14-02-2006, 15:49
|
|
|
Tu bardzo ciekawy efekt wężyka przy kursorze spore możliwości kofiguracyjne, niestety działa tylko pod IE i Netscape, jeśli ktoś wie jak zrobić aby działało pod Mozilla/Firefox to prosze napisać
Kod: | <div id="dot0" style="position: absolute; visibility: hidden; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<div id="dot1" style="position: absolute; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<div id="dot2" style="position: absolute; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<div id="dot3" style="position: absolute; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<div id="dot4" style="position: absolute; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<div id="dot5" style="position: absolute; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<div id="dot6" style="position: absolute; height: 11; width: 11;">
<img src="http://www.webdiary.pl/modules/bullet.gif" height=11 width=11>
</div>
<script LANGUAGE="JavaScript">
<!-- hide code
/*
Elastic Trail script (By Philip Winston @ pwinston@yahoo.com, URL: http://www.geocities.com/pwinston/)
Script featured on Dynamicdrive.com
For this and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var nDots = 7;
var Xpos = 0;
var Ypos = 0;
// fixed time step, no relation to real time
var DELTAT = .01;
// size of one spring in pixels
var SEGLEN = 10;
// spring constant, stiffness of springs
var SPRINGK = 10;
// all the physics is bogus, just picked stuff to
// make it look okay
var MASS = 1;
// Positive XGRAVITY pulls right, negative pulls left
// Positive YGRAVITY pulls down, negative up
var XGRAVITY = 0;
var YGRAVITY = 50;
// RESISTANCE determines a slowing force proportional to velocity
var RESISTANCE = 10;
// stopping criterea to prevent endless jittering
// doesn't work when sitting on bottom since floor
// doesn't push back so acceleration always as big
// as gravity
var STOPVEL = 0.1;
var STOPACC = 0.1;
var DOTSIZE = 11;
// BOUNCE is percent of velocity retained when
// bouncing off a wall
var BOUNCE = 0.75;
var isNetscape = navigator.appName=="Netscape";
// always on for now, could be played with to
// let dots fall to botton, get thrown, etc.
var followmouse = true;
var dots = new Array();
init();
function init()
{
var i = 0;
for (i = 0; i < nDots; i++) {
dots[i] = new dot(i);
}
if (!isNetscape) {
// I only know how to read the locations of the
// <LI> items in IE
// setInitPositions(dots)
}
// set their positions
for (i = 0; i < nDots; i++) {
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
if (isNetscape) {
// start right away since they are positioned
// at 0, 0
startanimate();
} else {
// let dots sit there for a few seconds
// since they're hiding on the real bullets
setTimeout("startanimate()", 1000);
}
}
function dot(i)
{
this.X = Xpos;
this.Y = Ypos;
this.dx = 0;
this.dy = 0;
if (isNetscape) {
this.obj = eval("document.dot" + i);
} else {
this.obj = eval("dot" + i + ".style");
}
}
function startanimate() {
setInterval("animate()", 20);
}
// This is to line up the bullets with actual LI tags on the page
// Had to add -DOTSIZE to X and 2*DOTSIZE to Y for IE 5, not sure why
// Still doesn't work great
function setInitPositions(dots)
{
// initialize dot positions to be on top
// of the bullets in the <ul>
var startloc = document.all.tags("LI");
var i = 0;
for (i = 0; i < startloc.length && i < (nDots - 1); i++) {
dots[i+1].X = startloc[i].offsetLeft
startloc[i].offsetParent.offsetLeft - DOTSIZE;
dots[i+1].Y = startloc[i].offsetTop +
startloc[i].offsetParent.offsetTop + 2*DOTSIZE;
}
// put 0th dot above 1st (it is hidden)
dots[0].X = dots[1].X;
dots[0].Y = dots[1].Y - SEGLEN;
}
// just save mouse position for animate() to use
function MoveHandler(e)
{
Xpos = e.pageX;
Ypos = e.pageY;
return true;
}
// just save mouse position for animate() to use
function MoveHandlerIE() {
Xpos = window.event.x + document.body.scrollLeft;
Ypos = window.event.y + document.body.scrollTop;
}
if (isNetscape) {
document.captureEvents(Event.MOUSEMOVE);
document.onMouseMove = MoveHandler;
} else {
document.onmousemove = MoveHandlerIE;
}
function vec(X, Y)
{
this.X = X;
this.Y = Y;
}
// adds force in X and Y to spring for dot[i] on dot[j]
function springForce(i, j, spring)
{
var dx = (dots[i].X - dots[j].X);
var dy = (dots[i].Y - dots[j].Y);
var len = Math.sqrt(dx*dx + dy*dy);
if (len > SEGLEN) {
var springF = SPRINGK * (len - SEGLEN);
spring.X += (dx / len) * springF;
spring.Y += (dy / len) * springF;
}
}
function animate() {
// dots[0] follows the mouse,
// though no dot is drawn there
var start = 0;
if (followmouse) {
dots[0].X = Xpos;
dots[0].Y = Ypos;
start = 1;
}
for (i = start ; i < nDots; i++ ) {
var spring = new vec(0, 0);
if (i > 0) {
springForce(i-1, i, spring);
}
if (i < (nDots - 1)) {
springForce(i+1, i, spring);
}
// air resisitance/friction
var resist = new vec(-dots[i].dx * RESISTANCE,
-dots[i].dy * RESISTANCE);
// compute new accel, including gravity
var accel = new vec((spring.X + resist.X)/MASS + XGRAVITY,
(spring.Y + resist.Y)/ MASS + YGRAVITY);
// compute new velocity
dots[i].dx += (DELTAT * accel.X);
dots[i].dy += (DELTAT * accel.Y);
// stop dead so it doesn't jitter when nearly still
if (Math.abs(dots[i].dx) < STOPVEL &&
Math.abs(dots[i].dy) < STOPVEL &&
Math.abs(accel.X) < STOPACC &&
Math.abs(accel.Y) < STOPACC) {
dots[i].dx = 0;
dots[i].dy = 0;
}
// move to new position
dots[i].X += dots[i].dx;
dots[i].Y += dots[i].dy;
// get size of window
var height, width;
if (isNetscape) {
height = window.innerHeight + window.pageYOffset;
width = window.innerWidth + window.pageXOffset;
} else {
height = document.body.clientHeight + document.body.scrollTop;
width = document.body.clientWidth + document.body.scrollLeft;
}
// bounce off 3 walls (leave ceiling open)
if (dots[i].Y >= height - DOTSIZE - 1) {
if (dots[i].dy > 0) {
dots[i].dy = BOUNCE * -dots[i].dy;
}
dots[i].Y = height - DOTSIZE - 1;
}
if (dots[i].X >= width - DOTSIZE) {
if (dots[i].dx > 0) {
dots[i].dx = BOUNCE * -dots[i].dx;
}
dots[i].X = width - DOTSIZE - 1;
}
if (dots[i].X < 0) {
if (dots[i].dx < 0) {
dots[i].dx = BOUNCE * -dots[i].dx;
}
dots[i].X = 0;
}
// move img to new position
dots[i].obj.left = dots[i].X;
dots[i].obj.top = dots[i].Y;
}
}
// end code hiding -->
</script>
|
|
_________________ Hej Gość zapraszam na www.capoeiragorzow.ota.pl |
|
|
|
|
xeon
Posty: 16
|
Wysłany: 12-05-2006, 15:51 Pogoda (aktualna)
|
|
|
Pogoda na dziś
Mapka pochodzi ze strony: www.superexpress.pl źródło "AURA"
Kod do wklejenia: (text/css)
Kod: | table border="0" cellpadding="0" width="300">
<STYLE>
.menu2 {
font-family : Tahoma, Arial, Helvetica CE, Helvetica, Verdana, Sans-serif;
font-size : 11px;
cursor : auto;
text-decoration : none;
font-weight : bold;
color : black;
}</style>
<tr>
<td>
<a>
<img>
</a>
</td>
</tr>
<tr>
<td> <a>
<p>Mapka pochodzi ze strony:<br>
www.superexpress.pl<Br>źródło
"AURA"</a>
</td>
</tr>
</table> |
Kod do wklejenia: (BBcode)
Kod: | [URL=http://www.se.com.pl/][img]http://www.se.com.pl/Iso/dzisiaj/Mapki/dzis.gif[/img][/URL] |
Pogoda na jutro
Mapka pochodzi ze strony: www.superexpress.pl źródło "AURA"
Kod do wklejenia: (text/css)
Kod: | <table>
<STYLE>
.menu2 {
font-family : Tahoma, Arial, Helvetica CE, Helvetica, Verdana, Sans-serif;
font-size : 11px;
cursor : auto;
text-decoration : none;
font-weight : bold;
color : black;
}</style>
<tr>
<td>
<a>
<img>
</a>
</td>
</tr>
<tr>
<td> <a>" class="menu2">
<p>Mapka pochodzi ze strony:<br>
www.superexpress.pl
<br>źródło "AURA"</a>
</td>
</tr>
</table> |
Kod do wklejenia: (BBcode)
Kod: | [URL=http://www.se.com.pl/][img]http://www.se.com.pl/Iso/dzisiaj/Mapki/jutro.gif[/img][/URL] |
Inna wersja:
Pogoda na dziś
Mapka pochodzi ze strony: www.superexpress.pl źródło "AURA"
Kod do wklejenia: (text/css)
Kod: | <table>
<STYLE>
.menu2 {
font-family : Tahoma, Arial, Helvetica CE, Helvetica, Verdana, Sans-serif;
font-size : 11px;
cursor : auto;
text-decoration : none;
font-weight : bold;
color : black;
}</style>
<tr>
<td>
<a>
<img>
</a>
</td>
</tr>
<tr>
<td> <a>
<p>Mapka pochodzi ze strony:<br>
www.superexpress.pl<Br>źródło
"AURA"</a>
</td>
</tr>
</table> |
Kod do wklejenia: (BBcode)
Kod: | [URL=http://www.se.com.pl/][img]http://www.se.com.pl/Iso/dzisiaj/Mapki/dzispasek.gif[/img][/URL] |
__________________________________________________________________________________
[ Komentarz dodany przez: shqvarny: 13-05-2006, 14:12 ]
tego nie było już przypadkiem? |
|
|
|
|
Kotl3t
Posty: 1
|
Wysłany: 05-12-2006, 13:52
|
|
|
SzymQ napisał/a: | Młody^^ napisał/a: | Paszczak000 napisał/a: | Skoro już mowa o śniegu...
Mam pytanie. Działa on Wam na innych przeglądarkach niż IE. Ja mam FireFoxa i nie widz? efektu. |
mi właśnie w FF nie działa |
działa mi to
Kod: | <script LANGUAGE="javascript">
var no = 25; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "http://javascript.internet.com/img/snow/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();
}
</script> |
wkleiłem do overall_header.tpl |
mi to dziala pod FF ale jak zrobic zeby snieg lecial do konca strony?? |
_________________ zaczynam... moze cos z tego bedzie... |
|
|
|
|
Patrickoo
Posty: 14
|
Wysłany: 05-12-2006, 21:37
|
|
|
hecz napisał/a: | Pojawiła się nowa wersja skryptu "padający śnieg". Działa pod FF1+ IE5+ i Opr7+. Wystarczy tylko wkleić kod i zmienić ścieżke do śniegu.
i śnieg
Kod: | http://www.dynamicdrive.com/dynamicindex3/snow.gif |
|
A dokładniej gdzie trzeba wkleić ten kod śniegu ? Bo ten skrypt jest chyba bardziej rozbudowany od pozostałych "padających śniegów" Próbowałem zrobić coś w tej linijce:
Kod: | snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) { | ale nic nie wyszło tylko w ogóle znikł obrazek rysunku. (sprawdziałem pod FF.
Proszę o jakąś pomoc lub aby ktoś od razu podmienił kod i podał tutaj całość. |
|
|
|
|
INIM
Pomógł: 326 razy Posty: 1652
|
Wysłany: 06-12-2006, 08:14
|
|
|
Patrickoo napisał/a: | A dokładniej gdzie trzeba wkleić ten kod śniegu ? |
Dokładniej to w opis działu |
_________________ Serwis o harmonijce ustnej.
"Stadion Narodowy to zawsze będzie Śląski..." |
|
|
|
|
qualin
Posty: 13
|
Wysłany: 06-12-2006, 18:33
|
|
|
INIM napisał/a: | Patrickoo napisał/a: | A dokładniej gdzie trzeba wkleić ten kod śniegu ? |
Dokładniej to w opis działu |
Mi sie wydaje ze chyba Patrickoo mial na mysli gdzie wkleic adres do platka sniegu. |
|
|
|
|
Loud
Pomógł: 38 razy Posty: 193
|
Wysłany: 06-12-2006, 19:26
|
|
|
Patrickoo , link podajesz w tej lini
Kod: | //Configure below to change URL path to the snow image
var snowsrc="SCIEZKA DO ŚNIEGU!!!!!!!!!!!!!!!!!!!!" |
|
_________________ Chcesz przenieść forum ale masz problem, napisz do mnie. Na pewno pomogę |
|
|
|
|
Patrickoo
Posty: 14
|
Wysłany: 07-12-2006, 19:16
|
|
|
Loud napisał/a: | Patrickoo , link podajesz w tej lini
Kod: | //Configure below to change URL path to the snow image
var snowsrc="SCIEZKA DO ŚNIEGU!!!!!!!!!!!!!!!!!!!!" |
|
THX i sorka głupi błąd, napisane drukowanymi i nie zauważyłem
Jeszcze raz thx |
|
|
|
|
metalmok
Posty: 18
|
Wysłany: 17-12-2006, 18:43
|
|
|
Wiatm !
Znalazłem kiedyś gdzieś dosyć fajny śnieg, sprawia wrażenie trójwymiarowego. Tylko jedyny problem - nie wiem jak zrobić aby padał na całej stronie a nie tylko na górnej częsci.
Kod: | <script>
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=30
// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")
// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")
// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"
// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=2
// Set the maximal-size of your snowflaxes
var snowmaxsize=30
// Set the minimal-size of your snowflaxes
var snowminsize=10
// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=1
///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////
// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera
function randommaker(range) {
rand=Math.floor(range*Math.random())
return rand
}
function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.clientHeight
marginright = document.body.clientWidth
}
else if (ns6) {
marginbottom = window.innerHeight
marginright = window.innerWidth
}
var snowsizerange=snowmaxsize-snowminsize
for (i=0;i<=snowmax;i++) {
crds[i] = 0;
lftrght[i] = Math.random()*15;
x_mv[i] = 0.03 + Math.random()/10;
snow[i]=document.getElementById("s"+i)
snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
snow[i].size=randommaker(snowsizerange)+snowminsize
snow[i].style.fontSize=snow[i].size
snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
snow[i].sink=sinkspeed*snow[i].size/5
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
snow[i].style.left=snow[i].posx
snow[i].style.top=snow[i].posy
}
movesnow()
}
function movesnow() {
for (i=0;i<=snowmax;i++) {
crds[i] += x_mv[i];
snow[i].posy+=snow[i].sink
snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
snow[i].style.top=snow[i].posy
if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=0
}
}
var timer=setTimeout("movesnow()",50)
}
for (i=0;i<=snowmax;i++) {
document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script> |
do wypróbowania na www.mokrus.pl
Działa pod większością przeglądarek. |
|
|
|
|
a9u9u
Pomógł: 27 razy Posty: 612
|
Wysłany: 18-12-2006, 22:52
|
|
|
A moim zdaniem lepiej ten efekt wygląda jak ustawisz:
metalmok napisał/a: | var snowmax=30 | = 15-20 (więcej to zawierucha )
metalmok napisał/a: | var sinkspeed=2 | = 1 (bardziej przypomina spadające płatki śniegu, a nie kamienie )
a poza tym jak chcesz, aby czytało ten skrypt na większości przeglądarek to wstawiasz go w <head>SKRYPT_NA_ŚNIEG</head>
Edit: zapomniałam dodać...
Wstawiasz to w PA>Konfiguracje>Str. gł.>banner w nagłówku... |
_________________ #me {work: hard !important}
MOJE: [ Pagination like phpBB3 ] ; [ Info for IE users ] |
|
|
|
|
metalmok
Posty: 18
|
Wysłany: 19-12-2006, 22:39
|
|
|
W moim Solarisie nie działa mi baner w nagłówku
Ale to przecierz nie problem bo zawsze można w kodzie wstawić... tylko ciągle pada mi tylko w górnej części forum
Dzięki za podpowiedzi |
|
|
|
|
Gadatliwa Kasia
|
|
|
|
a9u9u
Pomógł: 27 razy Posty: 612
|
Wysłany: 20-12-2006, 01:37
|
|
|
metalmok napisał/a: | // Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=30 |
jeżeli byłoby ustawienie, aby padały płatki na całą stronę... to te 30 by nie było widać
a po za tym more than 30 - 40 not recommended, pewnie się przycina przy większej ilości co psuje cały efekt
Pozdrawiam...
P.s Temat: Różne dodatki do forum efekty w JavaScript (w panelu admina) |
_________________ #me {work: hard !important}
MOJE: [ Pagination like phpBB3 ] ; [ Info for IE users ] |
|
|
|
|
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum
|
Dodaj temat do Ulubionych Wersja do druku
|
Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!
Powered by phpBB modified by Przemo © 2003 phpBB
| Strona wygenerowana w 0,22 sekundy. Zapytań do SQL: 12 | |
|
|