How to Nofollow Drupal Comments

This is a quick hack to Drupal 5 to add rel=nofollow to the comment authors' homepages. I'm not recommending adding nofollow to comments, only describing the technique for people who are looking for it.

Generally it isn't a good idea to modify Drupal core code, but this method works.

Open /includes/theme.inc.

Change line 1052 from:
$output = l($name, 'user/'. $object->uid, array('title' => t('View user profile.')));

to:

$output = l($name, 'user/'. $object->uid, array('title' => t('View user profile.'), 'rel' => t('nofollow')));

And change line 1064 from:

$output = l($object->name, $object->homepage);

to:

$output = l($object->name, $object->homepage, array('rel' => t('nofollow')));

Technique originally described here.