Open GoogleCodeExporter opened 8 years ago
It seems I have managed to implement it well (at least for the gallery part). I
have made these modifications:
in file lib/shortcodes.php in function show_tags
function show_tags( $atts ) {
extract(shortcode_atts(array(
'gallery' => '',
'album' => '',
'template' => ''
), $atts ));
if ( !empty($album) )
$out = nggShowAlbumTags($album);
else
$out = nggShowGalleryTags($gallery, $template);
return $out;
}
and in file nggfunctions.php in function nggShowGalleryTags
function nggShowGalleryTags($taglist, $template) {
// $_GET from wp_query
$pid = get_query_var('pid');
$pageid = get_query_var('pageid');
// get now the related images
$picturelist = nggTags::find_images_for_tags($taglist , 'ASC');
// look for ImageBrowser if we have a $_GET('pid')
if ( $pageid == get_the_ID() || !is_home() )
if (!empty( $pid )) {
$out = nggCreateImageBrowser( $picturelist );
return $out;
}
// go on if not empty
if ( empty($picturelist) )
return;
// show gallery
if ( is_array($picturelist) )
$out = nggCreateGallery($picturelist, false, $template);
$out = apply_filters('ngg_show_gallery_tags_content', $out, $taglist);
return $out;
}
could you please incorporate those changes in the NextGEN Gallery source? (I
have not tried extending it to albumtags, but it would *seem* to be pretty
straightforward...)
Jiri
Original comment by jvas...@gmail.com
on 20 Jan 2012 at 10:16
Would be great to have this included, so we don't have to mod NGG with every
update...
Original comment by hb.harle...@gmail.com
on 19 Dec 2012 at 6:13
Original issue reported on code.google.com by
jvas...@gmail.com
on 20 Jan 2012 at 9:23