Update nextgen template
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 30 Jul 2015 17:53:37 +0000 (13:53 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 30 Jul 2015 17:53:37 +0000 (13:53 -0400)
If the photo title matches is0 pattern, then don't show title.

nggallery/gallery-glmphotos.php

index d2dc85b..73e7cc3 100644 (file)
@@ -34,9 +34,18 @@ Follow variables are useable :
                             <?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>