[Plugin: NextGEN Gallery] nggtags caption
-
Hello,
I’m using the nggtags for my galerie display, but caption don’t display.
I use this [nggtags gallery=SearchTag template=caption]
All my images have title and description. All work fine with the gallery tag.Any idea ?
Thx
-
Find solution, but need some code modification :
in nggfunctions.php change text in bold
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 )) {
foreach ($picturelist as $picture) {
$picarray[] = $picture->pid;
}
$out = nggCreateImageBrowser($picarray);
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;
}in shortcode.php
function show_tags( $atts ) {
extract(shortcode_atts(array(
‘gallery’ => ”,
‘template’ => ”,
‘album’ => ”
), $atts ));if ( !empty($album) )
$out = nggShowAlbumTags($album);
else
$out = nggShowGalleryTags($gallery, $template);return $out;
}and you can do the same thing with nggShowAlnumTags i think if you use it 🙂
Great!
It’s what I need. 🙂
Thank youHello!
I tryed to use your solution, but I still have some promblems:
It works great, but only with first image in gallery, and when I go to the next image, I have standart imagebrowser!http://qzone.selfip.com/wordpress/portfolio/poster – there is my page
I used the next shortcode for it:
[nggtags gallery=poster template=carousel images=8 ]Thank you
p.s. I’m using carousel template, and I think the promlem is in it, because in function nggShowGallery
we have:// 1st look for ImageBrowser link
if ( !empty($pid) && $ngg_options[‘galImgBrowser’] && ($template != ‘carousel’) ) {
$out = nggShowImageBrowser( $galleryID, $template );
return $out;
}But I don’t understand php,
what must I change in function nggShowGalleryTags ?I’ve solved it! )) change text in bold
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 ) <strong>&& ($template != 'carousel')</strong> ) { foreach ($picturelist as $picture) { $picarray[] = $picture->pid; } $out = nggCreateImageBrowser($picarray); return $out; }I’m a looser
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 ) && ($template != ‘carousel’) ) {
foreach ($picturelist as $picture) {
$picarray[] = $picture->pid;
}
$out = nggCreateImageBrowser($picarray);
return $out;
}
The topic ‘[Plugin: NextGEN Gallery] nggtags caption’ is closed to new replies.