WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. neocreo
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/browser-shots/

  2. dejliglama
    Member
    Posted 1 year ago #

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

  3. etikur
    Member
    Posted 1 year 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.
    :-D

  4. AndreasPils
    Member
    Posted 1 year ago #

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

  5. cob-web
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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.

    Cheers!

  7. etikur
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    Thanks Cob-web ;)

  9. vobpler
    Member
    Posted 1 year ago #

    Good find @srumery!

  10. Kevin Leary
    Member
    Plugin Author

    Posted 9 months 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

About this Topic