Yes I'm aware of that.Lumpy Burgertushie wrote: ↑Thu Oct 11, 2018 6:25 pm
be aware that any changes you make to a core phpbb file will have to be redone at each update/upgrade.
Code: Select all
if(!preg_match('/(.*)mydomainname\.(com|co.uk|de|fr|co.jp|ca)+/i', $url)){
$html = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";
}else{
$html = "$whitespace<!-- $tag --><a$class href=\"$url\" rel=\"nofollow\">$text</a><!-- $tag -->$append";
}
Your regular expression indicates you're not fond using them: you didn't escape the dots, you don't need the first submatch at all, and the last repetition also looks wrong. In other words: it would also match
notmydomainname.copukdecade
./mydomainname/i
)- if the behaviour is then the expected one take short steps from there. Consider learning the basics thru http://www.regular-expressions.info/. If not, consider using a die( $url );
in a test environment to see the actual content of that variable in case you're assuming something that is never true.Code: Select all
<script>
$(function(){ // prevent conflicts
$(".postlink").filter(function () {
return this.hostname && this.hostname !== location.hostname;
}).each(function () {
$(this).attr('rel', 'nofollow');
});
});
</script>