Skip to content

Instantly share code, notes, and snippets.

@fabiangarga
Created May 2, 2014 17:25
Show Gist options
  • Save fabiangarga/6711525b82a82b5244d0 to your computer and use it in GitHub Desktop.
Save fabiangarga/6711525b82a82b5244d0 to your computer and use it in GitHub Desktop.
<img class="lazy" title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" data-original="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> /><?php
/**
Template Page for the gallery overview
Follow variables are useable :
$gallery : Contain all about the gallery
$images : Contain all images, path, title
$pagination : Contain the pagination content
You can check the content when you insert the tag <?php var_dump($variable) ?>
If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
**/
?>
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
<div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
<?php if ($gallery->show_slideshow) { ?>
<!-- Slideshow link -->
<div class="slideshowlink">
<a class="slideshowlink" href="<?php echo nextgen_esc_url($gallery->slideshow_link) ?>">
<?php echo $gallery->slideshow_link_text ?>
</a>
</div>
<?php } ?>
<?php if ($gallery->show_piclens) { ?>
<!-- Piclense link -->
<div class="piclenselink">
<a class="piclenselink" href="<?php echo nextgen_esc_url($gallery->piclens_link) ?>">
<?php _e('[View with PicLens]','nggallery'); ?>
</a>
</div>
<?php } ?>
<!-- Thumbnails -->
<?php $i = 0; ?>
<?php foreach ( $images as $image ) : ?>
<div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
<div class="ngg-gallery-thumbnail" >
<a href="<?php echo nextgen_esc_url($image->imageURL); ?>"
title="<?php esc_attr($image->alttext); ?>"
data-src="<?php echo nextgen_esc_url($image->imageURL); ?>"
data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
data-image-id="<?php echo esc_attr($image->pid); ?>"
data-title="<?php echo esc_attr($image->alttext); ?>"
data-description="<?php echo esc_attr($image->description); ?>"
<?php echo $image->thumbcode ?> >
<?php if ( !$image->hidden ) { ?>
<img class="lazy" title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" data-original="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> />
<?php } ?>
<strong> <?php echo esc_attr($image->alttext); ?> </strong>
</a>
</div>
</div>
<?php if ( $image->hidden ) continue; ?>
<?php if ($gallery->columns > 0): ?>
<?php if ((($i + 1) % $gallery->columns) == 0 ): ?>
<br style="clear: both" />
<?php endif; ?>
<?php endif; ?>
<?php $i++; ?>
<?php endforeach; ?>
<!-- Pagination -->
<?php echo $pagination ?>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment