Advertisement
Guest User

NGG Custom Fields Example

a guest
May 1st, 2013
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.04 KB | None | 0 0
  1. <?php
  2. /**
  3. Template Page for the gallery overview
  4.  
  5. Follow variables are useable :
  6.  
  7.     $gallery     : Contain all about the gallery
  8.     $images      : Contain all images, path, title
  9.     $pagination  : Contain the pagination content
  10.  
  11.  You can check the content when you insert the tag <?php var_dump($variable) ?>
  12.  If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
  13. **/
  14. ?>
  15. <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
  16.  
  17. <div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
  18.  
  19. <?php if ($gallery->show_slideshow) { ?>
  20.     <!-- Slideshow link -->
  21.     <div class="slideshowlink">
  22.         <a class="slideshowlink" href="<?php echo $gallery->slideshow_link ?>">
  23.             <?php echo $gallery->slideshow_link_text ?>
  24.         </a>
  25.     </div>
  26. <?php } ?>
  27.  
  28. <?php if ($gallery->show_piclens) { ?>
  29.     <!-- Piclense link -->
  30.     <div class="piclenselink">
  31.         <a class="piclenselink" href="<?php echo $gallery->piclens_link ?>">
  32.             <?php _e('[View with PicLens]','nggallery'); ?>
  33.         </a>
  34.     </div>
  35. <?php } ?>
  36.    
  37.     <!-- Thumbnails -->
  38.     <?php foreach ( $images as $image ) : ?>
  39.    
  40.     <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
  41.         <div class="ngg-gallery-thumbnail" >
  42.             <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
  43.                 <?php if ( !$image->hidden ) { ?>
  44.                 <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
  45.                 <?php } ?>
  46.             </a>
  47.             <?php echo $image->ngg_custom_fields['Title'] ?><br />
  48.             <?php echo $image->ngg_custom_fields['Description'] ?>
  49.  
  50.         </div>
  51.     </div>
  52.    
  53.     <?php if ( $image->hidden ) continue; ?>
  54.     <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
  55.         <br style="clear: both" />
  56.     <?php } ?>
  57.  
  58.     <?php endforeach; ?>
  59.    
  60.     <!-- Pagination -->
  61.     <?php echo $pagination ?>
  62.    
  63. </div>
  64.  
  65. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement