One of the biggest issues with the Pligg CMS is SPAM. As a Pligg powered website owner you are constantly dealing with submissions of links that are blatent spam, spam bots and spam in the comments. To be fair, Pligg is not the only CMS that faces this issue, but it does have very little deterents in place to prevent it.
I have told you how to prevent auto-submitters or spam bots from submitting to your site by using reCaptcha on step 1 of the submission process. If you successfully install it, you will see a drastic decrease in spam as bots will no longer be able to submit, which is the source of the most of the spam submissions.
The only other source of spam is via the comments. This again has been a problem with Pligg since day one and if you search their forums the developers have yet to post a solution to users being able to post links in their comments.
I will show you 2 methods for dealing with comments that contain spam links.
Making comment links nofollow
Open libs/utils.php, find:
return preg_replace(‘/([hf][tps]{2,4}://[^ tnr]+[^ .t,nr()"'])/’, ‘<a href="$1">$1</a>’, $string);
}
change it to:
return preg_replace(‘/([hf][tps]{2,4}://[^ tnr]+[^ .t,nr()"'])/’, ‘<a rel="nofollow" href="$1">$1</a>’, $string);
}
Make links un-clickable:
Open libs/utils.php, find:
return preg_replace(‘/([hf][tps]{2,4}://[^ tnr]+[^ .t,nr()"'])/’, ‘<a href="$1">$1</a>’, $string);
}
change it to:
return preg_replace(‘/([hf][tps]{2,4}://[^ tnr]+[^ .t,nr()"'])/’, ‘$1′, $string);
}
That’s it. Which method, is up to you.
Which one will you be using?






