Advertisement
Guest User

NGG v2.0.x with NGG Voting tag

a guest
Oct 15th, 2013
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.85 KB | None | 0 0
  1. <?php
  2.  
  3. $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery);
  4.  
  5. ?>
  6. <div
  7.     class="ngg-galleryoverview"
  8.     id="ngg-gallery-<?php echo_h($displayed_gallery_id)?>-<?php echo_h($current_page)?>">
  9.  
  10.     <?php if (!empty($slideshow_link)): ?>
  11.     <div class="slideshowlink">
  12.         <a href='<?php echo $slideshow_link ?>'><?php echo $slideshow_link_text ?></a>
  13.        
  14.     </div>
  15.     <?php endif ?>
  16.  
  17.     <?php if ($show_piclens_link): ?>
  18.     <!-- Piclense link -->
  19.     <div class="piclenselink">
  20.         <a class="piclenselink" href="<?php echo esc_attr($piclens_link) ?>">
  21.             <?php echo_h($piclens_link_text); ?>
  22.         </a>
  23.     </div>
  24.     <?php endif ?>
  25.     <?php
  26.  
  27.     $this->start_element('nextgen_gallery.image_list_container', 'container', $images);
  28.  
  29.     ?>
  30.     <!-- Thumbnails -->
  31.     <?php for ($i=0; $i<count($images); $i++):
  32.        $image = $images[$i];
  33.        $thumb_size = $storage->get_image_dimensions($image, $thumbnail_size_name);
  34.        $style = isset($image->style) ? $image->style : null;
  35.  
  36.        if (isset($image->hidden) && $image->hidden) {
  37.           $style = 'style="display: none;"';
  38.        }
  39.        else {
  40.             $style = null;
  41.        }
  42.  
  43.              $this->start_element('nextgen_gallery.image_panel', 'item', $image);
  44.  
  45.             ?>
  46.             <div id="<?php echo_h('ngg-image-' . $i) ?>" class="ngg-gallery-thumbnail-box" <?php if ($style) echo $style; ?>>
  47.                 <?php
  48.  
  49.                 $this->start_element('nextgen_gallery.image', 'item', $image);
  50.  
  51.                 ?>
  52.         <div class="ngg-gallery-thumbnail">
  53.             <a href="<?php echo esc_attr($storage->get_image_url($image))?>"
  54.                title="<?php echo esc_attr($image->description)?>"
  55.                data-image-id='<?php echo esc_attr($image->pid); ?>'
  56.                <?php echo $effect_code ?>>
  57.                 <img
  58.                     title="<?php echo esc_attr($image->alttext)?>"
  59.                     alt="<?php echo esc_attr($image->alttext)?>"
  60.                     src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name))?>"
  61.                     width="<?php echo esc_attr($thumb_size['width'])?>"
  62.                     height="<?php echo esc_attr($thumb_size['height'])?>"
  63.                     style="max-width:none;"
  64.                 />
  65.             </a>
  66.         </div>
  67.        
  68.         <?php echo nggv_imageVoteForm($image->pid); ?>
  69.        
  70.                 <?php
  71.  
  72.                 $this->end_element();
  73.  
  74.                 ?>
  75.             </div>
  76.             <?php
  77.  
  78.             $this->end_element();
  79.  
  80.             ?>
  81.  
  82.         <?php if ($number_of_columns > 0): ?>
  83.             <?php if ((($i + 1) % $number_of_columns) == 0 ): ?>
  84.                 <br style="clear: both" />
  85.             <?php endif; ?>
  86.         <?php endif; ?>
  87.  
  88.     <?php endfor ?>
  89.     <?php
  90.  
  91.     $this->end_element();
  92.  
  93.     ?>
  94.  
  95.     <?php if ($pagination): ?>
  96.     <!-- Pagination -->
  97.     <?php echo $pagination ?>
  98.     <?php else: ?>
  99.     <div class="ngg-clear"></div>
  100.     <?php endif ?>
  101. </div>
  102. <?php $this->end_element(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement