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.
WOW, Thanks Jerome.
It's like the plugin has been re-written just for me ;-)
Appreciate your hard work.
PS for everyone - I am using Elgg 1.7.1, so can confirm it works on this version.
but this is my temporary solution.
in mod/target_blank/views/default/target_blank/metatags.php
replace with this
?>
<script type="text/javascript">
$(document).ready(function(){
$('a[rel=nofollow]')
$('a[href^="http://"]:not([href^="<?php echo $vars["url"];?>"])').attr("target", "_blank").after(' <img src="/_graphics/external.png" alt="external link"/>');
});
</script>
and in mod/target_blank/views/default/target_blank/widget.php
replace with
<?php
$callback = get_input("callback");
$widget = $vars["entity"];
if($callback == "true"){
?>
<script type="text/javascript">
$('a[rel=nofollow]')
$('#widget<?php echo $widget->guid; ?> a[href^="http://"]:not([href^="<?php echo $vars["url"];?>"])').attr("target", "_blank").after(' <img src="/_graphics/external.png" alt="external link"/>');
</script>
<?php } ?>
Im not sure if the nofollow works correcly being used this way, hope so. and now just drop a 10x10 external image
into your graphics folder. this was the best i could do.
thanks for the mod Jerome.
lolz addie.. i cud probably fix this up, but you don't reply to my emails ;-)
have a look at http://tea.braintrainz.com/ for an example of opening external url in a modal popup whihc can be extended to show a 'warning'
oki doki addi http://tea.braintrainz.com/ now has a "warning" alert for the external dictionary urls if you wanna check it out ;-)
Excellent plugin. Should be a standard control in future versions of Elgg (under Site Admin?).
GREAT JOB! works in 1.7.2 also