Since this plugin does pagination, there are functions in it to figure out how many pages there are then add page links. I suspect if you looked at the functions you might be able to see how it was done by _ck_.
https://bbpress.org/plugins/topic/front-page-topics/
That plugin uses the built in bbPress get_page_number_links API, which does not have a function to check for the availability of pages. It only echo’s the links if they are needed.
To figure out pages is easy.
You lookup how many posts are in the topic and then you divide by the page_topics setting which also happens to be the posts per page setting.
something like:
$pages=ceil($topic->topic_posts/bb_get_option('page_topics'));
Perfect!
…in theme/topics.php…
<?php If (ceil($topic->topic_posts/bb_get_option('page_topics'))>1) { ?>
<div class="topic-page">
<?php topic_pages();?>
</div>
<?php } ?>
Is there a version for the forums page?