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.

Comments

sun’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.08 KB

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

drupaloSa’s picture

very handy module, thanks.

sun’s picture

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.

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new3 KB

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?

roborn’s picture

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 :)

el7cosmos’s picture

Status: Reviewed & tested by the community » Needs work

comment form appear in node type that disabled comments.

sun’s picture

Status: Needs work » Fixed

Thanks for reporting, reviewing, and testing! Committed that patch including a quickfix for aforementioned bug.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

iori57’s picture

I'm testing the 6.x-1.x-dev dated 2010-Apr-17 but I found that the comment block's CSS does not work..

However if manually adding <?php print $comments; ?> , the CSS works perfectly =)

Some bug in the blocks?

By the way this module is awesome! Finally able to split the comments from the node! Thanks!! :)