Images, videos, albums. Custom Nextgen.
authorLaury GvR <laury@gaslightmedia.com>
Mon, 27 Oct 2014 19:20:23 +0000 (15:20 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 27 Oct 2014 19:24:12 +0000 (15:24 -0400)
Custom nextgen templates for Album and Thumbnail gallery. Static pages for
videos and gallery. A bunch of CSS, less javascript, NGG removed from editors.

footer.php
nggallery/album-glmalbums.php [new file with mode: 0644]
nggallery/gallery-glmphotos.php [new file with mode: 0644]
page-73.php
page-75.php [new file with mode: 0644]
scss/site/_structure.scss

index 4947150..a4859f7 100644 (file)
 </div>
 <script>
     
-    jQuery(document).ready( function() {
-        
-        jQuery(".ngg-galleryoverview").wrapInner("<ul id='gallery' class='gallery row small-block-grid-2 medium-block-grid-3 large-block-grid-4'></ul>");
-        jQuery("#gallery").unwrap();
-        jQuery(".ngg-gallery-thumbnail-box").wrap("<li></li>").addClass("imgBorderMe");
-        jQuery(".ngg-gallery-thumbnail > span").addClass("photoHead");
+    $(document).ready( function() {
+        $(".ngg-album-compact").css("margin","20px 0 0 !important");
     });
-  jQuery(function() {
-    jQuery('.enews-signup > a').replaceWith('<?php echo $modal_link; ?>');
-    jQuery('.enews-signup > a').on( "click", function() {
-        jQuery(this).modal({
+  $(function() {
+    $('.enews-signup > a').replaceWith('<?php echo $modal_link; ?>');
+    $('.enews-signup > a').on( "click", function() {
+        $(this).modal({
             closeText: '&times;',
             fadeDuration: 250
         });
diff --git a/nggallery/album-glmalbums.php b/nggallery/album-glmalbums.php
new file mode 100644 (file)
index 0000000..3635455
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+/**
+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
+
+ 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 ($galleries)) : ?>
+
+<div class="ngg-albumoverview">
+
+       <!-- 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>
+        <?php if (!empty($image_gen_params)) {
+            $max_width = 'style="max-width: ' . ($image_gen_params['width'] + 20) . 'px"';
+        } else {
+            $max_width = '';
+        } ?>
+        
+            <a class="ngg-album-desc"
+               title="<?php echo esc_attr($gallery->title) ?>"
+               href="<?php echo nextgen_esc_url($gallery->pagelink) ?>"
+               <?php echo $max_width; ?>>
+                    <p class="photoTitle"><?php if (!$image->hidden) { echo esc_attr($gallery->title); }?></p>
+                    
+                    <?php if (@$gallery->counter > 0) : ?>
+                    <p class="ngg-album-gallery-image-counter"><strong><?php echo $gallery->counter ?></strong>&nbsp;<?php _e('Photos', 'nggallery') ?></p>
+                    <?php endif; ?>  
+            </a>
+               
+       </div>
+
+       <?php endforeach; ?>
+
+       <!-- Pagination -->
+    <br class="ngg-clear"/>
+       <?php echo $pagination ?>
+</div>
+
+<?php endif; ?>
diff --git a/nggallery/gallery-glmphotos.php b/nggallery/gallery-glmphotos.php
new file mode 100644 (file)
index 0000000..b4f922b
--- /dev/null
@@ -0,0 +1,73 @@
+<?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)) : ?>
+
+<ul id='gallery' class='gallery row small-block-grid-2 medium-block-grid-3 large-block-grid-4'>
+<?php if ($gallery->show_slideshow) { ?>
+       <!-- Slideshow link -->
+       <div class="slideshowlink">
+               <a class="slideshowlink" href="<?php echo nextgen_esc_url($gallery->slideshow_link) ?>">
+                       <?php echo $gallery->slideshow_link_text ?>
+               </a>
+       </div>
+<?php } ?>
+
+<?php if ($gallery->show_piclens) { ?>
+       <!-- Piclense link -->
+       <div class="piclenselink">
+               <a class="piclenselink" href="<?php echo nextgen_esc_url($gallery->piclens_link) ?>">
+                       <?php _e('[View with PicLens]','nggallery'); ?>
+               </a>
+       </div>
+<?php } ?>
+       
+       <!-- Thumbnails -->
+    <?php $i = 0; ?>
+       <?php foreach ( $images as $image ) : ?>
+       <li>
+            <div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box imgBorderMe" <?php echo $image->style ?> >
+
+                <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); ?>"
+                data-url="<?php echo nggcf_get_field($image->pid, "url"); ?>"
+                data-front-description="<?php echo nggcf_get_field($image->pid, "Front Description"); ?>"
+                <?php echo $image->thumbcode ?> >
+                            <?php if ( !$image->hidden ) { ?>
+                            <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 ?> />
+                            <?php } ?>
+                    </a>
+                    <span class="photoTitle"><?php if (!$image->hidden) { echo esc_attr($image->alttext); }?></span>
+                    <span class="photoHead"><?php if (!$image->hidden) { echo nggcf_get_field($image->pid, "Front Description"); } ?></span>
+                </div>
+                
+            </div>
+        </li>
+       <?php if ( $image->hidden ) continue; ?>
+       <?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
+       <br style="clear: both" />
+       <?php } ?>
+       <?php endforeach; ?>
+       
+       <!-- Pagination -->
+       <?php echo $pagination ?>
+</ul>
+
+<?php endif; ?>
index 89fd976..3b0bcc2 100644 (file)
@@ -33,6 +33,7 @@
 
                 <div id="videogallery">
                     <?php echo do_shortcode("[ngg_images gallery_ids='9' display_type='photocrati-nextgen_basic_thumbnails']")?>
+
                 </div>
                 <footer>
                     <?php wp_link_pages(array('before' => '<nav id="page-nav"><p>' . __('Pages:', 'FoundationPress'), 'after' => '</p></nav>' )); ?>
 <?php do_action('foundationPress_after_content'); ?>
 
 <script>
-    jQuery(document).ready(function(){
-        jQuery(".ngg-fancybox").each(function (){
-            jQuery(this).addClass("various iframe");
-            jQuery(this).attr("href",jQuery(this).children("img").attr("title"));
+    $(document).ready(function(){
+        $(".ngg-fancybox").each(function (){
+            $(this).addClass("various iframe");
+            $(this).attr("href",$(this).attr("data-url"));
         });
+        
     });
 </script>
     
diff --git a/page-75.php b/page-75.php
new file mode 100644 (file)
index 0000000..e8b5d22
--- /dev/null
@@ -0,0 +1,59 @@
+
+<?php get_header(); ?>
+
+<?php do_action('foundationPress_before_content'); ?>
+
+<?php while (have_posts()) : the_post(); ?>
+    <article <?php post_class() ?> id="interior">
+        <header
+        <?php
+            if (has_post_thumbnail()) {
+                    $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
+                    echo ' style="background: url('.$image_data[0].'); min-height: '.$image_data[2].'px;"';
+            }
+            else {
+                    echo ' class="no-image"';
+            }
+        ?>
+        >
+            <h1 class="entry-title">Sanctuary of the great lakes</h1>
+        </header>
+        <div class="row">
+            <div class="small-12 columns">
+                    <?php the_breadcrumbs(">"); ?>
+            </div>
+        </div>
+        <div class="row">
+            <div class="small-12 columns">
+                <?php do_action('foundationPress_page_before_entry_content'); ?>
+                <div class="video-content">
+                <h2><?php the_title();?></h2>
+                <?php the_content(); ?>
+                </div>
+
+                <div id="videogallery">
+                    <?php echo do_shortcode("[ngg_images album_ids='1' display_type='photocrati-nextgen_basic_compact_album']")?>
+
+                </div>
+                <footer>
+                    <?php wp_link_pages(array('before' => '<nav id="page-nav"><p>' . __('Pages:', 'FoundationPress'), 'after' => '</p></nav>' )); ?>
+                    <p><?php the_tags(); ?></p>
+                </footer>
+            </div>
+        </div>
+    </article>
+<?php endwhile;?>
+
+<?php do_action('foundationPress_after_content'); ?>
+
+<script>
+    $(document).ready(function(){
+        $(".ngg-fancybox").each(function (){
+            $(this).addClass("various iframe");
+            $(this).attr("href",$(this).attr("data-url"));
+        });
+        
+    });
+</script>
+    
+<?php get_footer(); ?>
index 41e7cc4..2c44ecf 100644 (file)
@@ -855,15 +855,58 @@ footer {
         margin: 0 0 4px 0 !important;
         padding: 0 !important;
     }
+    .photoTitle {
+        color: #ff9933;
+        font-family: "Lobster Two",cursive;
+        font-weight: 600;
+        font-size: 18px !important;
+        
+        overflow:hidden;
+        line-height: 1.4;
+        margin-bottom: 0;
+        margin-top: 0.2rem;
+        max-height: 50px;
+    }
     .photoHead {
         display: block;
         text-align: center;
-        min-height: 38px;
+/*        min-height: 38px;*/
+        line-height: 1.4;
+        max-height: 85px;
+        overflow:hidden;
         margin: 0 !important;
         padding: 5px;
         background: none;
+        font-size: 15px !important;
+    }
+    .ngg-glmalbums {
+        float: left;
+        text-align: left;
+        margin-bottom: 30px;
+        height: 275px;
+        .photoTitle {
+            margin-top: 8px;
+        }
+    }
+    .ngg-album-compactbox {
+        padding: 0 2% !important;
+        margin: 0 auto !important;
+        width: 90%;
+        .ngg-album-link {
+            text-align: center;
+        }
+    }
+    .ngg-album-desc {
+/*        margin: 1px !important;*/
+        width: 90%;
+    }
+    #fancybox-title {
+        font: arial 16px normal 400;
+        line-height: 25.6px;
+    }
+    .ngg-album-gallery-image-counter {
+        font-size: 13px;
     }
-
     /**
      * 4.2 Posts
      * ------------------------------------