as no one answer this, i tried it by myself. i found a function in bbp-style-pack plugin for that.
if (function_exists('bsp_is_forum_unread_amount'))
{
add_shortcode( 'bbp_count_new', 'bbpress_count_new' );
function bbpress_count_new( $atts )
{
$output = "";
$count_new = 0;
$query_foren = new WP_Query(array( 'post_type' => 'forum' ));
while($query_foren->have_posts())
{
$query_foren->the_post();
$post_id = get_the_id();
$bbp_forum_privategroups = get_post_meta( $post_id, '_private_group');
$bbp_user_privategroups = preg_split('/\*/', get_user_meta (get_current_user_id(), 'private_group', true), -1, PREG_SPLIT_NO_EMPTY);
if ( count( $bbp_forum_privategroups ) == 0 )
{
$amount_unr = bsp_is_forum_unread_amount( $post_id );
$count_new += $amount_unr->amount;
}
else
{
if ( count( array_intersect( $bbp_forum_privategroups, $bbp_user_privategroups )) > 0 )
{
$amount_unr = bsp_is_forum_unread_amount( $post_id );
$count_new += $amount_unr->amount;
}
}
}
if ($count_new > 0 )
{
ob_start();
?><span style="margin-left: 0.3rem; font-size: 0.8rem; padding: 0.4rem;"> <?php echo($count_new); ?></span><?php
$output = ob_get_contents();
ob_end_clean();
}
return $output;
}
}
i hope i didn’t oversee something, because it is also combined with private forum groups!