View Jerome Bakker's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Recommended !
Thx for your plugin, it works well for me in 1.7.4.
It works very well on all external links but with infolinks and google adsense not working , I understand google adsense is in iframe but not sure with infolinks.
Doesn't seem to be working for me. Links still appear in same window.
@Jerome Bakker is that possible to add rel-nofollow to all external links? It help us to keep spammers away.
<?php
/*$external_links = $('a[href^="http://"],a[href^="https://"]').not('[target], [href^="<?php echo $vars["url"];?>"]');*/
?>
$(document).ready(function()
{
$external_links = $(
'a[href^="http://"]:not([rel]
,[href^="<?php echo $vars["url"];?>"])
,a[href^="https://"]:not(
[target]
,[href^="<?php echo $vars["url"];?>"]
)'
);
$external_links.live("click", function(){
$(this).attr("rel", "nofollow");
});
});
Thanks Dhrup I will test this code today at night.
So what is the best way to test this like is that works or not??
That code goes into same PlugIn's :-
views\default\target_blank\js.php
Just add those lines (I think;-P I never test my own code lolz)
Test ?
Just post some Blog or whatever with external links,
View Source should show the "rel" tag added into the href html.
a few typos in comment above ;)
$external_links should probably be renamed to something else...
*and if you're looking forward to quashing spammers stuff ---
note:
Google announced in early 2005 that hyperlinks with rel="nofollow" would
not influence the link target's PageRank. In addition, the Yahoo and Bing
search engines also respect this attribute value.
On June 15, 2009, Matt Cutts, a well known software engineer of Google,
announced Matt Cutts Blog (June 15, 2009), that GoogleBot will no longer
treat nofollowed links in the same way, in order to prevent webmasters
from using nofollow for PageRank Sculpting. As a result of this change
the usage of nofollow leads to evaporation of pagerank.
In order to avoid the above, SEOs developed alternative techniques
that replace nofollowed tags with obfuscated Javascript and thus permit
PageRank Sculpting. Additionally several solutions have been suggested
that include the usage of iframes, flash and javascript.
@JB. Works in 1.8.01. I must have had an incompatible/conflicting plugin in 1.7.11 or I had corrupted my copy of elgg.
Thanks.
+1.