Photo Dropper Nofollowed Links

by Mike Haydon on 27 April 2008

Further to my previous post, where I said I’d look into how to “nofollow” links from the Wordpress Photo Dropper Plugin…

Open the file wp-content/plugins/photo_dropper/flikr-js.php. Scroll down to the code that looks like:

var licenceHTML = ‘<br /><small><a href=”‘+license_url[1]+’” title=”‘+license_url[0]+’” target=”_blank”><img src=”‘+wppd_dir+’images/cc.png” alt=”Creative Commons License” border=”0″ width=”16″ height=”16″ align=”absmiddle” /></a> <a href=”http://www.photodropper.com/photos/” target=”_blank”>photo</a> credit: <a href=”‘+image_link_url+’” title=”‘+person+’” target=”_blank”>’+person+’</a></small>’;

imgHTML = ‘<a href=”http://www.flickr.com/photos/’ + owner + “/” + id + ‘/” title=”‘ + imagealt + ‘”‘ + ‘ target=”_blank”>’;
imgHTML = imgHTML + ‘<img src=”‘ + imagesrc + ‘” alt=”‘ + imagealt + ‘” border=”0″ /></a>’;
imgHTML = htmlBefore + imgHTML + licenceHTML + htmlAfter;

Wherever you see target=”_blank”, add rel=”nofollow”. Your code will probably look like this:

var licenceHTML = ‘<br /><small><a href=”‘+license_url[1]+’” title=”‘+license_url[0]+’” rel=”nofollow” target=”_blank”><img src=”‘+wppd_dir+’images/cc.png” alt=”Creative Commons License” border=”0″ width=”16″ height=”16″ align=”absmiddle” /></a> <a href=”http://www.photodropper.com/photos/” rel=”nofollow” target=”_blank”>photo</a> credit: <a href=”‘+image_link_url+’” title=”‘+person+’” rel=”nofollow” target=”_blank”>’+person+’</a></small>’;

imgHTML = ‘<a href=”http://www.flickr.com/photos/’ + owner + “/” + id + ‘/” title=”‘ + imagealt + ‘”‘ + ‘ rel=”nofollow” target=”_blank”>’;
imgHTML = imgHTML + ‘<img src=”‘ + imagesrc + ‘” alt=”‘ + imagealt + ‘” border=”0″ /></a>’;
imgHTML = htmlBefore + imgHTML + licenceHTML + htmlAfter;

Save the file (ftp if applicable) and you’re done. :lol:

Popularity: 13% [?]

Post to Twitter Post to Yahoo Buzz Buzz This Post Post to Delicious Delicious Post to Digg Digg This Post Post to Reddit Reddit Post to StumbleUpon Stumble This Post

Leave a Comment

Previous post:

Next post: