Needs work
Project:
User Stats
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Mar 2009 at 11:16 UTC
Updated:
9 Apr 2011 at 09:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
liam mcdermott commentedSorry for not getting to this sooner. There currently is no way to do this, but I am interested in adding it. I'm not adding new features to the Drupal 5 version, however, so this will work on Drupal 6+ only.
Comment #2
liam mcdermott commentedMarked: #311207: Link to Posts and Add Blog posts count as a duplicate of this.
Note: we should also provide a view which takes the content type as an argument, and link the value/label to the View. For example: Dave is browsing the forums and wants to see a list of blog posts, or forum topics, created by Bob. Dave should be able to click on the statistic value/label (e.g. forum posts: 100), next to Bob's name in the forums, and see a View listing the nodes of the content type Bob just clicked.
Comment #3
CompShack commentedPERFECT!
Comment #4
blup commentedIs there any progress in this feature?
Comment #5
liam mcdermott commentedUnfortunately not. :(
Unless someone comes up with a patch or some cash (4 hours @ €50/hour = €200) to pay for this to be coded and tested, I doubt I'll get around to it before I write the Drupal 7 version of this module. I'll gladly test/give guidance on any patches though.
Comment #6
neurovation.kiwi commentedproblem with posting - maybe a double post - sorry!
here comes a patch:
basicly introducing new statistics:
- post_count_comment (count of comments per user)
- post_count_type_'type' (count of posts per user and type)
i.e. post_count_type_blog, ...
haven't tested a lot yet.
Comment #7
gausarts commentedSubscribing. Thanks
Comment #8
ocamp commenteddid anybody test the patch
Comment #9
a_c_m commentedSubscribe, will test in a week or so if no one else beats met too it.
Comment #10
neurovation.kiwi commentedHi folks,
i did some more testing and here is a new patch (replacing #6).
cu
kiwi
Comment #11
liam mcdermott commentedI'm really happy to see this feature coming down the line, great work neurovation.kiwi.
Unfortunately I can't get the patch to apply, am doing
patch -p0 < user_stats.node_type_2.patchfrom the user_stats root directory. I even tried checking out User Stats from a day ago and two days ago, in case the two small revisions made today might have caused it to not apply. Are you using the HEAD or DRUPAL-6--1 branch? Unfortunately HEAD is horribly out of date, DRUPAL-6--1 is where all the work is happening.So, unless I'm doing something obviously wrong, the patch needs a re-roll. I also have some comments on the contents of the patch (just from glancing over it):
+ * - post count per type (node_type or comment)should have a semi-colon on the end;The first word of the comment should be capitalised and a full stop added to the end;
Meh. Don't think we need that extra line-break in there, it should be:
Same as above: these comments need capitalisation and a full stop added to the end of the sentences. :)
Also, do what with the ‘type in question’? This needs qualification.
function _user_stats_get_stats_type($type, $uid) {should expect *just* a type, without the'post_count_type_'prefix. That will mean we can remove the unclear line:Minor niggle, but could you put an extra line break in before
return $data? Thanks.*gasp* extra line breaks! Please remove all but one of them, thanks. :)
Not sure how that extra line break snuck in there, but it too needs to be removed. Nuke it from orbit, it's the only way to be sure.
Could you delete the extra line break? Thanks!
is not consistent with this:
There should be one line break before and after each
foreachloop.Also, I'm not sure if we need to translate the type name, it's going to be whatever the admin enters into the database isn't it? I'm not great at the translation side of things.
The first letter of the first word should be capitalised and a full stop added to the end of the sentence. :)
This is confusing, can you please add an inline comment to the code explaining why we do this?
The usual: the first letter of the first word should be capitalised and a full stop added to the end of the sentence (for both comments).
Control structures should have one space between the statement and the opening parenthesis, with no spaces between the opening parenthesis and condition. So, this should be:
This might seem like a lot, but it's pretty-much all code style issues, easily fixed (although I haven't been able to test whether it actually works or not yet). Great stuff. :)
Comment #12
codevoice commentedSubscribe
Comment #13
BeaPower commentedsub!
Comment #14
neurovation.kiwi commentedHi Liam from #11
don't get me wrong - i'm open to criticism.
but if you took the time to point out all that stuff - why don't you just created a new patch (or changed the one i provided) ??
I'm just curious.
Comment #15
liam mcdermott commentedWriting all that didn't actually take much time, nowhere near as long as writing a patch myself. Since I didn't have the time to write a patch myself, I thought the least I could do was to review yours.
Comment #16
bflora commentedSubscribe. Would be very happy to see this added to User Stats.
Comment #17
madjr commentedsub
this would be very cool
Comment #18
BeaPower commentedWhat is the status of this?
Comment #19
gregoiresan commentedI guess it still needs work.
As a none expert, I'm nor sure what exactly does the patch #10 ??
Regarding the issues list, this feature would be greatly appreciated by the community. Anyone knows how to patch it ?
Comment #20
glitz commentedsub
Comment #21
BeaPower commentedany updates?
Comment #22
liam mcdermott commentedneurovation.kiwi did some good work in #10, but I couldn't get his patch to apply to User Stats. Either neurovation.kiwi, someone else will pick this up, or I'll get to it at some point.
Comment #23
Killpill commentedI'm pretty interested but am baffled by the complexity of adding this feature into the module.
A simple query like:
Would count the number of posts and group them by type. So I'm guessing the module itself needs an overhaul to implement this.
I do not know anything about caching or Views integration, so writing a patch would require me to learn quite a lot. I guess I should know that stuff anyways, since I mostly write my own functions when I need something.
Still much demand for a patch?
Comment #24
AntiNSA commentedId like this patch