Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Add total group topics as total group members

@nuprn1

In bp-groups.php, I’ve replaced :

bp_core_new_subnav_item( array( ‘name’ => ( ‘Forum’, ‘buddypress’ ), ‘slug’ => ‘forum’, ‘parent_url’ => $group_link, ‘parent_slug’ => $bp->groups->slug, ‘screen_function’ => ‘groups_screen_group_forum’, ‘position’ => 40, ‘user_has_access’ => $bp->groups->current_group->user_has_access, ‘item_css_id’ => ‘forums’ ) );

by

bp_core_new_subnav_item( array( ‘name’ => sprintf( __( ‘Forum (%s)’, ‘buddypress’ ), groups_get_groupmeta( $bp->groups->current_group->id, ‘forum_id’ ) ), ‘slug’ => ‘forum’, ‘parent_url’ => $group_link, ‘parent_slug’ => $bp->groups->slug, ‘screen_function’ => ‘groups_screen_group_forum’, ‘position’ => 40, ‘user_has_access’ => $bp->groups->current_group->user_has_access, ‘item_css_id’ => ‘forums’ ) );

But the fonction called catch the current group forum id instead of the current group forum topic count.

Is it why you told me that : “you may also want to look at BP_Groups_Group::get_global_forum_topic_count but that is an overall general count – this function could be duplicated and changed to a per forum_id basis.” ? Because I don’t understand what you mean..

Thanks.

Skip to toolbar