Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just attempted to figure this out myself and found your thread. Here’s what I did:

    The only way I know how to do this is to edit the plugin files (which will require making the change again each time you upgrade it). This is how:

    In the nextgen plugin dir, edit the file view/gallery.php.

    Find the line of code for the anchor (link) around the thumbnail:

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

    Replace the title attribute with:
    <?php echo $image->alttext ?>

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

    Explanation: The effects like the Shutter box use the anchor title attribute to display text under the image. NextGen defaults this to the description field, but the edit above will replace this default with the alttext field.

    You can leave the description code in there, too. And you can throw some HTML in the title attribute, too, as long as you escape the tag characters. For example:

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

    Hmm, for some reason the “code” wrapper above didn’t show the characters as escaped. You should replace the < around the HTML tags with & lt ; (no spaces) and so on.

    Hope that helps!

    The only way I know how to do this is to edit the plugin files (which will require making the change again each time you upgrade it). Here’s what I did:

    In the nextgen plugin dir, edit the file view/gallery.php.

    Find the line of code for the anchor (link) around the thumbnail:

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

    Replace the title attribute with:
    <?php echo $image->alttext ?>

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

    Explanation: The effects like the Shutter box use the anchor title attribute to display text under the image. NextGen defaults this to the description field, but the edit above will replace this default with the alttext field.

    Hope that helps!

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