Griffology (@griffology)

Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Works great vilimaunula! I really love Dans/Vili avatar thingy :) It’s a nice solution.

    fel64, I do appreciate your help. Thank you very much. I still could not get it to work properly without throwing that error.

    I’ve moved on and will revisit the subject later as bbpress continues to evolve.

    Thanks again mate!

    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. :)

    Thanks for the help, but my error is now:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 1’ at line 1]

    SELECT topic_id FROM wp_bbpress_post_posts WHERE post_id = LIMIT 1;

    after the error it adds the reply function but with an empty id: IE: “

    Thanks fel64. I’m looking to do away with the wordpress comments completely, just shut them off. However the bbpress post plugin posts the “discus in forms(0)” link at the end of the post. I have a bar at the bottom of each post and would like to format it in there. I’ve opened bbpress_post.php and saw the output of the post gets thrown into 1 variable. I would like to call a function in my wordpress php files, for example index.php, that calls the function from bbpress_post.php to display the “discuss in form” link.

    Hope that makes sense, but after read the thread you linked I don’t think it’s quite what i’m looking for. I’ll read it again thought as I’m tired. :)

    Thanks again.

    Matt, have you finished this. I’ve tried to do it myself but with no luck I always end up throwing a sql error. :(

    The theme appears to be a custom one done to match the rest of their website. ;)

Viewing 7 replies - 1 through 7 (of 7 total)