Re: bp_has_site_groups( \'type=most-forum-topics&max=6\') outside the director
This function helps provide the ‘Latest Forum Topics’ list of topics which is default; part of the parent theme on the forum index page.
For your help:
Here is the case breakout of the types
switch ( $type ) {
case 'active': default:
$this->groups = groups_get_active( $this->pag_num, $this->pag_page );
break;
case 'alphabetical': default:
$this->groups = groups_get_alphabetically( $this->pag_num, $this->pag_page );
break;
case 'random':
$this->groups = groups_get_random_groups( $this->pag_num, $this->pag_page );
break;
case 'newest':
$this->groups = groups_get_newest( $this->pag_num, $this->pag_page );
break;
case 'popular':
$this->groups = groups_get_popular( $this->pag_num, $this->pag_page );
break;
case 'most-forum-topics':
$this->groups = groups_get_by_most_forum_topics( $this->pag_num, $this->pag_page );
break;
case 'most-forum-posts':
$this->groups = groups_get_by_most_forum_posts( $this->pag_num, $this->pag_page );
break;
}
As you can see, if specifying ‘most-forum-topics’ it runs:
groups_get_by_most_forum_topics()
From there it does a straight up dynamic select to the database to get the forum data.