Ok, so my guess would then be its related to a parent theme I have. My parent theme shows like the extended album, but shows a lightbox with the entire gallery (only the one you click on) when clicked on instead of going to the gallery.
Can you help me find the issue in the code below? This code works fine in version 2.0.66.37 and maybe sooner, I just had to roll back to make it all work again. It does not work in the current version.
<?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?>
<div class="ngg-albumoverview">
<?php foreach ($galleries as $gallery) { ?>
<div class="ngg-album">
<div class="ngg-albumtitle">
<?php echo_safe_html($gallery->title); ?>
</div>
<div class="ngg-albumcontent">
<div class="ngg-thumbnail">
<?php $images = nggGetGallery( $gallery->gid );
$imgcntr = 0;
?>
<?php foreach ( $images as $image ) : ?>
<?php if ( $imgcntr == 0 ): ?>
<a class="gallery_link" href="<?php echo $image->imageURL ?>" title="<?php echo str_replace("\"", "'", $image->description); ?>" <?php echo $image->thumbcode ?>><img class="Thumb" alt="<?php echo esc_attr($gallery->title); ?>" src="<?php echo nextgen_esc_url($gallery->previewurl); ?>" width="200px" height="132px"/></a>
<?php $imgcntr++; ?>
<?php else: ?>
<a href="<?php echo $image->imageURL ?>" title="<?php echo str_replace("\"", "'", $image->description); ?>" <?php echo $image->thumbcode ?> ></a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<div class="ngg-description">
<p><?php echo_safe_html($gallery->galdesc); ?></p>
<?php if (isset($gallery->counter) && $gallery->counter > 0) { ?>
<p class="ngg-album-gallery-image-counter"><strong><?php echo $gallery->counter; ?></strong> <?php _e('Photos', 'nggallery'); ?></p>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
</div>
<?php $this->end_element(); ?>
And the function call:
function nggGetGallery( $galleryID, $template = '', $images = false ) {
global $nggRewrite;
$ngg_options = nggGallery::get_option('ngg_options');
//Set sort order value, if not used (upgrade issue)
$ngg_options['galSort'] = ($ngg_options['galSort']) ? $ngg_options['galSort'] : 'pid';
$ngg_options['galSortDir'] = ($ngg_options['galSortDir'] == 'DESC') ? 'DESC' : 'ASC';
// get gallery values
//TODO: Use pagination limits here to reduce memory needs
$picturelist = nggdb::get_gallery($galleryID, $ngg_options['galSort'], $ngg_options['galSortDir']);
return $picturelist;
}
Thanks, I have no clue what exactly changed so I don’t even know where to start.