Provide {comment}.hostname in comment_render()

Dave Reid - July 9, 2009 - 17:51
Project:Drupal
Version:7.x-dev
Component:comment.module
Category:feature request
Priority:normal
Assigned:Dave Reid
Status:needs work
Issue tags:needs backport to D6
Description

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.

#1

Dave Reid - July 9, 2009 - 17:55
Status:active» needs review

Patches for D7 and D6 for review.

AttachmentSizeStatusTest resultOperations
514928-comment-hostname-D7.patch1.53 KBIdleFailed: Failed to apply patch.View details | Re-test
514928-comment-hostname-D6.patch2.05 KBIgnoredNoneNone

#2

Dave Reid - July 9, 2009 - 18:06

The original issue from Gravatar is #512978: All my gravatars look the same. This can also be used in conjunction with #381802: Show hostname rather than "Anonymous" for comments on admin/content/comments 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.

AttachmentSizeStatusTest resultOperations
514928-comment-hostname-D7.patch2.37 KBIdleFailed: Failed to apply patch.View details | Re-test
514928-comment-hostname-D6.patch3.38 KBIgnoredNoneNone

#3

akahn - July 9, 2009 - 18:26
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.

#4

Dave Reid - July 9, 2009 - 18:52
Status:needs work» needs review

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

AttachmentSizeStatusTest resultOperations
514928-comment-hostname-D7.patch2.81 KBIdleFailed: Failed to apply patch.View details | Re-test
514928-comment-hostname-D6.patch3.82 KBIgnoredNoneNone

#5

akahn - July 9, 2009 - 19:00

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: Show hostname rather than "Anonymous" for comments on admin/content/comments. This would be a better approach to what are working to solve in that issue.

#6

System Message - July 9, 2009 - 19:10
Status:needs review» needs work

The last submitted patch failed testing.

#7

Dave Reid - October 18, 2009 - 04:39
Status:needs work» needs review

#8

System Message - October 18, 2009 - 04:50
Status:needs review» needs work

The last submitted patch failed testing.

 
 

Drupal is a registered trademark of Dries Buytaert.