Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bbpress info in wordpress?

Didn’t see ganzua’s post, posted at the same time. 😮

When copy and pasting the code you have to remove any bb dependencies. For example, bb uses the $bbdb; wordpress uses the $wpdb, and for queries and the like you can just switch them. Note that $wpdb does not contain information about the names of bb tables, so $wpdb->topics or the like will not work. In other cases the function names are simply different; bb_get_option() or simply get_option() for example. This code is what I used in bbSync to integrate avatars:

function bbreplyavatar() {
global $bbposter, $opshuns;
$avatar = get_usermeta( $bbposter->ID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = $opshuns['bburl'];
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}

Note that $opshuns and $bbposter need definition (or changing). bbSync could be quite useful to you actually.

What’s the specific problem you want to solve right now, and what have you tried?

Skip to toolbar