Adding home page video template for nextgen
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 17 Jul 2017 15:52:13 +0000 (11:52 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 17 Jul 2017 15:52:13 +0000 (11:52 -0400)
Adding new template for the home page videos

nggallery/gallery-troutcreek-videos.php [new file with mode: 0644]
sections/front-page.php

diff --git a/nggallery/gallery-troutcreek-videos.php b/nggallery/gallery-troutcreek-videos.php
new file mode 100644 (file)
index 0000000..fdfaa6c
--- /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 } ?>
+       <!-- 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 nggcf_get_field($image->pid, "video_url"); ?>"
+                    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, "video_url"); ?>"
+                    <?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>
+                    <span class="photoTitle"><?php if (!$image->hidden) { echo esc_attr($image->alttext); }?></span>
+
+                            <?php } ?>
+                    <span class="vidoverlay"></span>
+                    </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; ?>
+
+       <!-- Pagination -->
+       <?php echo $pagination ?>
+</ul>
+<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"));
+        });
+    });
+</script>
+<?php endif; ?>
index cbc939b..5168c48 100644 (file)
@@ -1,15 +1,26 @@
-                    <main class="page-front">
-                        <?php get_template_part('parts/slide-show');?>
-                        <?php get_template_part('parts/reservation');?>
-                        <div id="content-wrapper">
-                            <div class="row" data-equalizer data-options="equalize_on_stack: false">
-                                <?php
-                                get_template_part('parts/glm-blocks');
-                                ?>
-                            </div>
-                            <div class="row">
-                                <?php get_template_part('parts/main-content');?>
-                            </div>
-
-                        </div>
-                    </main>
\ No newline at end of file
+<main class="page-front">
+    <?php get_template_part('parts/slide-show');?>
+    <?php get_template_part('parts/reservation');?>
+    <div id="content-wrapper">
+        <div class="row" data-equalizer data-options="equalize_on_stack: false">
+            <?php
+            get_template_part('parts/glm-blocks');
+            ?>
+        </div>
+        <div class="row">
+            <?php get_template_part('parts/main-content');?>
+        </div>
+        <div id="home_video_wrapper">
+<?php
+echo do_shortcode('[ngg_images source="galleries"
+container_ids="18" exclusions="127,128,129,130"
+display_type="photocrati-nextgen_basic_thumbnails"
+override_thumbnail_settings="1" thumbnail_width="220"
+thumbnail_height="190" thumbnail_crop="1" images_per_page="20"
+number_of_columns="0" ajax_pagination="0" show_all_in_lightbox="0"
+use_imagebrowser_effect="0" show_slideshow_link="0" slideshow_link_text=""
+template="/var/www/server/troutcreek.gaslightmedia.com/web/wp-content/themes/troutcreek/nggallery/gallery-troutcreek-videos.php"
+order_by="sortorder" order_direction="ASC" returns="included" maximum_entity_count="500"]');?>
+        </div>
+    </div>
+</main>