Add separate comment and node counts

emackn - April 11, 2008 - 16:45
Project:User Stats
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:emackn
Status:duplicate
Description

Would be nice to have separate comment and node counts.
Then break the nodes down by type and comments by unique nodes.

I.E.
User X has posted 25 nodes, (10 articles, 7 reviews, 8 stories)
User X has posted 15 comments on 5 unique nodes.

ATM, im doing this in a custom module running this sql,

select count(distinct nid) as nodes , count(cid) as comments from drupal_comments where uid = %d;
select count(nid) from drupal_node where uid = %d;

#1

emackn - April 11, 2008 - 17:10
Assigned to:Anonymous» emackn

actually.. i think ill try to add this.
which branch should i develop on, or create patch for? the 5.x dev branch looks old.

#2

Liam McDermott - April 26, 2008 - 18:24

DRUPAL-5 and DRUPAL-6--1 are active branches. Am tempted to mark this as wont fix as it's not what most people need, and is rather easy to do. For now I'll leave this as-is and see if there's much interest.

#3

chazz - July 25, 2008 - 13:10

I am very interesting of that, I was looking for that kind of solution. Can someone provide a patch or something if it's easy to do please ?

Thank you.

#4

CompShack - September 6, 2008 - 16:47

I was thinking something more like vB has where it says:
Posts: 235
Blog posts: 5

what do you think?
And what about the ability to link post cout (the actual number) to a view where all posts will be listed for that user?!

#5

illuminaut - September 22, 2008 - 15:33

+1 here. I definitely need an option to NOT count comments as part of the post count. The admin interface already lets you choose which types of nodes should count, so why not also an option whether or not comments should be counted (or counted separately). I'd think there are many use cases where a separation of comment count and node post count makes sense.

#6

jaydub - October 22, 2008 - 08:45

See patch in #324090: Separate comment and user counts for the request in #5.

Does not include breakdown of posts by content types per this parent post but if you're interested in toggling comment counts, here you go.

#7

Liam McDermott - November 16, 2008 - 18:34
Status:active» duplicate

Marking as duplicate of #324090: Separate comment and user counts

 
 

Drupal is a registered trademark of Dries Buytaert.