Simpler integration with WordPress
If you’re looking to integrate bbPress and WordPress, life just got a little easier.
Database Integration
Setting $bb->wp_table_prefix in bbPress’s config.php will tell bbPress to grab users and user meta data from those WordPress tables.
The CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE constants are still around and will override other settings if you need more fine grained control.
UPDATE: I should have mentioned Matt’s external user database update from a few months ago. It allows you to pull user and user meta information from a separate database. All you have to do is define USER_BBDB_NAME, USER_BBDB_USER, USER_BBDB_PASSWORD, and USER_BBDB_HOST.
Cookie Integration
If you’ve installed bbPress into a subdirectory of your WordPress installation, define $bb->wp_home and $bb->wp_siteurl as your WordPress blog address and WordPress address, respectively. Both sites will now share the same cookies so that when you’re logged into one, you’re logged into the other. (The addresses referenced above can be found in WordPress’ Options -> General admin tab.)
If bbPress is not installed in a subdirectory of your WordPress install, you’ll probably need to adjust both bbPress’ and WordPress’ cookies to meet your specific requirements. Below is a brief outline of the variables and constants that control the cookie behavior in the two programs.
| PHP | bbPress | WordPress |
|---|---|---|
| name | $bb->usercookie | USER_COOKIE |
| name | $bb->passcookie | PASS_COOKIE |
| path | $bb->cookiepath | COOKIEPATH |
| path | $bb->sitecookiepath | SITECOOKIEPATH |
| domain | $bb->cookiedomain | COOKIE_DOMAIN |
Registration Integration
Currently, when a user registers on your bbPress forum, your WordPress blog doesn’t know about it (and vice versa). The user will be created, but WordPress won’t know what user role to apply.
At the moment, integrating user registration more tightly will require a plugin both for bbPress and for WordPress. Hooks to look at include bbPress’ bb_new_user and bb_user_has_no_caps along with WordPress’ user_register.
Function Integration
bbPress keeps all of the code it has in common with WordPress in a couple of discrete files. If you’d like to load both bbPress and WordPress at the same time (so that you have access to both sets of functions and APIs), you’ll need to tell bbPress not to try and load functions and classes that WordPress has already defined.
Do so by defining WP_BB as true in either config.php or wp-config.php. Also, WordPress will have to be loaded first.
The short of it
We’re always trying to make things simpler around here. Integration with WordPress is easier now than it used to be but will hopefully continue to become more and more painless as we keep working.
As always, config-sample.php has a couple hints.
Pingback: Photo Matt » bbPress Integration
This makes what was easy even easier.
Many thanks
It’s about time! I’ve been waiting for this for a while, this will make life better. Thanks!
Pingback: bbPress 開發?度展開 @ 天佑的自由天地
Pingback: links for 2006-09-20 at [MacStansbury]
Ow man, bbPress just keeps getting niftier and niftier. I hope you guys can get a solid release out there soon because I’m dying to use this on a public site.
Cheers!
Pingback: WordPress/bbPress integration just got easier (is it coming soon?) at The Blog Herald
Are there actually user creation plugins available to WP and BBpress? Or is this just a heads-up that these will need to come along at a future point?
Thanks for all the hard work, by the way.
Wow! It’s Great! Wery helpfull for me.
1. Would you integrate some Gallery software into this pretty good integration bundle?
2. Would it work in bundle where WordPressMU + bbPress inegrated?
It’s important for me, because i’m interested in creation of community, where users can have their own blogs, communicate in forum, and share their pictures from one user account.
When will rhe forum be up here so we can ask questions like:
- When will bb-press support img tags so we can add images into our forum
- When will the plugins (page) be ready?
- When will bbpress use Vet like this way?
What, no language files for bbPress?
I’m a Hebrew blogger and I would love to offer it translated.
Pingback: ourr » links for 2006-09-20
Pingback: Akkam’s Razor
Pingback: Basic Thinking Blog » WordPress-Plugins
Pingback: bbPress Integration with WordPress Easier by Blogging Pro
I’ve updated this post’s Database Integration section to include the news about Matt’s work allowing for an external user database.
Pingback: WordPress Italy » Blog Archive » bbPress, finalmente integrato in WordPress
Pingback: Skylog » Blog Archive » links for 2006-09-22
Pingback: bbpress wordpress házasítás egyszerűbben :: kobak pont org
Pingback: |► BBpress integrato in WordPress
Is it always necessary to have a SQL backend for this wonderful blogs software?
I would suggest text files as a backend. Please can you write this kind of software?
Regards.
Pingback: alexking.org: Blog > Around the web
I love you guys
Pingback: Forums that Integrate with WordPress | Misguided Thoughts
Pingback: Docunext » Blog Archive » bbpress themes
the problem with this is that the instructions are so bad really horrible… anyways i will try it
Pingback: integrating PHPbb into WordPress - WickedFire - Internet Marketing Affiliate Webmaster Forum
Pingback: Life Style » bbPress与WordPress整合
Yeah, really geeky directions here that only another geek could follow.
i’ve already used bbpress here…. http://www.speedytown.com/forum/garamdunia/ and it’s easy to manage … many thanks to you..
it’s seem to be next big thing, for all forumer … switch your forum to bbpress !!!!
“As always, config-sample.php has a couple hints.”
Please, the link is missing a slash.
To get it working with WPMU i had to add the following lines to config.php, after $bb->wp_xxx settings:
if ( isset( $bb->wp_table_prefix ) ){
$bb->usercookie = ‘wordpressuser’;
$bb->passcookie = ‘wordpresspass’;
}
Because WPMU does not use HASH in its COOKIES.
Pingback: WordPress Wednesday News: WordPress 2.2.1 Mandatory Upgrade, WordCamp Awesome Weekend Conference, WordPress in Japan, and Lots of WordPress Plugins : The Blog Herald
Anybody who is looking for “more” integration of wp with bb, check out this article:
http://www.adityanaik.com/integratepress-part-i/
Pingback: jaymis.com » Blog Archive » Integrating WordPressMU with bbPress
I use WP and BB with german language! If I include wp-blog-header.php in the configuration file (config.php) of bbpress, the following error occurs:
Fatal error: Cannot redeclare class streamreader in /homepages/.../www/forum/bb-includes/streams.php on line 26If I uncomment the lines 122 + 123 in bb-settings.php:
// include_once(BBPATH . BBINC . ‘streams.php’);
// include_once(BBPATH . BBINC . ‘gettext.php’);
No error occurs … but the forum is in english!
I use WP 2.3.3 and bbpress 0.8.3.1
Is there a documented way to fix this?
cu, helpy