WordPress.org

Ready to get started?Download WordPress

Forums

Imaguard
[resolved] View Origina No redirect to Post (16 posts)

  1. Danielle
    Inactive
    Posted 1 year ago #

    Google has the option view original picture, The redirect to post doesn't work, it stills goes to the path where the image is restore but than with show-image/?img=/wp-content in the url bar, the image is than still with the overlay but doesn't redirect to post. I used the hack in some earlier post what you said but that also doesn't work, if I do that it creates no overlay at all.

    http://wordpress.org/extend/plugins/imaguard/

  2. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I answered in your other post, so I'm closing this as a duplicate.

  3. theComplex
    Member
    Posted 1 year ago #

    First I'd like to express how much I appreciate this plugin. I was about to have a melt down. You should consider asking for donations!

    I do have the same concern as Nashua and I'm unable to find the other post you mention aboove.

    When you do a Google Image search for "site:fansshare.com" and click an image, the "View Original Photo" button redirects to the page its on.

    Is that possible with this plugin?

  4. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for your kind words.

    As for the watermark and redirect question: both cannot work at the same time. The watermark is a redirect (it sees a non approved referrer and redirects to the watermarked image) and the redirect to blog post is obviously a redirect too. The way the http protocol works, there is no way to distinguish between a hotlinked image and an image visited through a link on the hotlinking site.

    What you can do instead is to use only the redirect function and turn off the watermark/text-over-image. Then your image will show blurred in google Image Search (but without a watermark) and if someone click on "see original" it will redirect to your blog layout.

    As for your reference to Fansshare I'm copying in my reply in another thread (just to save time :) ):

    As for Fansshare, we have had a few emails referring to their system so I have had time to study what they do already. I'm not convinced it's a good idea. This is my understanding of the Fansshare situation:

    1. They dynamically add a tag on their site to all images (img.jpg?rnd=8). This rnd tag presumably is a timestamp. It will work for a given period, then it will stop working.
    2. If the timestamp is out of date, the system returns a watermark
    3. If the timestamp is missing completely, the system redirects to the blog page.
    4. (And this is me guessing) they have an exception from the timestamp requirement for local referrers.

    Now, think about this. Either googlebot is going to crawl with the timestamp or without it. If you check the results in google images for fansshare, you find no images linked with a timestamp in the URL. I am presuming these are older crawled images. To me this indicate that there is a problem with the way they have set up their system - that there is something that google really doesn't like here. Possibly it is as simple as googlebot not including a timestamp, not setting a local referrer and then simply not seeing images at.

    The Fansshare system isn't overly complicated. But I am not prepared to offer a plugin that may cause googlebot not to see any images to hundreds of people. We still don't know the full effect of all this playing around with redirects in the first place, but at least we know that google can see and crawl the images.

    If it turns out Fansshare gets their rankings back, then I will do my very best to come up with a system similar or better. But I think it is wise to hold back a little at this stage. Half the bloggers in the world are currently playing with watermarks and redirects, and I would rather be safe (relatively) than to be the first to release a fancy new feature and use our plugin users as guinea pigs.

    So basically, doing what Fansshare is doing is obviously possible, but I am afraid of the consequences of using images with URL tags such as "?rnd=7" since Google seem to disregard those in their search. Thus over time you would lose your rankings. If it turns out Fansshare keep their rankings, though, we will implement something similar. For now, your best option is to use just the redirect function without watermarking. The large image in google will then show blurred and encourage the user to click on "view original". Many Imaguard users have found this to work well.

  5. TheWebHead
    Member
    Posted 1 year ago #

    I was thinking what perhaps you could do is set up the watermark based on where the images are served, since now the frame google images uses to serve images is now always https://www.google.com/blank.html (or google.ca, google.co.uk, etc). The "view original image" isn't in that frame. So it would be something like if refer=https://www.google.com/blank.html then watermark, else redirect

  6. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    The problem, if I'm not mistaken, is that in both cases (both when showed on Google's site and when clicked to follow link) the referrer would be google.com/blank. To the HTTP protocol showing an image inside a page and showing an image because you clicked a link on a page, is treated the same. In both cases the page itself is considered the referrer?

  7. simonvinicius
    Member
    Posted 1 year ago #

    I installed the Imaguarg plugin, but I remove it right after because the plugin conflicted with my Pinterest plugin and all thumbnails from Facebook an +1 plugins gone. Any help?

  8. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    You probably need to whitelist those as referrers/user agents.

    Try to put pinterest and pinterest.com on your user agent whitelist and then facebookexternalhit and facebook on both the user agent and referrer whitelist.

    Hopefully this will solve your problem. If not, please let us know exactly what error message / problem you experience with Imaguard (is there an error code or are images not showing properly on Pinterest etc).

  9. simonvinicius
    Member
    Posted 1 year ago #

    Thank you for the reply. But I still have some questions.
    I forgot to say, I got the same problem with my thumbnails at Hootsuite. What words I have to put in the user agent whitelist? hootsuite and hootsuite.com? Each one per line?
    And about Google Plus?
    After that, how many time do you think I should wait until Imaguard works with my images at Google Image Search?

    Thanks in advance!

  10. simonvinicius
    Member
    Posted 1 year ago #

    Hi again!

    I followed your instructions and the facebook plugin is working fine. The problem is the Pinterest plugin. It just disappeared from the blog. Look this blog post of my blog: http://rockntech.com.br/porta-canetas-em-forma-de-macintosh-pra-decorar-a-mesa-de-trabalho-dos-geeks/. When I mousehover the image, the button must to appear, but after enable the Imaguard plugin, it's gone. The pinterest plugin must to work exactly like in this blog: http://technabob.com/blog/2013/02/24/lord-of-the-rings-bag-end-bonsai/, because I use the same plugin. If you want to test, the Pinterest plugin name is: "Pinterest Pin It Button For Images".

    I think I have to change the pinterest plugin's way to find and apply their rules on the images. Any idea?

    Cheers!

  11. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    I forgot to say, I got the same problem with my thumbnails at Hootsuite. What words I have to put in the user agent whitelist? hootsuite and hootsuite.com? Each one per line?

    I was unable to find information on the hootsuite user agent. Try to add hootsuite as the user agent will then match anything with hootsuit in the agent title. If that doesn't work, we will investigate to find the exact user agent or referrer to set for hootsuit.

    And about Google Plus?

    Regretfully Google Plus is a problem. Unlike most search engines, Google does not follow normal netiquette by having its crawler identify itself as a bot. In fact Google Plus seems to identify itself as "Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0"...

    As for your second pinterest question, I will need to look at the source code for Pinterest Pin It Button For Image. Give us a little time to look into this matter or contact that plugin author to resolve the issue.

  12. simonvinicius
    Member
    Posted 1 year ago #

    Try to add hootsuite as the user agent will then match anything with hootsuit in the agent title.

    I tried, but it doesn't work. I have a premium Hootsuite account. I can ask them about it. Is there a specific question I should ask? Just tell me and I'll contact them.

    I will need to look at the source code for Pinterest Pin It Button For Image.

    I'm trying to modify the Pinterest plugin, in certain instances the plugin identifies and pick the picture using certain php rules, see below:

    /* This function adds the pin at each post's image */
    function pibfi_Engine_add_pin( $content, $pinterest_base_url, $post_url, $post_title ){
    	// I had to change this string in order to use the sprintf function.
    	// By kortchnoi:
    	$replacement = '
    		<span class="pibfi_pinterest">
    		<img%1$ssrc="%2$s.%3$s"%4$s>
    			<span class="xc_pin" onclick="pin_this(event, \''.
    			$pinterest_base_url.
    			'?url='.esc_url($post_url).
    			'&media=%2$s.%3$s'.'&description='.$post_title.'\')">
    			</span>
    		</span>';
    	// Regular expression that finds all post's images
    	$pattern = '/<img(.*?)src=[\'"](.*?).(bmp|gif|jpeg|jpg|png)[\'"](.*?)>/i';
    	// Array to store the images that matches
    	$matches = array();
    	// Execute the regular expression
    	preg_match_all($pattern, $content, $matches);
    	// Array to store the images and its properties
    	$images = array();
    	// Image count
    	$image_count = 0;
    	// Loop to join the tag image properties with its matches
    	for( $i = 0; $i < sizeof($matches[0]); $i++ ){
    		$images[ $image_count ]['tag'] = $matches[0][$i];
    		$images[ $image_count ][1] = $matches[1][$i]; // match 1 - content before the src attr
    		$images[ $image_count ][2] = $matches[2][$i]; // match 2 - image url without extension
    		$images[ $image_count ][3] = $matches[3][$i]; // match 3 - the extension
    		$images[ $image_count ][4] = $matches[4][$i]; // match 4 - content after the src attr
    		$image_count++;
    	}
    	// Loop to check if any image has the 'needed' pin class: pinthis (pibfi_ShowButton)
    	$any_image_has_the_needed_pin_class = ( get_option('ppibfi_img_pinthis') == 'on' ) ? true : false;
    	for( $i=0; $i < sizeof( $images ); $i++ ){
    		$needed = pibfi_Engine_check_if_the_image_has_pinthis_class( $images[ $i ][ 'tag' ] );
    		if( $needed ){
    			$any_image_has_the_needed_pin_class = true;
    		}
    		$images[ $i ][ 'pinthis' ] = $needed;
    	}
    	// Loop to replace the normal tag by the html with the pin, if it is necessary
    	foreach( $images as $image ){
    		// If the post has any image with the (pibfi_ShowButton) class, the pin'll be showed in just these images
    		if( $any_image_has_the_needed_pin_class ){
    			if( $image[ 'pinthis' ] ){
    				$image_tag = sprintf( $replacement, $image[1], $image[2], $image[3], $image[4]);
    				$content = str_replace( $image['tag'], $image_tag, $content);
    			}
    		} else {
    			// Check if the image should or shoudn't has the pin
    			if( pibfi_Engine_check_if_the_image_has_the_forbidden_class( $image['tag'] ) ){
    				// If it shoud do the replacement
    				$image_tag = sprintf( $replacement, $image[1], $image[2], $image[3], $image[4]);
    				$content = str_replace( $image['tag'], $image_tag, $content);
    			}
    		}
    	}
    	return $content;
    }

    I could use the "?timestamp=1361757116" attributes used by Imaguard and apply as we see in the line below:

    // Regular expression that finds all post's images
    	$pattern = '/<img(.*?)src=[\'"](.*?).(bmp|gif|jpeg|jpg|png)[\'"](.*?)?timestamp=1361757116>/i';

    but looks like the timestamps codes are dinamics, so this makes the things hard. Any idea?

    Give us a little time to look into this matter or contact that plugin author to resolve the issue.

    Ok, good luck! But I don't believe they will help you, because I already asked them help but didn't get any reply.

    We'll get it! You rock dude! xD

  13. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    I tried, but it doesn't work. I have a premium Hootsuite account. I can ask them about it. Is there a specific question I should ask? Just tell me and I'll contact them.

    You can ask them for information about what user agent they are sending when crawling. If you have access to live visitors' log on your site, you can also try to check those at the same time as using Hootsuite to see if you can identify the user agent.

    As for the timestamp they are dynamic. You could try to use this in the php code "?timestamp=".time(); Suspect it will fail, though, since the time stamp will not match entirely. If it fails we need to find a way to pass data from one plugin to another. Shouldn't be very hard - just a bit of rewriting to the timestamp code.

  14. simonvinicius
    Member
    Posted 1 year ago #

    I tried, but did not work.

    I also got problem in my feed (http://feeds.feedburner.com/rockntech), in every image that was in my partners blogs, and the Facebook plugin's thumbnails is broken. The visits is not growing, instead of this are decreasing because the problems in my feed and in my partners blog. I'm having too many problem, I think is better to uninstall the plugin, sorry. :(

    I just need some code to put in the .htaccess file that don't block the images hosted in other websites, but instead, redirect visitor's access to post/page when they try to access the direct file, i.e: http://mydomain.com/picture.jpg

  15. imaguard
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry to hear that you will not be using the plugin. The fact that hotlinked images are broken is expected behavior for a hotlink protection and you would need to whitelist the images.

    We wish you the best of luck with your site!

  16. simonvinicius
    Member
    Posted 1 year ago #

    I'm not telling that Imaguard plugin is bad, actually it's awesome! You did something that anyone did until now. I'm searching for an answer, including at stackoverflow, but until now anyone solved this problem. My blog is a special case, has several plugins that are in conflict with yours. I deply appreciate every support you did for me!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic