NextGEN Gallery
Code for Singlepic link in _blank (1 post)

  1. webjunk
    Posted 4 years ago #

    Am using SinglePic shortcode with Nextgen to manage banner links on some pages. Need to have most of them (but not all) open in a new window with "target=_blank"
    What I did is the following below (sorry if not perfectly clear at 4am) and it seems to work. This adds a shortcode for singlepic of "target=" Am I missing anything with this? Any way to have this implemented in a future version of Nextgen as am sure it can be useful for others and a pain to edit after updates?
    My favorite plugin!

    Before line 350
               'target'      => ''
    Around line 357
    change line to: (adds the $target)
    $out = nggSinglePicture($id, $w, $h, $mode, $float, $template, $content, $link, $target);
    At line 43
    Change to read: (Insert: target="<?php echo $image->target ?>")
    <a href="<?php echo $image->imageURL ?>" target="<?php echo $image->target ?>" title="<?php echo $image->linktitle ?>" <?php echo $image->thumbcode ?> >
    After line 1631:
        $picture->target = $target;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.