4

Using views I would like to display the number of posts by a user. This will include a count of nodes as well as comments.

e.g.

Jon
Nodes: 10
Comments:6

Jane
Nodes: 22
Comments: 9

etc....

I have created a view of type user. I can find the user: content relationship and with aggregation turned on, I can get the node count. However I do not see a user: comment relationship o get the comments that the user has created. Am I missing something?

7
+50

This small Views user: comments relationship patch should be just the ticket: http://drupal.org/node/1773966

...I ended up creating a "User: Comments authored" relationship. Very useful. Combined with aggregation and using "count distinct" it allows a user view to include # comments authored and # of nodes authored.

Direct link to patch: http://drupal.org/files/views-uid_comment_relationship.patch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.