czwartek, 19 stycznia 2012

ZenPhoto - integracja z własną stroną

<?php
define('WEBPATH', 'sciezka_do_zenphoto');
require_once(WEBPATH . "/zp-core/template-functions.php");

$ts = 140; // szerokosc i wysokosc miniaturki
$zw = 960; // szerokosc powiekszenia
$an = "moj-album"; // nazwa albumu, ktory wyswietlamy

$galleryobject = new Gallery();
$albumobject = new Album($galleryobject, $an);
makeAlbumCurrent($albumobject);
$images = $albumobject->getImages();
while (next_image($images)) {
$thumb = htmlspecialchars(getCustomImageURL(NULL,$ts,$ts,$ts,$ts));
$thumb_html = '<img src="'.$thumb.'" alt="" width="'.$ts.'" height="'.$ts.'"/>';
$zoom = htmlspecialchars($_zp_current_image->getCustomImage(NULL,$zw,NULL,NULL,NULL,NULL,NULL));
$zoom_html = '<a href="'.$zoom.'">'.$thumb_html.'</a>';

echo $zoom_html;
}
?>

Brak komentarzy:

Prześlij komentarz