Skip to:

Re: bbpress post – move ‘discuss’ link to ‘filed under’ area?

OK here’s my file

Plugin Name: HFFIB
Plugin URI:
Description: Helper function for integrating bbPress into your theme.
Version: 0
Author: fel64
Author URI:

function felblogtotopicid( $felpostID ) {
global $table_prefix, $wpdb;
$posts_table = $table_prefix . "bbpress_post_posts";
$topic_id = $wpdb->get_var("SELECT topic_id FROM '$posts_table' WHERE 'post_id' = $felpostID LIMIT 1;");
return $topic_id;

function forumreplylink() {
//must be called from within the loop yadda yadda
global $post;
if( $post ) {
$rl = get_option( 'wpbb_path' ) . '/topic.php?id=';
$tid = felblogtotopicid( $post->ID );
echo '<a href="' . $rl . $tid . '">Reply!</a>' . "n";
} else {
echo 'ouch!';

I am running a custom theme, but it’s called in the spot as the original wordpress comments were and those worked fine. Here’s how I’m calling the function:

<div class="details">
<a>"><?php comments_number('No Comments','1 comment','% comments'); ?></a>
<span class="tool">Category: <?php the_category(', '); ?></span>
<span class="tool"><?php akst_share_link(); ?></span>
<span class="tool"><?php forumreplylink(); ?></span>

Still getting the error, and no ‘ouch’ anywhere… I do have bbpress_post plugin running, is it supposed to or does this replace it? I’m thinking it has to be running, I’m just trying to elimate a stupid easy mistake I’ve made. :)

Skip to toolbar