Here’s how the topic is added to the page title
function bp_forums_add_forum_topic_to_page_title( $title ) {
global $bp;
if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {
if ( bp_has_forum_topic_posts() ) {
$title .= ' | ' . bp_get_the_topic_title();
}
}
return $title;
}
add_filter( 'bp_page_title', 'bp_forums_add_forum_topic_to_page_title' );
I’m sure you could work something out using bp_get_topic_title. Also, the current component (Groups/Members, whatever) is called to the page title with this code –
if ( $bp->is_single_item ) {
$title = ucwords( $bp->current_component ) . ' | ' . $bp->bp_options_title . ' | ' . $bp->bp_options_nav[$bp->current_component][$bp->current_action];
Not sure how much this helps you, but it’s somewhere in the right direction.