- b2evolution Support Forums
- b2evolution Support
- Plugins & Extensions
- Fighting spam!
- Comment list widget, do not make links unless they're old
#1 Jun 24, 2010 18:54
After spending some time removing spam comments from my site, I decided to tinker with the comments a little bit.
I edited _item_comment.inc.php such that the link is rendered as plain text (i.e. without the A tag); thinking that spammers will quit spamming, when they see that the there will be no link.
I thought I was done, but I wasn't. I am using a 'comments list' widget - the URLs were there too.
I know that it can be configured to NOT turn authors' addresses into links, but I believe this would be too harsh of a measure. After all, real people are more than welcome to post links to their sites.
In other words, we need a form of punishment that only harms the bad guys.
So I concluded that it would be great if I could use the age of the comment to determine whether the link should be a link or not. The rationale is that if the comment is spam, I will delete it within one or two days. If it is 3 days old, it means I didn't delete it, hence it is a good comment, hence it can be published.
This way spammers get nothing, while decent people get their credit where credit is due.
I found that the widget responsible for this is here: /inc/widgets/widgets/_coll_comment_list.widget.php and that the code I need to tinker with is this piece:
It should be altered to something like this:
I need some assistance with this process, my questions are:
p.s. I know that there are CAPTCHA plugins, interfaces for Akismet, etc; I prefer this approach, because it adds no burden to normal people.
Form is loading...