Skip to content

Better Nofollow Plugin

In my Welcome to WordPress 1.5 posting I mentioned that I was using the WP Filters plug-in to turn the nofollow attribute tag off in the comments.

Unfortunately it required a patch to overcome the fact that the nofollow is not entirely implemented as a filter in WP, but rather hard coded into the comment functions file for the comment author link. While using the WP Filter plug in and the patch I was able to remove the attribute from the author link, as well as any URL defined in the comment body using an <a href> tag. WordPress also has a nice feature in the comments where through the “make\_clickable” filter it will convert a URL entered into a comment as plain text (e.g. “www.salsaexpress.com” ) into an actual link enclosed in an <a href> tag. Unfortunately the converted link has the rel="nofollow" attribute attached to it. Again , as with the comment author link, this has been hardwired into the make\_clickable filter. I could either change the make\_clickable filter or make or find a plug in that would override the all the hardwired nofollow tags.

Luckily Christoph Rummel had the answer: no nofollow. After returning the patched files to their original state — so now all the core files are, again, unmodified — I installed the plug in and checked against the comment left on the short Tracks application entry which first showed the issue. Worked like a charm.

A nice additional feature is that you can set the plug in to keep the comment links with nofollow on them for a set number of days, and then they revert to normal links without the attribute. This is really handy as the links will stay nofollowed until you can check them and delete any that may be spam yet got by the filters or what have you.

Of course I would still like to see a more flexible system. Mostly for when someone who comments regularly here leaves a comment, I want their comment links to not ever have nofollow attached. Same thing for any registered users.

Possibly Related posts


Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

Eclectic Echoes is Digg proof thanks to caching by WP Super Cache