If we wanted to every display the IP address for a comment, we will need to add the {comment}.hostname to the comment_render() query. It would be great to have this backported to D6 because it will be useful for the Gravatar module to show Gravatars for anonymous comments that do not have an e-mail provided.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
Issue tags: +Needs backport to D6
FileSize
2.05 KB
1.53 KB

Patches for D7 and D6 for review.

Dave Reid’s picture

The original issue from Gravatar is #512978: Update logic if anonymous comments' e-mail is not available. This can also be used in conjunction with #381802: Have theme_username() show hostname for anonymous users if available if we want to display the hostname for anonymous comments on the comment admin interface.

Revised patches for D7 and D6 with the hostname addition to comment.admin.inc.

akahn’s picture

Status: Needs review » Needs work

Patch looks clean. Tested on D7 and comments work as expected. Perhaps you should also add hostname as a variable to be available in comment.tpl.php by modifying template_preprocess_comment: http://api.drupal.org/api/function/template_preprocess_comment/7.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
3.82 KB
2.81 KB

Revised patches for D7 and D6 with akahn's suggestion.

akahn’s picture

Thanks for adding that. This looks good and works as expected on D7.

My only concern is that your modifications to comment.admin.inc don't belong here, but rather in #381802: Have theme_username() show hostname for anonymous users if available. This would be a better approach to what are working to solve in that issue.

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Version: 7.x-dev » 6.x-dev

This has actually been fixed with the comment API revamp in D7. Still needs to be fixed for D6.

TheoRichel’s picture

Well. I have just recently upgraded to D6 and really really hope that this patch will be fixed for D6.

Many thanks

mcurry’s picture

What work needs to be done to get this in D6?

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.