Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> galeria zdjec
MitS
post 16.03.2007, 17:32:26
Post #1





Grupa: Zarejestrowani
Postów: 262
Pomógł: 5
Dołączył: 8.02.2005
Skąd: Olsztyn / Zatorze

Ostrzeżenie: (0%)
-----


Witam!

Mam problem ze stworzeniem galerii zdjęć w js (tzn galerie mam zrobioną ale chodzi o jeden efekt)
Ponizej zapodaje kod, a za chwilke wszystko wytłumaczę...

  1. <?php
  2. ...
  3. ...
  4. ...
  5. <div class="table">
  6. <div class="tr">';
  7.  
  8. while(($file = readdir($fds)) !== false)
  9. {
  10. if ($file != "." && $file != "..")
  11. {
  12. $i++;
  13.  
  14. echo '
  15. <div class="td">
  16. <div class="img-box">
  17. <a href="./_gallery/_big/_'.$gl_dir.'/'.$file.'" onfocus="blur();">
  18. <img class="no-border gimg" src="./_gallery/_small/_'.$gl_dir.'/'.$file.'" alt="" />
  19. </a>
  20. <div class="number">0'.$i.'</div>
  21. <div class="loup">
  22. <a href="./_gallery/_big/_'.$gl_dir.'/'.$file.'" onfocus="blur();">
  23. <img class="no-border" src="./_gfx/loup.jpg" alt="" />
  24. </a>
  25. </div>
  26. </div>
  27. </div>';
  28.  
  29. if(($gl_counter >= $gl_cols) && (($gl_counter % $gl_cols) == 0))
  30. {
  31. echo '
  32. </div>
  33. <div class="tr">';
  34. }
  35. $gl_counter++;
  36. }
  37. }
  38. echo '</div>';
  39. closedir($fdb);
  40. closedir($fds);
  41. echo '
  42. </div>
  43. ...
  44. ...
  45. ...
  46. ?>


jest taka linijka ktora odpowiedzialna jest za wyswietlanie zdjec wiekszych od miniaturek ale o tej samej nazwie (tylko w innym folderze).

<a href="./_gallery/_big/_'.$gl_dir.'/'.$file.'" onfocus="blur();">
<img class="no-border gimg" src="./_gallery/_normal/_'.$gl_dir.'/'.$file.'" alt="" />
</a>


potem mam petle, ktora wyswietla wszystkie obrazki z miniaturkami w odpowiednim miejscu:
<div class="img-box">
<a href="./_gallery/_big/_'.$gl_dir.'/'.$file.'" onfocus="blur();">
<img class="no-border gimg" src="./_gallery/_small/_'.$gl_dir.'/'.$file.'" alt="" />
</a>
<div class="number">0'.$i.'</div>
<div class="loup">
<a href="./_gallery/_big/_'.$gl_dir.'/'.$file.'" onfocus="blur();">
<img class="no-border" src="./_gfx/loup.jpg" alt="" />
</a>
</div>
</div>

i chcem zrobic by po kliknieciu w taką miniature pokazalo mi sie zdjecie bez przeladowania strony w polu wyżej czyli tu:
<a href="./_gallery/_big/_'.$gl_dir.'/'.$file.'" onfocus="blur();">
<img class="no-border gimg" src="./_gallery/_normal/_'.$gl_dir.'/'.$file.'" alt="" />
</a>

jak to uczynic bez przeladowania strony questionmark.gif?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 10:07