Advertisement
Guest User

album-lighbox.php

a guest
Oct 4th, 2012
3,553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.86 KB | None | 0 0
  1. <?php
  2. /**
  3. Template Page for the album overview
  4.  
  5. Follow variables are useable :
  6.  
  7.     $album       : Contain information about the album
  8.     $galleries   : Contain all galleries inside this album
  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 ($galleries)) : ?>
  16.  
  17. <div class="ngg-albumoverview">    
  18.  
  19.     <!-- List of galleries -->
  20.     <?php foreach ($galleries as $gallery) : ?>
  21.    
  22.     <div class="ngg-album-compact">
  23.         <div class="ngg-album-compactbox">
  24.             <div class="ngg-album-link"  id="<?php echo $gallery->name ?>">
  25. <?php $images =  nggGetGallery( $gallery->gid );
  26. $imgcntr = 0;
  27. ?>
  28.         <?php foreach ( $images as $image ) : ?>
  29.             <?php if ( $imgcntr == 0 ): ?>
  30.                 <a href="<?php echo $image->imageURL ?>" title="<?php echo str_replace("\"", "'", $image->description); ?>" <?php echo $image->thumbcode ?> >
  31.                     <img class="Thumb" alt="<?php echo $gallery->title ?>" src="<?php echo $gallery->previewurl ?>"/>
  32.                 </a>
  33.                 <?php $imgcntr++; ?>
  34.             <?php else: ?>
  35.                 <a href="<?php echo $image->imageURL ?>" title="<?php echo str_replace("\"", "'", $image->description); ?>" <?php echo $image->thumbcode ?> ></a>
  36.             <?php endif; ?>
  37.         <?php endforeach; ?>
  38.             </div>
  39.         </div>
  40.         <h4><a class="ngg-album-desc" title="<?php echo $gallery->title ?>" href="<?php echo $gallery->pagelink ?>" ><?php echo $gallery->title ?></a></h4>
  41.         <?php if ($gallery->counter > 0) : ?>
  42.         <p><strong><?php echo $gallery->counter ?></strong> <?php _e('Photos', 'nggallery') ?></p>
  43.         <?php endif; ?>
  44.     </div>
  45.  
  46.     <?php endforeach; ?>
  47.    
  48.     <!-- Pagination -->
  49.     <?php echo $pagination ?>
  50.  
  51. </div>
  52.  
  53. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement