Album ajax pagination made available.
authorLaury GvR <laury@gaslightmedia.com>
Tue, 15 Sep 2015 13:10:02 +0000 (09:10 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 15 Sep 2015 13:10:02 +0000 (09:10 -0400)
nggallery/album-glmalbums.php
nggallery/gallery-glmphotos.php

index b971e71..9ebf91f 100644 (file)
@@ -4,10 +4,10 @@ Template Page for the album overview
 
 Follow variables are useable :
 
-    $album              : Contain information about the first album
-    $albums             : Contain information about all albums
-       $galleries   : Contain all galleries inside this album
-       $pagination  : Contain the pagination content
+    $album       : Contain information about the first album
+    $albums      : Contain information about all albums
+    $galleries   : Contain all galleries inside this album
+    $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'] ?>
@@ -17,25 +17,23 @@ Follow variables are useable :
 
 <div class="ngg-albumoverview">
 
-       <!-- List of galleries -->
-       <?php foreach ($galleries as $gallery) : ?>
+    <!-- List of galleries -->
+    <?php foreach ($galleries as $gallery) : ?>
 
-       <div class="ngg-glmalbums small-6 medium-4 large-3">
-               <div class="ngg-album-compactbox">
-                       <div class="ngg-album-link">
-                               <a class="Link" href="<?php echo nextgen_esc_url($gallery->pagelink) ?>">
-                                       <img class="Thumb" alt="<?php echo esc_attr($gallery->title) ?>" src="<?php echo nextgen_esc_url($gallery->previewurl) ?>"/>
-                               </a>
-                       </div>
-               </div>
+    <div class="ngg-glmalbums ngg-album-compact small-6 medium-4 large-3">
+        <div class="ngg-album-compactbox">
+            <div class="ngg-album-link">
+                <a class="Link" href="<?php echo nextgen_esc_url($gallery->pagelink) ?>">
+                    <img class="Thumb" alt="<?php echo esc_attr($gallery->title) ?>" src="<?php echo nextgen_esc_url($gallery->previewurl) ?>"/>
+                </a>
+            </div>
+        </div>
         <?php if (!empty($image_gen_params)) {
             $max_width = 'style="max-width: ' . ($image_gen_params['width'] + 20) . 'px"';
         } else {
             $max_width = '';
         } ?>
-        
-            
-            
+        <section class="album-meta-wrapper">
             <h4>
                 <a class="ngg-album-desc"
                    title="<?php echo esc_attr($gallery->title); ?>"
@@ -51,14 +49,12 @@ Follow variables are useable :
                     &nbsp;
                 <?php } ?>
             </p>
-               
-       </div>
-
-       <?php endforeach; ?>
-
-       <!-- Pagination -->
+        </section>
+    </div>
+    <?php endforeach; ?>
+    <!-- Pagination -->
     <br class="ngg-clear"/>
-       <?php echo $pagination ?>
+    <?php echo $pagination ?>
 </div>
 
 <?php endif; ?>
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; ?>