Topic: Preventing comment spam with Google

This is a patch against the trunk that adds the rel="nofollow" attribute to BBCode tags and autolinked URLs to guard against comment spam. See http://www.google.com/googleblog/2005/0 … -spam.html for more information.

--- parser.php-old      Wed Jan 19 14:25:40 2005
+++ parser.php  Wed Jan 19 14:26:03 2005
@@ -270,7 +270,7 @@
        // Ok, not very pretty :-)
        $link = ($link == '' || $link == $url) ? ((strlen($url) > 55) ? substr($url, 0 , 39).' … '.substr($url, -10) : $url) : stripslashes($link);
 
-       return '<a href="'.$full_url.'">'.$link.'</a>';
+       return '<a href="'.$full_url.'" rel="nofollow">'.$link.'</a>';
 }

2 (edited by analogue 2005-01-19 19:32)

Re: Preventing comment spam with Google

I'm against it, this is a Google problem, not a XHTML one. If we need to change our XHTML each time someone find a new way to improve its ranking in Google, we will bloat all our websites, and in this case, PunBB.

And three more reasons:
- moderators usually remove those posts
- legit users with legit links won't be used in the Google database anymore
- forums where you need to register before posting aren't concerned and that's the majority

3 (edited by s0me0ne 2006-05-24 03:44)

Re: Preventing comment spam with Google

Its still a valid method incase people still want to use it, I might try it out on one of my forums. although spammers still seem to register on some sites just to get a few views for 1 link.

Here are other suggestions and kinda go into other areas: make the copyright info at the bottom a JPG, so people might not find your forum is using PUNBB with google, u might also put in a generic CAPTCHA but thats been discussed several times, i think Captcha is only good for Guests and not registered users.

(edit: i didnt realize this was the featured request forum, I was searching about this and added my 2cents to the issue) I really dont care about having this option in PunBB, personally I think its ok for people to just hack this fix in wink