1

How can I create a list of OG groups with no activity using Views. For example, the list of groups where users have not created/tagged any content within last 30 days.

Note: We do not have date field attached to Group content-type, the only date associated with groups is group post date.

  • Do you have a date field attached on the Group CT or are you using the Group's post date ? – mchar Mar 30 '16 at 20:15
  • @mchar we do not have date field attached to Group content-type, the only date associated with groups is group post date. – ozyy Mar 31 '16 at 7:12
1
/**
 * Implements hook_views_pre_render().
 */
function my_module_views_pre_render(&$view) {
  foreach ($view->result as $key => $row) {
    $node = node_load($row->nid);
    if ($node->changed > (time() - (30 * 24 * 60 * 60))) { // 30 days back in time();
    unset($view->result[$key]);
    }
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.