|
<h1>Gallery</h1> |
|
<div id="thumbnail_controls"> |
|
<a href="#" id="prev_button"><img src="/images/lightbox/leftarrow.png" /></a> |
|
<a href="#" id="next_button"><img src="/images/lightbox/rightarrow.png" /></a> |
|
</div> |
|
<div id="gallery_holder" class="wrapper"> |
|
<? |
|
if(!function_exists("sizedPhoto")) { |
|
function sizedPhoto($photoPath, $thumb = false) { |
|
return substr($thumb ? |
|
DynamicImage_Controller::generate_cache(array('src' => $photoPath, 'width' => 50, 'height' => 50, 'maintain_ratio' => 'width', 'filter' => 'c')) : |
|
DynamicImage_Controller::generate_cache(array('src' => $photoPath, 'width' => 800, 'height' => 500, 'maintain_ratio' => 'auto')) |
|
, strlen(DOCROOT) - 1); |
|
} |
|
} |
|
|
|
$l = 0; |
|
|
|
foreach($galleries as $galleryInfo): |
|
echo "<h2>{$galleryInfo['title']}</h2><hr/>"; |
|
echo "<div class=\"wrapper\">"; |
|
|
|
foreach($galleryInfo['subgalleries'] as $subGalleryInfo): |
|
?> |
|
<div id='gallery-<?=$l++?>' class='gallery_holder'> |
|
<div class='picture_holder'> |
|
<?$thumbnailImage = $subGalleryInfo['folder'][0];?> |
|
<a href="<?=sizedPhoto($thumbnailImage)?>" title="Comment here"><img src="<?=substr(DynamicImage_Controller::generate_cache(array('src' => $thumbnailImage, 'width' => 200, 'height' => 200, 'maintain_ratio' => 'width', 'filter' => 'c')), strlen(DOCROOT) - 1)?>" /></a> |
|
</div> |
|
<div class="thumbnail_holder"> |
|
<h4>Viewing Gallery: <?=$subGalleryInfo['title']?></h4> |
|
<div class='infinite_width'> |
|
<? |
|
// these are the thumbnails |
|
foreach($subGalleryInfo['folder'] as $photo) { |
|
echo '<a href="'.sizedPhoto($photo).'" title="a comment" class="hidden"><img src="" data-src="'.sizedPhoto($photo, true).'" /></a>'; |
|
} |
|
?> |
|
</div> |
|
</div> |
|
<h4><?=$subGalleryInfo['title']?></h4> |
|
</div> |
|
<?endforeach;?> |
|
</div> |
|
<?endforeach;?> |
|
</div> |