Title: trDiablo's Replies | WordPress.org

---

# trDiablo

  [  ](https://wordpress.org/support/users/trdiablo/)

 *   [Profile](https://wordpress.org/support/users/trdiablo/)
 *   [Topics Started](https://wordpress.org/support/users/trdiablo/topics/)
 *   [Replies Created](https://wordpress.org/support/users/trdiablo/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/trdiablo/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/trdiablo/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/trdiablo/engagements/)
 *   [Favorites](https://wordpress.org/support/users/trdiablo/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] Display Picture Title](https://wordpress.org/support/topic/plugin-nextgen-gallery-display-picture-title/)
 *  [trDiablo](https://wordpress.org/support/users/trdiablo/)
 * (@trdiablo)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-display-picture-title/#post-1299458)
 * Nothing to change if you use the ngggallery tag …
 * [ngg gallery id=x template=caption] and all is ok with the 1.4.3 version and 
   the default style, don’t know for other version
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] nggtags AND and OR](https://wordpress.org/support/topic/plugin-nextgen-gallery-nggtags-and-and-or/)
 *  [trDiablo](https://wordpress.org/support/users/trdiablo/)
 * (@trdiablo)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-nggtags-and-and-or/#post-1305508)
 * Hi,
 * I need exactly this function.
    I change the e funciton in the tags.php file like
   this (word in bold). I’m not a good php programer and i’m sure my code is not
   the better one, but the result is ok 🙂
 * >  function find_images_for_tags($taglist, $mode = “ASC”) {
   >  // return the images
   > based on the tag global $wpdb;
   > ** // check separator ‘,’ or ‘+’
   >  if (strpos($taglist, ‘+’) === false) { //
   > extract it into a array $taglist = explode(“,”, $taglist); $separ = false; }
   > else { // extract it into a array $taglist = explode(“+”, $taglist); $separ
   > = true; } if ( !is_array($taglist) ) $taglist = array($taglist);
   >  $taglist = array_map(‘trim’, $taglist);
   >  $new_slugarray = array_map(‘sanitize_title’,
   > $taglist); $sluglist = “‘” . implode(“‘, ‘”, $new_slugarray) . “‘”;
   >  // first get all $term_ids with this tag
   >  $term_ids = $wpdb->get_col( $wpdb-
   > >prepare(“SELECT term_id FROM $wpdb->terms WHERE slug IN ($sluglist) ORDER 
   > BY term_id ASC “)); ** if ( $separ ) { $picids = get_objects_in_term($term_ids[
   > 0], ‘ngg_tag’); for ( $i=1; $i<count($term_ids); $i++ ){ $picids = array_intersect(
   > $picids, get_objects_in_term($term_ids[$i], ‘ngg_tag’)); } } else { $picids
   > = get_objects_in_term($term_ids, ‘ngg_tag’); } //Now lookup in the database
   > if ($mode == ‘RAND’) $pictures = nggdb::find_images_in_list($picids, true, ‘
   > RAND’ ); else $pictures = nggdb::find_images_in_list($picids, true, ‘ASC’ );
   >  return $pictures;
   >  }
 * using the tags is now :
    [nggtags gallery=thailand,rate_1] the same as before![
   nggtags gallery=thailand+rate_1] only picture with the two tags
 * hope this help
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] nggtags caption](https://wordpress.org/support/topic/plugin-nextgen-gallery-nggtags-caption/)
 *  Thread Starter [trDiablo](https://wordpress.org/support/users/trdiablo/)
 * (@trdiablo)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-nggtags-caption/#post-1306776)
 * 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 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] Display Picture Title](https://wordpress.org/support/topic/plugin-nextgen-gallery-display-picture-title/)
 *  [trDiablo](https://wordpress.org/support/users/trdiablo/)
 * (@trdiablo)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-display-picture-title/#post-1299456)
 * Hi,
 * you can use [ngg gallery id=x template=caption] and change the gallery-caption.
   php file or the css if necessary.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] Display title and description/caption with [ngg gallery id=x]](https://wordpress.org/support/topic/plugin-nextgen-gallery-display-title-and-descriptioncaption-with-ngg-gallery-idx/)
 *  [trDiablo](https://wordpress.org/support/users/trdiablo/)
 * (@trdiablo)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-display-title-and-descriptioncaption-with-ngg-gallery-idx/#post-1294972)
 * Hi,
 * You need to use [ngg gallery id=x template=caption] and play with the gallery-
   caption.php file.

Viewing 5 replies - 1 through 5 (of 5 total)