Sorry, here’s repost of the code. $limit come from the widget setting how many posts can show…
global $forum_template, $bp;
if ( bp_has_forum_topics('type=newest&per_page=' . $limit) ) {
echo '<ul class="latest_form_topics_widget">';
while ( bp_forum_topics() ) {
bp_the_forum_topic();
echo '<li class="forum_topic_widget"><a href="' . bp_get_the_topic_permalink() . '" title="' . bp_get_the_topic_title() . '">' . bp_get_the_topic_title() . ' </a></li>';
}
echo '</ul>';
}
I never found a solution to this using the bp function calls. I just wrote a custom query joining the tables that returned the data to build the correct links.