Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Losowe zdjęcia z Coppermine Photo Gallery, Problem z wyświetlaniem zdjęć
polskieogloszeni...
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 3.04.2007

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


Jestem zupełnie zielony, co widać.

Chciałbym na swojej stronie wyświetlić losowe zdjęcia z galerii.
Znalazłem coś w miarę odpowiedniego, tylko nie wiem jak to dostosować.

Chodzi mi o to żeby po kliknięciu na miniaturkę strona galerii otworzyła się w pełnym oknie.
Oraz, żeby dane typu autor i ilość razy, jaką oglądano, była wyświetlana pod zdjęciem.
I jeszcze brak niebieskiej ramki wokół zdjęcia.

Będę wdzięczny jeśli ktoś pomoże w rozwoju polonii na obczyźnie ;-)


Galeria: Coppermine Photo Gallery

http://www.york.net.pl/galeria/get_photo.php

  1. -- zawartośc pliku get_photo.php --
  2.  
  3.  
  4. <?php 
  5. // ------------------------------------------------------------------------- //
  6. // Coppermine Photo Gallery - random photo displayer  //
  7. // ------------------------------------------------------------------------- //
  8. // Based on Dr. Tarique Sani RSS feed for Coppermine  //
  9. //
  10. // Adapted by djib to display a random photo - http://djib.biz //
  11. // This program is free software; you can redistribute it and/or modify  //
  12. // it under the terms of the GNU General Public License as published by  //
  13. // the Free Software Foundation; either version 2 of the License, or //
  14. // (at your option) any later version. //
  15. // ------------------------------------------------------------------------- //
  16. // Just put into the same directory as your coppermine installation  //
  17. // ------------------------------------------------------------------------ //
  18.  
  19. define('IN_COPPERMINE', true);
  20. define('INDEX_PHP', true);
  21. require('include/init.inc.php');
  22.  
  23. //How many items you want to show
  24. $thumb_per_page = 3;
  25.  
  26. $thumb_count = 4;
  27. $lower_limit = 0;
  28.  
  29.  
  30. $album = 'random';
  31.  
  32.  
  33. //Changes these to point to your site if the following is not giving correct resul
    ts.
  34. $link_url = $CONFIG['ecards_more_pic_target']."displayimage.php?pos=-";
  35. $image_url = $CONFIG['ecards_more_pic_target']."albums/";
  36.  
  37.  
  38. $data = get_pic_data($album, $thumb_count, $album_name, $lower_limit, $thumb_per_page);
  39.  
  40.  
  41. foreach($data AS $picture) {
  42.  
  43. $thumb_url = "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
  44. $keywords = explode(" ",trim($picture[keywords]));
  45. $category_string = "";
  46. $pubDate = gmdate("D, d M Y H:i:s", $picture[ctime]);
  47. $description = '<a href="' . $link_url . $picture['pid'] . '"><img src="' . $thumb_url . '" alt="Random image"/></a>'.bb_decode($picture[caption]).bb_decode($picture[caption_text]);
  48. echo $description;
  49. }
  50.  
  51. ?>


Ten post edytował polskieogloszenia 1.05.2007, 15:00:39
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
svalmont
post
Post #2





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 25.04.2013

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


Pozwolę sobie odświeżyć temat.
Jak zmienić kod tak aby było kilka losowych zdjęć bo zwykłe kopiowanie częsci skryptu pozwala tylko na wyswietlenie dwóch tych samych zdjęć

Ten post edytował svalmont 29.04.2013, 15:04:48
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 5.10.2025 - 14:09