PageRenderTime 38ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/products/photocrati_nextgen/modules/ngglegacy/view/album-compact.php

https://bitbucket.org/photocrati/nextgen-gallery
PHP | 60 lines | 41 code | 6 blank | 13 comment | 7 complexity | c5648e3c7d7c8c1b60bd237d2d12849c MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
  1. <?php
  2. /**
  3. Template Page for the album overview
  4. Follow variables are useable :
  5. $album : Contain information about the first album
  6. $albums : Contain information about all albums
  7. $galleries : Contain all galleries inside this album
  8. $pagination : Contain the pagination content
  9. You can check the content when you insert the tag <?php var_dump($variable) ?>
  10. If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
  11. **/
  12. ?>
  13. <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($galleries)) : ?>
  14. <div class="ngg-albumoverview">
  15. <!-- List of galleries -->
  16. <?php foreach ($galleries as $gallery) : ?>
  17. <div class="ngg-album-compact">
  18. <div class="ngg-album-compactbox">
  19. <div class="ngg-album-link">
  20. <a class="Link" href="<?php echo nextgen_esc_url($gallery->pagelink) ?>">
  21. <img class="Thumb" alt="<?php echo esc_attr($gallery->title) ?>" src="<?php echo nextgen_esc_url($gallery->previewurl) ?>"/>
  22. </a>
  23. </div>
  24. </div>
  25. <?php if (!empty($image_gen_params)) {
  26. $max_width = 'style="max-width: ' . ($image_gen_params['width'] + 20) . 'px"';
  27. } else {
  28. $max_width = '';
  29. } ?>
  30. <h4>
  31. <a class="ngg-album-desc"
  32. title="<?php echo esc_attr($gallery->title) ?>"
  33. href="<?php echo nextgen_esc_url($gallery->pagelink) ?>"
  34. <?php echo $max_width; ?>>
  35. <?php echo $gallery->title ?>
  36. </a>
  37. </h4>
  38. <p class="ngg-album-gallery-image-counter">
  39. <?php if (isset($gallery->counter) && $gallery->counter > 0) { ?>
  40. <strong><?php echo $gallery->counter; ?></strong>&nbsp;<?php _e('Photos', 'nggallery'); ?>
  41. <?php } else { ?>
  42. &nbsp;
  43. <?php } ?>
  44. </p>
  45. </div>
  46. <?php endforeach; ?>
  47. <!-- Pagination -->
  48. <br class="ngg-clear"/>
  49. <?php echo $pagination ?>
  50. </div>
  51. <?php endif; ?>