Separate notitles template into a separate file
authorLaury GvR <laury@gaslightmedia.com>
Tue, 18 Jun 2019 17:40:13 +0000 (13:40 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 18 Jun 2019 17:40:13 +0000 (13:40 -0400)
nggallery/gallery-glmphotos-notitles.php [new file with mode: 0644]
nggallery/gallery-glmphotos.php

diff --git a/nggallery/gallery-glmphotos-notitles.php b/nggallery/gallery-glmphotos-notitles.php
new file mode 100644 (file)
index 0000000..3fe2e78
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+Template Page for the gallery overview
+
+Follow variables are useable :
+
+       $gallery     : Contain all about the gallery
+       $images      : Contain all images, path, title
+       $pagination  : Contain the pagination content
+
+ You can check the content when you insert the tag <?php var_dump($variable) ?>
+ If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
+**/
+?>
+<?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 small-block-grid-2 medium-block-grid-3 large-block-grid-4">
+       <?php foreach ( $images as $image ) : ?>
+        <li>
+            <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box imgBorderMe">
+
+                <div class="ngg-gallery-thumbnail" >
+                    <a href="<?php echo nextgen_esc_url($image->imageURL) ?>"
+                title="<?php echo esc_attr($image->description) ?>"
+                data-src="<?php echo nextgen_esc_url($image->imageURL) ?>"
+                data-thumbnail="<?php echo nextgen_esc_url($image->thumbnailURL); ?>"
+                data-image-id="<?php echo esc_attr($image->pid); ?>"
+                data-title="<?php echo esc_attr($image->alttext); ?>"
+                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 ?> />
+                        </div>
+                    <?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; ?>
+       <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
+       <!--<br style="clear: both" />-->
+       <?php } ?>
+       <?php endforeach; ?>
+        </ul>
+       <!-- Pagination -->
+       <?php echo $pagination ?>
+</ul>
+</div>
+
+<?php endif; ?>
index 3fe2e78..2decd8d 100644 (file)
@@ -41,11 +41,11 @@ Follow variables are useable :
                             <?php echo $image->size ?> />
                         </div>
                     <?php
-                    //$imageTitle = !preg_match(';is\d{2,}-\d{10,}-\d{5,}$;', $image->alttext) ? $image->alttext: '';
+                    $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>-->
+                    <span class="photoTitle" title="<?php echo esc_attr($imageTitle) ?>">
+                        <?php if (!$image->hidden) { echo esc_attr($imageTitle); }?>
+                    </span>
                             <?php } ?>
                     </a>
                 </div>