cmoseley (@cmoseley)

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Does this still work anymore in bbPress 8.2?

    When I went to modify the functions.php as requested in the top thread, I didn’t find a seemingly logical place to put the code.

    Between lines 1382 and 1394:

    $topics = array_flip((array) $bbdb->get_col("SELECT topic_id, COUNT(*) FROM $bbdb->tagged WHERE tag_id = '$tag_id' GROUP BY topic_id"));

    $counts = (array) $bbdb->get_col('', 1);

    if ( $tags = $bbdb->query("DELETE FROM $bbdb->tagged WHERE tag_id = '$tag_id' AND user_id = '$user_id' AND topic_id = '$topic_id'") ) :

    if ( 1 == $counts[$topics[$topic_id]] ) :

    $tagged = $bbdb->query("UPDATE $bbdb->tags SET tag_count = tag_count - 1 WHERE tag_id = '$tag_id'");

    $bbdb->query("UPDATE $bbdb->topics SET tag_count = tag_count - 1 WHERE topic_id = '$topic_id'");

    $bb_cache->flush_one( 'topic', $topic_id );

    if ( 1 == count($counts) )

    $destroyed = destroy_tag( $tag_id );

    endif;

    endif;

    return array( 'tags' => $tags, 'tagged' => $tagged, 'destroyed' => $destroyed, 'sig' => array(0, __('Signature')) );

    }

    I put it on the second to last line, but somehow I don’t think this is correct as its not working =D.

    When I go to my profile page, there is no option to input a signature of any sorts, so obviously I can’t have a signature show up.

    Any help would be much appreciated.

    I’m not sure exactly what your asking. I copied and pasted the code in my WordPress template into my bbPress template. Works fine in WordPress, gives me the above error in bbPress.

    The code I used was:

    <?php
    if ($rs = aggrss('http://onctalk.com/wp-commentsrss2-custom.php'))
    {
    // dump the structure
    //echo "<pre>";
    //print_r($rs);
    //echo "</pre>";
    echo "<a href='" . $rs[link] . "' style='color: #000000; font-weight: bold;' >" . $rs[title] . "</a>";
    echo $rs[description] . "<br />";

    foreach ($rs['items'] as $item)
    {
    echo "<p><a href='" .$item['link']. "'>" . $item['title'] . "</a><br/>" .html_entity_decode($item['description']). "</p>";
    }
    if ($rs['items_count'] <= 0) { echo "Sorry, no items found in the RSS file <img src='http://www.soderlind.no/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> "; }
    }
    else
    {
    echo "<!-- It's not possible to reach RSS file -->";
    }
    ?>

    What baptiste posted in another thread worked like a charm:

    “Easy fix (hack) in bb-includes/template-functions.php, update this function to look like this:

    function get_post_text() {

    global $bb_post;

    return stripslashes($bb_post->post_text);

    return stripslashes(apply_filters( ‘get_topic_title’, $topic->topic_title, $id ));

    }

    May be an artifact of the wordpress integration – not sure. “

    (Made a small change of adding the filter for the titles too… was originally split over two posts.

    Just tried renaming the plugins folder and doing a test post, and the same thing happened.

    I’m running bbPress 0.8.0.

    Around a week or so ago, I ported over an RS Discuss forum to bbPress (which is what you see right now). Did it using just SQL Queries, so I don’t think it should have effected anything in bbPress.

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