Allow to output comments in a block

sun - October 26, 2008 - 16:20
Project:Comment Display
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:sun
Status:reviewed & tested by the community
Description

Title says it all. Thanks to chx's pointer, this makes use of another cool feature of the new menu system: menu_get_object().

Attached patch does the ground-work. However, it's likely that users will use the same variable name for the block region in their page template, i.e. $comments, which would lead to a situation where the page variable overrides the region variable.

AttachmentSize
comment_display.block_.patch1.91 KB

#1

sun - October 26, 2008 - 16:25
Status:needs review» reviewed & tested by the community

Now prevents overriding a 'comments' region if that already exists.

AttachmentSize
comment_display.block_.patch 2.08 KB

#2

drupaloSa - October 26, 2008 - 16:50

very handy module, thanks.

#3

sun - October 27, 2008 - 10:40
Status:reviewed & tested by the community» needs work

I'm unsure whether I'm satisfied with this approach. Having comments in a block is definitely a benefit, but this leads to having a block title and the title for adding a new comment on different levels. Ideally, both the comments and the new comment form should be separate blocks - or - the output of comment_render() is altered in a way that the list of comments uses identical markup to output a "Comments" title above all comments, so a themer can style "Comments" and "Add new comment" accordingly.

#4

sun - December 26, 2008 - 18:55
Status:needs work» needs review

Here we go. This patch introduces a separate "Comment form" block that can be placed below the "Comments" block. Of course, this makes only sense when the comment form is configured to be displayed on a "separate page" - otherwise, the form is displayed twice on the node view.

Anyone available for testing?

AttachmentSize
comment_display.block_.patch 3 KB

#5

roborn - October 23, 2009 - 17:58
Status:needs review» reviewed & tested by the community

Thanks for this feature. I'm using it with Ajax Comments + Quicktabs and everything is working ok :)

 
 

Drupal is a registered trademark of Dries Buytaert.