Hi,
Here I have described how to integrate bbpress with WordPressMU. Assuming that we are using a subdomain install for wordpress MU and the forum will be on a subdomain as well.
In cPanel, I have added a subdomain which has created folder on the system and adds the subdomain record for forum, In MU from Site Admin -> Options and added both forum and forums to the banned names list. Now, this in itself does not do anything to get it working, but it will prevent someone creating a blog with the same name and pretending they are something official.
NOTE: you can add the forum name in banned list which you want to create for BBPress. I have used forums as standard.
Now, add a seperate database for the BBPress forum. Remember database name, username and password you assigned to it.
Upload the bbpress files & folders to the forum folder that is now on the server. When you go to forums.yourwebsite.com, you should get bbpress telling you that there does not seem to be a config file.So use the same database as MU is so we can share users and logins. Open “config-sample.php” editing. Fill in your bbpress database details. Under that add the following details about your WMPU databse:
// This is the information about mu’s database. bbPress will look for users in this database
define(’USER_BBDB_NAME’, ‘wpmu_database’);
define(’USER_BBDB_USER’, ‘db_username’);
define(’USER_BBDB_PASSWORD’, ‘db_password’);
define(’USER_BBDB_HOST’, ‘localhost’);
define(’CUSTOM_USER_TABLE’, ‘wp_users’);
define(’CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);
This is so bbpress will use the users from MU. Cool, huh? To keep our cookies in the jar, add the following:
$bb->usercookie = ‘wordpressuser’;
$bb->passcookie = ‘wordpresspass’;
$bb->cookiedomain = ‘yourwebsite.com’; // or .example.com if there was a . above
$bb->cookiepath = ‘/’;
Fill in the rest of the details as required and when you get to the bottom, there is a section about integrating WordPress. In this case, what we need to do is set things to FALSE, so it reads thus:
$bb->wp_home = false;
$bb->wp_siteurl = false;
Save it as config.php and upload it. Now you can install bbpress. Go to forums.yourwebsite.com and click the link to run the installer. Make sure you fill in admin as the admin user because that’s what MU has the site admin set as. It will now refresh and show all the tables it added. You will get a message about how the wp_users & wp_usermeta table already exists. Click the link to go to your forum and if you were already logged into your MU site you will be logged in there too.
Thanks,
Shane G.
Popularity: 4%
