• How do I get the alttext/title info to come up with the lightbox images? I don’t want to use the Imagebrowser, and I don’t want the info displayed with the thumbnails.
    Any help gratefully received!
    Sheona

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Sheona,

    Maybe helps this you further.

    <?php foreach ( $images as $image ) : ?>

    Place the code below in the gallery.php file after the line above.

    <?php
    // BEGIN HACK
    
      // Case if description present
      if ( strlen($image->description) > 1 )
      { 
    
        // NEW EXIF hack  (11.19.10)
           require_once(NGGALLERY_ABSPATH . '/lib/meta.php');
           $meta = array();
           $pdata = new nggMeta($image->path);
        // End EXIF hack 
    
        $newdesc = "<b>" . $image->alttext .
        "</b>" . " :: " . $image->description;
    
       // 11.19.10 -- append some EXIF data
         $newdesc .= " (" . substr($pdata->get_date_time(),0,10) . ")";
       // end append EXIF
    
      } 
    
      // Case if no description
      else {
        $newdesc = "<b>" . $image->alttext . "</b>";
      }
    
    // END HACK
    ?>

    and change the code below
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->alttext ?>" <?php echo $image->thumbcode ?>

    To:
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->alttext ?><br><?php echo $image->description ?>" <?php echo $image->thumbcode ?>

    and now you will get the title and description below the lightbox.

    Good luck!

    Regards,
    Jason
    JSS Online

    Thread Starter Sheona

    (@sheona)

    Thanks Jason, but I’ve trawled all the NextGen files and there isn’t one called gallery.php. There’s nggallery.php, but it doesn’t have either of the lines you mentioned. Not sure where to try your code!
    S

    The file is stored in the view map of the nextGEN gallery plugin.

    Regards,
    Jason
    JSS Online

    Thread Starter Sheona

    (@sheona)

    Sorry for the slow response, but this is just BRILLIANT.

    Thank you so much. Wonderful, unexpected help. You’re a star.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘nextgen lightbox – how to show image titles’ is closed to new replies.