Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bbSync

Yo!

What you could do is make bbsync look at your custom data, create the tables and hang them onto the post it puts into bbpress. However, there’s a better way IMO.

Every synced topic has the attribute wp_post, giving the id of the wordpress post. Since you probably run wp when you run bb (if you’re fully integrated), you can do (something like …) this in your bbpress template:

if( isset( $topic->wp_post ) ) {
$wp_post = get_postdata( $topic->wp_post );
if( isset( $wp_post->custom attribute you're interested in ) ) {
// some code to output a table into your template here
}
}

Much more interestingly, you could probably make that into a plugin so you can switch this behaviour on and off, and probably reuse it somewhere too. Could be very neat.

It’s feasible to replicate the functionality to want, but the best way would be to write a seperate plugin that only relies on bbsync for one thing: providing the ID of the wordpress post you’re interested in.

[As a general note: every wordpress post in wordpress has the attribute bb_topic too, giving the topic id for bbpress.]

Skip to toolbar