• Resolved royromviel

    (@royromviel)


    I made a custom template for Nextgen Gallery. It’s kind of a slider with jQuery. But one thing isn’t working… When i click on an image the browser opens a new blank page with the image in it.

    I want Lightbox (yes i installed that plugin) to open the image. When i set Shutter effect in the effect option it all works.

    How can i let Lightbox work? By the way: Other gallery’s who dont use my custom template all work with Lighbox.

    Here is my code. What do i do wrong?

    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
    <div id="slider">
    	<ul id="<?php echo $gallery->anchor ?>">
    <!--<div class="ngg-galleryoverview"> -->
    
    		<!-- Thumbnail list -->
            <? $teller=1; ?>
    		<?php foreach ( $images as $image ) : ?>
    		<?php if ( $image->hidden ) continue; ?> 
    
            <li id="ngg-image-<?php echo $image->pid ?>" >
            <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->alttext ?>" <?php echo $image->thumbcode ?>><img height="168px" width="380" title="<?php echo $image->alttext ?>" alt="<?php echo $image->description ?>" src="<?php echo $image->imageURL ?>" /></a>
            <span class="count"><? echo $teller."/".count($images); $teller++;?></span>
            <h3><?php echo $image->alttext; ?></h3>
    		</li><!-- End cs_article -->
    
    	 	<?php endforeach; ?>
    
    </ul>
     	</div>
    <?php endif; ?>

    https://www.ads-software.com/extend/plugins/nextgen-gallery/

Viewing 1 replies (of 1 total)
  • Thread Starter royromviel

    (@royromviel)

    I found the problem and the solution. It was a javascript conflict with my slider.

    I changed this:

    <script type="text/javascript">
    	$(document).ready(function(){
            $("#slider").easySlider({
                auto: false,
                continuous: true
            });
        });
    </script>

    to this:

    <script type="text/javascript">
        var $j = jQuery.noConflict();
    	$j(document).ready(function(){
            $j("#slider").easySlider({
                auto: false,
                continuous: true
            });
        });
    </script>

    problem solved!

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: NextGEN Gallery] nextgen, lightbox and custom template’ is closed to new replies.