Page 1 of 1

nofollow for comment links

Posted: Sun Nov 25, 2007 3:45 pm
by jaal
Hi all,

I've searched my way through the forum and google, but didn't found a hint.

How can I activate "nofollow" for links in comments? Do I have to hardcode them or is there any option or plugin available?

Thanks
Jan

Posted: Sun Nov 25, 2007 5:19 pm
by Don Chambers
I am unaware of any plugin that does this, but it is quite simple to do. Your template needs a comments.tpl file. If it does not have one, copy the file from /templates/default/ to your template folder. Edit the file and look for something like this:

Code: Select all

(<a class="comment_source_url" href="{$comment.url}" title="{$comment.url|@escape}">{$CONST.HOMEPAGE}</a>)
and modify it to be this:

Code: Select all

(<a class="comment_source_url" href="{$comment.url}" title="{$comment.url|@escape}" rel="nofollow">{$CONST.HOMEPAGE}</a>)

Posted: Mon Nov 26, 2007 6:31 am
by jaal
Thanks for your help.

I don't really like the idea of editing more than necessary templates. If there is any update on them the custom ones won't get the update.

But in this case nofollow is more important to me ;)

Thanks
Jan

Posted: Mon Nov 26, 2007 8:08 pm
by Don Chambers
If the template already has a custom comments.tpl, and an increasing number of templates do, it is no big deal. Also - the probability that the default comments.tpl will be modified is probably low.