Browser Shots
[resolved] open in a new window (10 posts)

  1. neocreo
    Posted 2 years ago #

    Fantastic plugin - precisely what I wanted. However, since I would like to review certain sites, it would be great to be able to open the links in a new window/tab per auto. Would it be possible to shoe-horn in a target="_blank" attribute for the shortcode and that the link is changed accordingly?


  2. dejliglama
    Posted 2 years ago #

    Was thinking the same thing. A open in new window... thanks :)

  3. etikur
    Posted 2 years ago #

    +1 +1 Browsershots are typically for external websites, where updates are controlled by somebody else. For ones own site, where same-window links would be standard, it would reduce the need to update duplicate content, I suppose.

  4. AndreasPils
    Posted 2 years ago #

    BrowserShots opened in a new Tab/Window would be awsome. Any news here?

  5. cob-web
    Posted 2 years ago #

    In the browser-shots.php just add the target="_blank" somewhere around line 56:

    // Get screenshot
    		$image_uri = $this->get_shot( $url, $width );
    		if ( !empty( $image_uri ) ) {
    			$image = '<img src="' . $image_uri . '" alt="' . $alt . '" width="' . $width . '" class="alignnone" />';
    			return '<div class="browser-shot"><a target="_blank" href="' . $url . '">' . $image . '</a></div>';
  6. srumery
    Posted 2 years ago #

    Outside of the shortcode, there was a function call (in BM_SHOTS) that you could call to get the image URL without all the qualified image tag. The function call was more flexible than the shortcode. The shortcode is nice bit it's too restrictive. It doesn't allow for target or class attributes.

    This is a great plugin and I enjoy using it. I hope the next version will have a bit more flexibility build into it. Shortcode for users, function call for developers.


  7. etikur
    Posted 2 years ago #

    Thanks, cob-web, that works. Only drawback is that now all links are external.
    I would prefer the option of having external links for external sites and internal links for internal pages.

    Like srumery I am looking forward to the next version.

  8. dejliglama
    Posted 2 years ago #

    Thanks Cob-web ;)

  9. vobpler
    Posted 2 years ago #

    Good find @srumery!

  10. Kevin Leary
    Plugin Author

    Posted 1 year ago #

    Thanks for the help cob-web, your patch will be included in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Browser Shots
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic