Next Gen Gallery template update
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 30 Jul 2015 20:55:11 +0000 (16:55 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 30 Jul 2015 20:55:11 +0000 (16:55 -0400)
Update template to have the new div to make the ajax paging work.
Update image name so if it matches an is0 image name it doens'n display
the alttext.

root/nggallery/gallery-glmphotos.php

index 74ac570..c5329e2 100644 (file)
@@ -1,4 +1,4 @@
-<?php 
+<?php
 /**
 Template Page for the gallery overview
 
@@ -14,6 +14,7 @@ Follow variables are useable :
 ?>
 <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
 
+<div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
        <!-- Thumbnails -->
     <?php $i = 0; ?>
         <ul class="gallery row small-block-grid-2 medium-block-grid-3 large-block-grid-4">
@@ -31,15 +32,24 @@ Follow variables are useable :
                 data-description="<?php echo esc_attr($image->description); ?>"
                 <?php echo $image->thumbcode ?> >
                             <?php if ( !$image->hidden ) { ?>
-                        
+
                         <div class="image_overlay">
-                            <img title="<?php echo esc_attr($image->alttext) ?>" alt="<?php echo esc_attr($image->alttext) ?>" src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>" <?php echo $image->size ?> />
+                            <img
+                            title="<?php echo esc_attr($image->alttext) ?>"
+                            alt="<?php echo esc_attr($image->alttext) ?>"
+                            src="<?php echo nextgen_esc_url($image->thumbnailURL) ?>"
+                            <?php echo $image->size ?> />
                         </div>
-                    <span class="photoTitle" title="<?php echo esc_attr($image->alttext) ?>"><?php if (!$image->hidden) { echo esc_attr($image->alttext); }?></span>
+                    <?php
+                    $imageTitle = !preg_match(';is\d{2,}-\d{10,}-\d{5,}$;', $image->alttext) ? $image->alttext: '';
+                    ?>
+                    <span class="photoTitle" title="<?php echo esc_attr($imageTitle) ?>">
+                        <?php if (!$image->hidden) { echo esc_attr($imageTitle); }?>
+                    </span>
                             <?php } ?>
                     </a>
                 </div>
-                
+
             </div>
         </li>
        <?php if ( $image->hidden ) continue; ?>
@@ -51,5 +61,6 @@ Follow variables are useable :
        <!-- Pagination -->
        <?php echo $pagination ?>
 </ul>
+</div>
 
 <?php endif; ?>