Closed (works as designed)
Project:
Organic Groups
Version:
master
Component:
Og Views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2008 at 19:19 UTC
Updated:
5 Oct 2010 at 16:54 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerThis patch adds a sort handler for
- count members
- posts
- new posts
Sponsored by erdfisch
Comment #2
moshe weitzman commentedI'm concerned about the performance of this. I know we use subqueries in the field definition but sorting by a subquery is even worse for performance. We really need to introduce a summary table for each group which holds a sum of posts and members. Like node_comment_statistics.
Comment #3
dawehnerBrainstorm:
Table: og_statistics
Field:
How many members does the group has
How many posts are in this group
Counts the comments in the group
// not really important i think
When was the last node created/changed in the group
When did the last user joined the group
When was the last comment created on one of the nodes in the group
Additional/ other ideas?
Comment #4
moshe weitzman commentedThose fields look very nice.
Comment #5
dawehnerso i created a scheme definition for this data
Comment #6
dawehnerso i managed to write this module
i created also some tests, but the fail, even real world using works well, as far as i testet it
very important the views integration is only started yet, but it works
this is a tar.gz which should be placed into og/modules/ because CVS cannot add dirs for patches
Comment #7
dawehnerupdated code:
much more views integration
fixed bug in the update handling
Changed title
Anyone want to review test?
Comment #8
ekes commentedHi, cheers for this. I was just about to write a simple module to make a table of statistics for og on a site! And found this, it's the great thing about Drupal, so often someone has already thought about it. Anyway this site's Drupal 5 so I've backported your work - and extended it a bit.
Big notes:
Smaller notes.
If I get time, which I'm not sure I will I'm afraid, I'll port my changes back to the D6 version. The biggy that's still there is still the deleting nodes with comments thing though.
Ah the code is in my sandbox: http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/ekes/og_sta...
Comment #9
moshe weitzman commentedSeems like there is not a complete version for d6 yet.
Comment #10
dawehnerhere is a new version, which merges the stuff from ekes into the d6 version.
@TODO: writing tests for all functionality.
Comment #11
bernland commentedI added that folder to og/modules and the module "Organic groups statistics" shows up on the modules page. However, I can't enable it because of:
Depends on: Array (missing)
Any ideas?
Comment #12
dawehnerquite strange.
btw here is the new version
if you want to have the newest version you could also try out using https://code.launchpad.net/~dereine/+junk/og_statistics
Comment #13
bernland commentedOk. I just downloaded the latest version and changed
dependencies[] = og
dependencies[] = og_views
to
dependencies = og og_views
in og_statistics.info, now the status line reads
Depends on: Organic groups (enabled), Og_views (missing)
How do I install og_views???
Comment #14
dawehnermy version of the module is for drupal6, therefore the Version is set to HEAD.
Comment #15
moshe weitzman commentedI'd be really pleased if this lived in Contrib on its own for a while so the bugs get shaken out and we learn how popular it is. I'm not planning on taking it into og itself just yet. I do think it is very valuable.
Comment #16
dawehneri created a project for this
http://drupal.org/project/og_statistics
i would like to have more feedback tests etc.
Comment #17
squinternata commentedmore idea for og_statistics
counter for member daily visits to the community.
thanks
A
someone asked me :)