To jest tylko wersja do druku, aby zobaczyć pełn± wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

Pozostałe - Ró?ne dodatki do forum efekty w JavaScript (w panelu admina)

Ignis - 05-12-2004, 10:34
Temat postu: Re: Różne dodatki do forum efekty w JavaScript (w panelu adm
Kod:

(...)
var speed = 10; // smaller number moves the snow faster

(...)

PiciaTM - 05-12-2004, 11:06

KILLLER napisał/a:
Mam pr?be zeby kto¶ zrobić kodzik zeby pada? snieg !!! i prosze wytłumaczyj jak go wstawić do forum by przemo ?


¶nieg jest w pierwszym po¶cie :wink:

Paszczak000 - 05-12-2004, 11:07

Skoro już mowa o ¶niegu...
Mam pytanie. Działa on Wam na innych przegl±darkach niż IE. Ja mam FireFoxa i nie widz? efektu.

SIMtel - 05-12-2004, 11:31

Jeżeli chodzi o ¶nieg to w IE widzie się jakie¶ efekty.
Ja obecnie korzystam z Mozilli i nic nie widz? :cry: żadnego ¶niegu itp. :roll:

Paszczak000 - 05-12-2004, 11:39

szkoda :(
Ciekawe jak będzie na Operze. Wiem, że ona sobie jako¶ radzi¶a tam gdzie Mozilla zawodzi¶a.

przecinek - 05-12-2004, 11:54

ta, na oprze działa ;)
piterownik - 05-12-2004, 12:08

to tera cos na jesien
Kod:
<script language="JavaScript1.2">

//Autumn leaves- by Kurt Grigg (kurt.grigg@virgin.net)
//Modified by Piterownik (Piterownik@o2.pl)
//visit http://www.sims.dog.pl/

//Pre-load your image below!
grphcs=new Array(12)
Image0=new Image();
Image0.src=grphcs[0]="al1.gif";
Image1=new Image();
Image1.src=grphcs[1]="bl1.gif"
Image2=new Image();
Image2.src=grphcs[2]="cl1.gif"
Image3=new Image();
Image3.src=grphcs[3]="dl1.gif"
Image4=new Image();
Image4.src=grphcs[4]="el1.gif"
Image5=new Image();
Image5.src=grphcs[5]="fl1.gif"
Image6=new Image();
Image6.src=grphcs[6]="al.gif"
Image7=new Image();
Image7.src=grphcs[7]="bl.gif"
Image8=new Image();
Image8.src=grphcs[8]="cl.gif"
Image9=new Image();
Image9.src=grphcs[9]="dl.gif"
Image10=new Image();
Image10.src=grphcs[10]="el.gif"
Image11=new Image();
Image11.src=grphcs[11]="fl.gif"

Amount=15; //Smoothness depends on image file size, the smaller the size the more you can use!
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;

if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){                                                               
 Ypos[i] = Math.round(Math.random()*WinHeight);
 Xpos[i] = Math.round(Math.random()*WinWidth);
 Speed[i]= Math.random()*5+3;
 Cstep[i]=0;
 Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/165);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-100;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*11+4;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',15);
}

window.onload=fall
//-->
</script>


zalacznik wklejamy do glownego katalogu

Skrypt ten jest oparty na skrypcie Kurta Grigg'ena troche go modnelem i dodalem pare obrazków wiecej i macie to, na IE to chodzi ale nie wiem czy na innych tez :(

[ Dodano: 05-12-2004, 12:27 ]
a co do tych przejsc, ty tylko wlanczaja sie jak wchodze do admina bo mam wlaczony loading czyli zeby w loadingu byly przejscia to musze dodac to do include/page_header.php może ktos podac gdzie w tym pliku mam to podac ??(w ktorym miejscu)

Przemo - 05-12-2004, 21:54

Ja tez nie :) Trzeba kombinowac przestawiajac rozne wartosci.
piterownik - 06-12-2004, 14:12

pokombinuje troche :D jak cos to napisze w tym temacie
Ignis - 08-12-2004, 09:35

efekt ¶niegu od Przema nie działa pod Mozill? i na macu.
To co zapodam poniżej widać na Mozilli i na maczku, ale nie wiem, czy nieczego innego nie psuje, bo ja js nie znam :P
Kod:
<script language="JavaScript1.2">

/******************************************
* Snow Effect Script- By Altan d.o.o. (snow@altan.hr, http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
******************************************/
 

  //Configure below to change URL path to the snow image
  var snowsrc="http://polsped.com.pl/snow.gif"
  // Configure below to change number of snow to render
  var no = 20;

  var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!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||ns6up) {
    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\" top=\"15\" visibility=\"show\"><a href=\"http://dynamicdrive.com/\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/layer>");
      } else {
        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"><\/layer>");
      }
    } else 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 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()", 10);
  }

  function snowIE_NS6() {  // IE and NS6 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 = ns6up?window.innerWidth : document.body.clientWidth;
        doc_height = ns6up?window.innerHeight : document.body.clientHeight;
      }
      dx[i] += stx[i];
      if (ie4up){
      document.all["dot"+i].style.pixelTop = yp[i];
      document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
      }
      else if (ns6up){
      document.getElementById("dot"+i).style.top=yp[i];
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]);
      }   
    }
    setTimeout("snowIE_NS6()", 10);
  }

  if (ns4up) {
    snowNS();
  } else if (ie4up||ns6up) {
    snowIE_NS6();
  }

</script>


naturalnie gifa z płatkiem ¶niegu mozna sobie zmienić :)

Paszczak000 - 08-12-2004, 18:57

pod Linuksem bieda....
widz? tylko statyczny płatek w rogu ekranu....
Działa mi tylko na Operze i Konquerorze ;-)
Dzieki za skrypcik :mrgreen:

patrick - 08-12-2004, 20:08

no na mozille takie rzeczy niedzialaja :|
Ignis - 09-12-2004, 05:57

patrick napisał/a:
no na mozille takie rzeczy niedzialaja :|

ten mój skrypcik nie działa u Ciebie na Mozilli? :?
na moim forum spisuje się znakomicie :/
s?yszałam jednak, że moga pojawił się problemy, gdy s± inne jsy na stronie :|

Paszczak000 - 11-12-2004, 22:47

a co.... ¶nieg ma pada? od dołu forum? :lol: :mrgreen:
carol - 11-12-2004, 22:51

Chodzi mi o to że szkoda że nie pada na ca?ym forum tylko w nagłównku!!


Powered by phpBB modified by Przemo © 2003 phpBB Group