PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/products/photocrati_nextgen/modules/nextgen_basic_album/templates/compact.php

https://bitbucket.org/photocrati/nextgen-gallery
PHP | 58 lines | 58 code | 0 blank | 0 comment | 7 complexity | 9f346aef8938fb2927a8fdfe13a34635 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
  1. <?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?>
  2. <div class="ngg-albumoverview">
  3. <?php foreach ($galleries as $gallery) { ?>
  4. <div class="ngg-album-compact">
  5. <div class="ngg-album-compactbox">
  6. <div class="ngg-album-link">
  7. <?php $this->start_element('nextgen_gallery.album_gallery', 'item', $gallery); ?>
  8. <?php if ($open_gallery_in_lightbox AND $gallery->entity_type == 'gallery'): ?>
  9. <a
  10. <?php echo $gallery->displayed_gallery->effect_code ?>
  11. href="<?php echo esc_attr($gallery->previewpic_fullsized_url)?>"
  12. data-fullsize="<?php echo esc_attr($gallery->previewpic_fullsized_url) ?>"
  13. data-src="<?php echo esc_attr($gallery->previewpic_fullsized_url) ?>"
  14. data-thumbnail="<?php echo esc_attr($gallery->previewurl)?>"
  15. data-title="<?php echo esc_attr($gallery->previewpic_image->alttext)?>"
  16. data-description="<?php echo esc_attr(stripslashes($gallery->previewpic_image->description))?>"
  17. data-image-id="<?php echo esc_attr($gallery->previewpic)?>"
  18. >
  19. <img class="Thumb"
  20. alt="<?php echo esc_attr($gallery->title); ?>"
  21. src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/>
  22. </a>
  23. <?php else: ?>
  24. <a class="Link gallery_link" href="<?php echo nextgen_esc_url($gallery->pagelink); ?>">
  25. <img class="Thumb"
  26. alt="<?php echo esc_attr($gallery->title); ?>"
  27. src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/>
  28. </a>
  29. <?php endif ?>
  30. <?php $this->end_element(); ?>
  31. </div>
  32. </div>
  33. <?php if (!empty($image_gen_params)) {
  34. $max_width = 'style="max-width: ' . ($image_gen_params['width'] + 20) . 'px"';
  35. } else {
  36. $max_width = '';
  37. } ?>
  38. <h4>
  39. <a class="ngg-album-desc"
  40. title="<?php echo esc_attr($gallery->title); ?>"
  41. href="<?php echo nextgen_esc_url($gallery->pagelink); ?>"
  42. <?php echo $max_width; ?>>
  43. <?php echo_safe_html($gallery->title); ?>
  44. </a>
  45. </h4>
  46. <p class="ngg-album-gallery-image-counter">
  47. <?php if (isset($gallery->counter) && $gallery->counter > 0) { ?>
  48. <strong><?php echo $gallery->counter; ?></strong>&nbsp;<?php _e('Photos', 'nggallery'); ?>
  49. <?php } else { ?>
  50. &nbsp;
  51. <?php } ?>
  52. </p>
  53. </div>
  54. <?php } ?>
  55. <br class="ngg-clear"/>
  56. <?php echo $pagination ?>
  57. </div>
  58. <?php $this->end_element(); ?>