SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | /** | |
| 3 | Template Page for the gallery overview with DOWNLOAD LINKS for photos; requires force-download.php | |
| 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 | <h1><?php echo $gallery->description ?></h1> | |
| 38 | <p><a class="block-button button-nb" title="regresar" href="../">Regresar a Categorías</a></p><br /> | |
| 39 | <!-- Thumbnails --> | |
| 40 | <?php foreach ( $images as $image ) : ?> | |
| 41 | ||
| 42 | <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> > | |
| 43 | <div class="ngg-gallery-thumbnail" > | |
| 44 | <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->alttext ?>" <?php echo $image->thumbcode ?> > <!-- changed title description to alttext NB --> | |
| 45 | ||
| 46 | <?php if ( !$image->hidden ) { ?>
| |
| 47 | <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> | |
| 48 | <?php } ?> | |
| 49 | </a> | |
| 50 | <!-- ADD DOWNLOAD LINK, changed image-caption to image-alttext --> | |
| 51 | <span><?php echo $image->alttext ?><br /><?php if ($image->caption!=" "){echo $image->caption ?> <?php }; ?><a href=" <?php home_url(); ?> /force-download.php?file=<?php echo substr(parse_url($image->imageURL,PHP_URL_PATH),1); ?> ">Download</a></span>
| |
| 52 | </div> | |
| 53 | </div> | |
| 54 | <?php if ( $image->hidden ) continue; ?> | |
| 55 | <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
| |
| 56 | <br style="clear: both" /> | |
| 57 | <?php } ?> | |
| 58 | <?php endforeach; ?> | |
| 59 | ||
| 60 | <!-- Pagination --> | |
| 61 | <?php echo $pagination ?> | |
| 62 | ||
| 63 | </div> | |
| 64 | ||
| 65 | <?php endif; ?> |