From Bavawiki
Contents |
Requirements and Assumptions
This tutorial will be updated regularly as the versions of WPMu, BuddyPress, and bbPress are updated and stabilized. Currently, this tutorial assumes you have WPMu 2.7 installed (which can be found here), the BuddyPress Combo Beta, and bbPress 1.0 alpha 6. Also, I am running this setup on a LAMP server with PHP and MySQL 5+.
Installing WPMu
Installing WPMu is its own ball of wax, and it can be tricky if you decide to do dynamic domains as opposed to sub-directories (though I recommend sub-domains given the power of the Domain Mapping and the Sitewide Tags Pages plugins).
Nonetheless, Andrea_R has an excellent e-book tutorial for installing WPMu which you can download from the WPMU Tutorials site here. I'd start there, and then go to the WPMu forums as needed, where Andrea_R will answer all your questions :)
From here on out I will assume you have WPMu up and running without a hitch for the rest of this tutorial.
Installing BuddyPress
Installing BuddyPress is extremely straightforward once you have WPMu up and running. In fact, the beauty of BuddyPress is that it is a series of Multi-User plugins, which means all you have to do is copy a series of files into the mu-plugins folder in your WPMu installation. The only exceptions are the theme files and a bbPress plugin for the Group Forums which I will discuss further along.
From the BuddyPress installation documentation:
Move the themes to the correct locations. In the folder “mu-plugins/buddypress-theme” you will find two folders “buddypress-home” and “member-themes”. Move the “buddypress-home” folder to “wp-content/themes/” and move the “member-themes” folder to “wp-content”.
You should now have the following folder locations “wp-content/themes/buddypress-home” and “wp-content/member- themes/buddypress-member”.
That's it on the server side for BuddyPress, see the rest of the details for setup here.
Installing bbPress
When installing bbPress and opting for integration, you may come across a few questions. I tried to integrate right off the bat during the intallation, but hit a few snags with authentication keys and salts. I highly recommend Sam Bauers's screencast tutorial of the process of integrating WP and bbpress here. Also, you can find the offial documentation on the bbPress site here.
From what I've seen in the forums, you might want to consider putting the forums within your WPMu installation directory, it makes integration with WPMu easier, for example: public_html/my_wpmu_install/bbPress_forums/
In the event the integration of WPMu and bbPress didn't go smooth during the install, don't worry too much about it---just go on to the next section of this tutorial.
Integrating bbPress with WPMu
When we talk about integrating bbPress and WPMu, we are basically saying the following two things:
- The two applications share a common database of users (the wp_users table in WPMu)
- The two applications share cookies so that a user logged into the WPMu install is automatically logged into the bbPress forums (and if they log out of one they are automatically logged out of the other).
I got all of the information on how to do this from the bbPress support forums (with a special thanks to Sam Bauers). I'm just going to include the stuff I found useful for me during the integration, providing links out to the actual forum topics and other resources.
Also, for a far better tutorial, see the screencast Sam Bauers created that will take you through the basics of integration. It's excellent, and you can find it here.
One last remark: if you are using LDAP for your WPMu installation, you may want to check out Joss Winn's comment here.
Integration Plugins
You will need to install and activate the following plugins in your WPMu installation:
- bbPress Integration: This is essential, but keep in mind that this plugin is only useful if you are running bbPress version 1.0-alpha-4 or later.
- WPMU Enable bbPress Capabilities (0.1): Enables bbPress member capabilities when a user is created within WPMU. This allows immediate login as a 'member' after a user is created in WPMU.
Resetting the secure keys in wp-config.php
One of the problems I had with integration was with the Authentication Unique keys in the wp-config.php and the bb-config.php files.
Warning: the recommendation below to delete the unique authentication keys may be terrible advice for existing sites for reasons I admittedly do not know, if this is the case please let me know.
What I would recommend if you have a pre-existing WPMu account, is that you delete all the Unique Authentication Key values from your wp-config.php files, and let WPMu generate new ones, which will show up in the admin Dashboard, something like this:
Also, don't be too concerned if you didn't get all the keys listed below (you probably won't see a couple of the salt values), just see the next section on the "bbPress Backend Integation Tab" to locate the rest of them.
define( 'AUTH_KEY', 'unique-authentication key here' ); define( 'LOGGED_IN_KEY', 'unique-authentication key here' ); define( 'SECURE_AUTH_SALT', 'unique-authentication key here' ); define( 'NONCE_KEY', 'unique-authentication key here' ); define( 'AUTH_SALT', 'unique-authentication key here' ); define( 'LOGGED_IN_SALT', 'unique-authentication key here' ); define( 'SECURE_AUTH_KEY', 'unique-authentication key here' ); /**#@-*/
Once you have all the values above defined in your wp-config.php file, put those very same values for each line in the corresponding space in your bb-config.php file:
define( 'BB_AUTH_KEY', 'unique-authentication key here' ); define( 'BB_LOGGED_IN_KEY', 'unique-authentication key here' ); define( 'BB_SECURE_AUTH_SALT', 'unique-authentication key here' ); define( 'BB_NONCE_KEY', 'unique-authentication key here' ); define( 'BB_AUTH_SALT', 'unique-authentication key here' ); define( 'BB_LOGGED_IN_SALT', 'unique-authentication key here' ); define( 'BB_SECURE_AUTH_KEY', 'unique-authentication key here' ); /**#@-*/
bbPress Backend Integration Tab
Once you have entered the unique authentication keys, login to the bbPress forums and find the Settings --> WordPress Integration subtab. Here you will need to enter a few values and adjust a couple of settings
First off, in the User Role Map section choose the role you want to map for particular levels of users. The rule of thumb I followed with WPMu is to make everyone a member at first (including administrators), and you (the uber-admin of the WPMu account) will be the keymaster of bbPress, and you can promote others as need be. (Once again, let me know if this misguided advice.)
After this, you will see the User Integration section.
If you don't have all the values need here already in the config files, each of the fields has some text and links that will take you to the actual values in the WordPress Options.php section of the main blog of your WPMu install. Check there to see if any missing keys or salts can be found.
Also, you'll notice the following values below these fields:
define('COOKIE_DOMAIN', );
define('COOKIEPATH', '/');
Be sure to include both of these lines in both the wp-config.php and the bb-config.php files.
The COOKIEHASH
This last part screwed me up, but it's pretty straightforward once you know you need to do it.
Place the following line of code in your wp-config.php file (you don't need to put it in the bb-config.php file).
define('COOKIEHASH', 'your_cookie_hash here' );
You need to put the alpha-numeric cookie hash associated with the WPMu domain and login you are integrating with. If you are using Firefox, that means going to the privacy tab in preferences and clicking on show cookies, then look for the domain you are integrating on. You should find something like this:
wordpress_f8jhg89q00w8j&hYG99
So, the line should be define('COOKIEHASH', 'f8jhg89q00w8j&hYG99');
And that's it :)
Integrating BuddyPress Group forums with bbPress
Getting the bbpress forums to work with BuddyPress Groups had me guessing for a bit, at least until I came across the great Trent Adams's awesome play-by-play in the BuddyPress forums here.
I'm reproducing it verbatim below, because I couldn't even begin to detail it any clearer or better:
bbPress Side (First):
1) you have bbpress installed and a new user created on the "bbPress" side which you granted "administrator" rights by the keymaster
2) you copy the "buddypress-enable.php" plugin out of the bp-forums folders and copy it into your /my-plugins/ folder (create if it doesn't exist) so it is /my-plugins/buddypress-enable.php
3) Enable the plugin through your bbPress administration side for plugins
4) Edit "settings" to enable xmlrpc and pingbacks (both)
5) edit your bb-config.php and just before the closing php call at the bottom of the page put:
$bb->bb_xmlrpc_allow_user_switching = true;
buddypress Side (Second):
6) Go into your main blog dashboard as the "site-admin" and go to the groups admin page. Put in the URL of your forum like http://yoursite.com/forums/ and make sure you have the ending slash on that one.
7) Put in the user that you created in step 1 with the bbPress "administration" rights and their password. I never changed the password, just used the random one it sent me, but it is up to you. I usually save it a couple of times to ensure it was entered due to a refreshing bug at time of writing this.
8) Go to one of your groups (new or existing) and go to the group admin page. Make sure "discussion" is turned off. If it was already off that is fine, but if it was enabled already, turn it off
9) Turn the group "discussion" back on and then physically go to your forums URL and see if it created the forum on the bbPress side without trying to create a new topic on the buddypress side.
If you have the new forum now, then you should skip to step 10. If not, go through steps 1-9 again and make sure you got all the steps perfectly.
10) If you have made it this far, it will work, but I like to create the first post in the new forum on the bbPress side and then see if it shows up in the buddypress group forum. Old habit, but for odd circumstance, it seems to work best for me. If it works, try creating a new topic on the group you have working.
- Don't forget that you have to do step 8 for every group that was created before you enabled the forum integration! Very important***
Other notes:
1) The refreshing bug in step 7 killed it for me a couple of times and I made sure I saved it at least 2 times.
2) Forgetting the line in bb-config.php killed it for me a couple of times as well.
3) In one install I had to change the bbPress "user" with administration rights password and on the bbPress side and then completing step 7 again.
4) I also found that through "previous testing" I had some bp_groupmeta entries that were screwing things up with duplicates for the same forum in the database. Shouldn't happen to anyone else, but that screwed some things up for me as well.
In terms of having buddypress and bbPress working together, I am sure it works with buddypress on one server and bbPress on another since it works through the xmlrpc module which makes it very powerful.

