Reviewed & tested by the community
Project:
Organic Group Statistics
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2011 at 10:08 UTC
Updated:
20 Jun 2016 at 19:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerA while ago there was some discussion about moving back a small version of this module back into og, but the discussion stopped.
One problem was, that you can't provide a small version, because it's hard to write a module with dynamic created tables.
The port itself could be perhaps made very flexible/generic: last entity, count entities etc.
Comment #2
idiotprayer commentedI've posted a link to a very rough port of the module here.
http://drupal.org/node/1070322#comment-4272810
I too am very curious as to how to properly set this up.
@dereine, is the idea of a flexible/generic version being that you build statistics for a group on request, as opposed to trying to use a hook and count/update for every possible group/group_audience action?
(...this seems like it would be extremely tough to work into any sort of views integration)
Comment #3
dawehnerThis will not fly. You can't sort/filter by it in views.
Additional this would be too slow in general. We really would have to use some kind of hooks to count stuff.
Comment #4
nikit commentedI am continue porting here: http://drupal.org/sandbox/nikit/1169152
Comment #5
dawehnerCan't you have the same module names and keep the history of the module?
You could git clone og_statistiscs locally and push to your sandbox.
This would help a lot when merging back.
Comment #6
nikit commentedok, module file names are refixed.
But what's mean: "keep the history of the module"?
Comment #7
dawehnerDon't copy the files but use git to clone the current repo.
Comment #8
nikit commentedok, please check.
Comment #9
dawehnerGreat. Exactly how it should be.
Comment #10
nikit commentedHello Dereine!
When it appear as release here?
regards, Nikit
Comment #11
dawehner@nikit
Are you read with your port?
Comment #12
bluestarstudios commentedI really would like to finally use this module on my drupal site. It's been over half a year in the making, so any news on the port to Drupal 7?
Comment #13
dawehnerAs there were no new informations from @Nikit i guess he didn't started a port yet.
To be able to support the full new flexibility of og in d7 i fear that at least one day of work is required to proper rewrite the module (as porting would be basically the same).
Comment #14
nikit commentedDereine, my sandbox version work with drupal 7 and used on one live site.
Comment #15
dawehnerThanks for the big work you did on porting the module
Some things which could be seen
This is minor..., but perhaps a sign that you started to port the module quite some time ago.
It would be nice if this feature wouldn't be removed. I know it's not your purpose.
Funny. All other queries have .entity_type but this two misses it.
As long a file doesn't contain classes/interfaces you don't need to add it.
Sadly the test is missing here, which, if you just include it throws an error. If you rename the class to the current og test class
it doesn't work. This should be fixed. In general this module should only contain tested functionality.
This indentation looks odd.
It seems to be that an even better name would be entity_count, but sure an update hooks is missing as well.
+ 'description' => 'Last Time of activity.',
+ 'type' => 'int',
+ 'size' => 'normal',
+ 'not null' => FALSE,
+ 'default' => 0,
+ ),
Well in normal cases ports shouldn't contain new features. Actually i don't care if it's tested.
Any reason why this is removed?
You can't know this, but it's actually 3.
Any reasons why it should be removed?
In general i like the cleaner code of the module file and the cleanups in the views file.
The .faceted_search file should probably be removed because this module shouldn't be ported :)
Comment #16
nikit commentedhello Dereine!
ok, thanks for reviewing, I'll make these changes
Comment #17
SJTmedia commentedHello, I'm using your Drupal 7 port of OG Statistics. I get the following error messages when someone creates a new user on my site. Do you know how to fix it? Thanks!
Notice: Undefined property: stdClass::$original in og_statistics_user_update() (line 229 of /sites/all/modules/og_statistics/og_statistics.module).
Notice: Trying to get property of non-object in og_statistics_user_update() (line 229 of /sites/all/modules/og_statistics/og_statistics.module).
Warning: Invalid argument supplied for foreach() in og_statistics_user_update() (line 229 of /sites/all/modules/og_statistics/og_statistics.module).
Notice: Undefined property: stdClass::$group_audience in og_statistics_user_update() (line 237 of /sites/all/modules/og_statistics/og_statistics.module).
Warning: Invalid argument supplied for foreach() in og_statistics_user_update() (line 237 of /sites/all/modules/og_statistics/og_statistics.module)
Comment #18
naught101 commenteddefinitely needs work. Works ok for existing groups (minor testing), but when I try to create a new group, I get:
Comment #19
drew29 commentedHej Hej,
is the drupal 7 version available?
kind regards
drew
Comment #20
dawehnerMh the current statue of this patch is not really apply-able.
Maybe i will have time during christmas to work on a port, as it should be that hard with actual simpletests of nearly all features.
Comment #21
drew29 commented@dereine,
many thanks I wish you a merry christmas
kind regards
drew
Comment #22
dawehnerAs there seems to be no response from the original port creator i started to do the port for myself.
Therefore i created a small chipin: http://ogstatistics7.chipin.com/ and would be happy about any kind of support
Comment #23
g089h515r806 commentedI need Drupal 7 version.
I have an suggestion,
1, we could create a statistics field,when user add/edit content, we hide the form element of the statistics field.
2,we create a rules action which could populate the value of statistics field. I have check rules module, and find that it support set a value, that means it is possible to build it base on rules module.
3,we config rules.
Comment #24
jacobpov commentedSubscribed its a must for me!
Comment #25
naught101 commented@jacobpov: if you're not adding any information to the issue, please just use the "follow" button up top.
Comment #26
playfulwolf commentedI have a simple question: is it possible to do this kind of table of groups just with views alone with some grouping/agregation? Any one tried?
Comment #27
dawehnerSure this should be possible but you will see performance issues if you have a big site.
Comment #28
playfulwolf commentedI do not see this as a performance issue, if a view is heavilly cached.
Have view screenshot?
Comment #29
playfulwolf commentedAre there anything install'able for D7?
Comment #30
playfulwolf commentedHow much do I need to chip-in for the initial D7 release? Or even better - to sponsor D7 development?
Comment #31
ishadakota commentedI'd be willing to help or sponsor development as well.
Not sure where the latest port is or what it's status is...
Comment #32
nikit commentedI have started converting this module sometime ago: http://drupal.org/sandbox/nikit/1169152
But stop it then owner decalre about chip-in. So if he allow or will have silence for this topic, I can continue on it...
Comment #33
playfulwolf commentedPlease, continue your project! As the current maintainer does not seem to answer to this topic.
Comment #34
naught101 commentedName clarification for post trackers
Comment #35
pedrorocha commentedAny news on this? I'm starting to work on @Nikit sandbox module, so if anyone have a newer code that could share, would be useful.
Comment #36
pedrorocha commentedI use some code from @Nikit and changed some other things(some portion of my code is useless right now - mainly the classes) and now it's possible to run the statistics, with 2 special additions: a page to view the statistics and the count of nodes by bundle(content types). It's in use right know, in a project of mine, and i wish to keep contributing.
For the ones that doesn't know how to apply a patch, i'm attaching a compressed file with the whole module too.
Comment #37
dawehnerWhy not just use this module called views ;)
If you want I can give you co-maintainership, as I won't have time to work on it anyway.
Comment #38
pedrorocha commentedWould be great @dawehner !
About the page, we(me and my client on this project) liked the idea to have a general overview page(with stats for every group in one page, to spot things quickly), and i think that on this case Views is unnecessary and with worst performance than a simple query. But obviously, the Views integration must be there to enable other people to create whatever visualisation they want.
Comment #39
dawehnerYou simply can't convince me with that, so I would strictly say NO if I would do anything with OG_stats but I don't. At least ensure that the views integration is working all the time.
I just gave you the maintainership of the module: Ensure to use the standards defined on https://drupal.org/node/363367
Thank you for stepping up!
Comment #40
pedrorocha commentedOk! Certainly i'll ensure this. Thanks for permissions.
About not convincing you, is about the whole thing(the overview page itself and the argument) or the performance?
BTW, i tend to not use Views on some pages that could be used on projects without Views, but is a fact that OG depends on Views, so this is not the case. I'll make this page a default View instead.
Comment #41
dawehnerI think not using views is fine for some usecases like you have a gigantic site on which server costs are higher as developers.
Good to know that OG was dependent on views. Thank you for making this page a view instead. If you really need you should probably your custom tweaks in a custom module. Thank you!
Comment #42
dixon_Please make the D7 port agnostic to entity types as well, since any entity type can be a group in D7! I have this use case at the moment.
That would mean that instead of the
nidfield on{og_statistics}there should be these fields:gid- the group's entity idgroup_type- the group entity typeThose are the filed names OG itself uses.
I might take a stab at this improvement later.
Comment #43
pedrorocha commentedGood point Dixon! I really like this kind of abstraction too, as this module can be used on many different cases.
Comment #44
dixon_Ok, so here's a patch and sandbox that ports this module to D7 and OG 7.x-2.x. It's based on previous work by Nikit from his sandbox (which was for OG 7.x-1.x).
My sandbox: https://drupal.org/sandbox/dixon/2105777
At the moment it sort of works, but there's not upgrade path, and the tests needs to be updated.
I strongly recommend to base the base og_statistics 7.x-1.x on this code. It's up to speed with current version of OG and takes an approach that's more agnostic to entity types than earlier patches.
Comment #45
dixon_Aaand a patch:
Comment #46
dawehnerGave maintainership to dixon.
This will probably be the only review point. In Drupal 7 it is recommened to specify 'api' => '3'
Really nice!
Comment #47
caschbre commentedAny word on the status of the D7 port / release?
Comment #48
izmeez commented+1 for a 7.x-dev branch so this can be tested further. Thanks.
Comment #49
caschbre commentedFYI... I just released a lightweight alternative OG SimpleStats until og_statistics D7 can get itself out the door.
Comment #50
igorik commentedis this module still alive? Looks like nobody cares about that and new maintainer Dixon are doing anything for D7 release.
Comment #51
dawehner@igorik
Did you tried the current patch? I'm happy to create a release with it, even I won't really have time to support it.
Comment #52
igorik commentedI didn't catch that there is working patch, sorry.
At the end I tried og_simplestats and for my needs it was enough.