diff og_statistics.views.inc @ 2:48f07e7acaca

OG Stats 1.0-rc2
author Franck Deroche <franck@defr.org>
date Tue, 24 Nov 2009 14:27:37 +0100
parents 9ce879ecbce6
children
line wrap: on
line diff
--- a/og_statistics.views.inc	Tue Nov 24 14:25:13 2009 +0100
+++ b/og_statistics.views.inc	Tue Nov 24 14:27:37 2009 +0100
@@ -1,5 +1,5 @@
 <?php
-// $Id: og_statistics.views.inc,v 1.2.2.1 2009/06/18 17:02:45 dereine Exp $
+// $Id: og_statistics.views.inc,v 1.2.2.2 2009/08/12 19:53:28 dereine Exp $
 
 /**
  * @file
@@ -90,6 +90,76 @@
       'handler' => 'views_handler_sort_date',
     ),
   );
+
+  // Add relationship to node table for last node posted.
+  $data['og_statistics']['last_node_nid'] = array(
+    'title' => 'Group Statistic: Last Node posted',
+    'help' => 'Create a relationship to for the last node posted',
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'node',
+      'field' => 'nid',
+      'label' => t('node'),
+    ),
+  );
+  // Add relationship to user table for last node posted.
+  $data['og_statistics']['last_node_uid'] = array(
+    'title' => 'Group Statistic: User that created the last node posted',
+    'help' => 'Create a relationship to the user that last posted a node.',
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'users',
+      'field' => 'uid',
+      'label' => t('user'),
+    ),
+  );
+
+  // Add relationship to node table for last comment posted.
+  $data['og_statistics']['last_comment_nid'] = array(
+    'title' => 'Group Statistic: Node the last comment was posted to',
+    'help' => 'Create a relationship to the last comment posted',
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'node',
+      'field' => 'nid',
+      'label' => t('node'),
+    ),
+  );
+  // Add relationship to user table for last comment posted.
+  $data['og_statistics']['last_comment_uid'] = array(
+    'title' => 'Group Statistic: User that posted the last comment',
+    'help' => 'Create a relationship to the user that last posted a comment.',
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'users',
+      'field' => 'uid',
+      'label' => t('user'),
+    ),
+  );
+  // Add relationship to the comment table for the last comment posted.
+  $data['og_statistics']['last_comment_cid'] = array(
+    'title' => 'Group Statistic: Comment last posted',
+    'help' => 'Create a relationship to the last comment posted',
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'comments',
+      'field' => 'cid',
+      'label' => t('comment'),
+    ),
+  );
+
+  // Add relationship to the users table for the last member.
+  $data['og_statistics']['last_member_uid'] = array(
+    'title' => 'Group Statistic: Last member to join',
+    'help' => 'Create a relationship to the last user to join',
+    'relationship' => array(
+      'handler' => 'views_handler_relationship',
+      'base' => 'users',
+      'field' => 'uid',
+      'label' => t('user'),
+    ),
+  );
+  
   return $data;
 }