/** * Get group deposit count. */ public function humcore_get_group_deposit_count() { if (mla_is_group_committee()) { humcore_has_deposits(sprintf('facets[author_facet][]=%s', urlencode(bp_get_current_group_name()))); } else { humcore_has_deposits(sprintf('facets[group_facet][]=%s', urlencode(bp_get_current_group_name()))); } return (int) humcore_get_deposit_count(); /* Using solr counts now. $group_deposits = bp_activity_get( array( 'filter' => array( 'primary_id' => bp_get_current_group_id(), 'action' => 'new_group_deposit' ) ) ); return (int) $group_deposits['total']; */ }
* * @package BuddyPress * @subpackage bp-default */ ?> <?php do_action('bp_before_group_deposits_loop'); ?> <?php // Fill this string with the list of activity types // you want to see when the filter is set to "everything." // An easy way to get this list is to check out the html source // and get all the values of the <option>s. if (mla_is_group_committee()) { $my_querystring = sprintf('facets[author_facet][]=%s', urlencode(bp_get_current_group_name())); } else { $my_querystring = sprintf('facets[group_facet][]=%s', urlencode(bp_get_current_group_name())); } // If the ajax string is empty, that usually means that // it's the first page of the "everything" filter. $querystring = bp_ajax_querystring('deposits'); if (empty($querystring)) { $querystring = $my_querystring; } else { $querystring = implode('&', array($my_querystring, $querystring)); } // Handle subsequent pages of the "Everything" filter if ('page' == substr($querystring, 0, 4) && strlen($querystring) < 8) { $querystring = $my_querystring . '&' . $querystring;