Hi,
When I want to display the number of replies to node_comments in a view, the view field Nodecomment: Comment count field is always 0. How do I get these?

Sample of my data model:
root_content_type
|-commentroot1
|--reply1
|--reply2
|---reply2_reply1

So when I make a view with all comments to my root_content_type, I want to list all "first level" comments with the numbers of replies as fields.

I hope you get what I mean. I think I could implement this myself when I find the time, but maybe this can be done already now somehow. Any suggestions, ideas, motivations,...?

Comments

Ghostthinker’s picture

Status: Active » Closed (fixed)

I just wanted to tell that I managed it by hacking the module. I just copied the "Nodecomment: Parent node" stuff, made it "Nodecomment: Parent comment node". The rest is clear. If there is anybody whats a patch, just subscribe or email me.

grasmash’s picture

Version: 5.x-1.1 » 6.x-2.x-dev

how can this be done in 6.x-2.x-dev? Node:Comment Count for any comment returns none.

grasmash’s picture

Status: Closed (fixed) » Active

it seems like the comment_count column only counts the number of comments on the original node, but there is no way to count the number of replies on a particular comment?

I accomplished a comment count field by using Views Custom Field to do a mysql query:

$result = db_query("select count(cid) from {node_comments} where pid = '%d'", $data->node_comments_cid);
$print = db_result($result);

Maybe it would be a good idea to store this calculation in a 'comment_replies' column.

crea’s picture

Category: bug » feature

This looks like a feature request

crea’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
crea’s picture

Status: Active » Closed (won't fix)

I think this feature doesn't belong to the module. This is too specific functionality that wouldn't be very useful to users of this module in general.