예제 #1
0
 /**
  * @param Gallery $gallery
  */
 public function setGallery($gallery)
 {
     $this->gallery = $gallery;
     $gallery->getPhotos()->add($this);
 }
예제 #2
0
<?php

require_once 'libs/gallery.php';
$gallery = new Gallery();
$gallery->loadGallery('imgs/gallery/' . $page->getYear());
$photos = $gallery->getPhotos();
?>
<div class="photos full-section">
<?php 
foreach ($photos as $index => $photo) {
    ?>
	<a href="#" onclick="javascript:PhotoViewer.open(<?php 
    echo $index;
    ?>
);return false;" class="photo-mini" data-index="<?php 
    echo $index;
    ?>
" data-orig-image="<?php 
    echo $photo['original'];
    ?>
" data-width="<?php 
    echo $photo['width'];
    ?>
" data-height="<?php 
    echo $photo['height'];
    ?>
"><img src="<?php 
    echo $photo['thumbnail'];
    ?>
"></a>
	<?php