Jun/095
Complete bbPress Integration for BuddyPress
Last Updated June 25th, 2009
This document expands on the the original tutorial written by Trent Adams and posted here:
http://buddypress.org/forums/topic.php?id=471
It clarifies a few spots in Trent’s work with more explicit instructions and adds specific tests for success. Ideally, it should prove the definitive “how-to” … for the moment. ;^D
Integration Assumptions
Here are the various versions of the applications used in this tutorial.
- WordPresMU – Version 2.7.1 (from Download)
http://mu.wordpress.org/download/ - BuddyPress – Version 1.02+ (from SVN)
svn co http://svn.buddypress.org/trunk/ - bbPress – Version 1.0-RC+ (from SVN)
svn co http://svn.automattic.com/bbpress/trunk/
While techincally development releases, the SVN versions of BP & BB are both pretty stable and include ongoing fixes to both applications.
Acronyms/Shorthand
WPMU = WordPressMU
BP = BuddyPress
BB = bbPress
SHELL: Indicates you are working in the SHELL or, worst case scenario, your FTP client.
BROWSER: Indicate you are working in your BROWSER.
BPROOT The root directory of WPMU/BP Installation, not your server ROOT.
http://yourdomain.com/ The web domain of your WPMU/BP installation.
CLI(LOCATION) Short for Commad Line Interface, CLI is the actual linux command used. Text in () is the location from which the command is executed.
WPMU & BP Installation
This tutorial assumes you already have a working WPMU/BP install. If not, use the following tutorials to get up and running.
- Install WPMU:
http://codex.wordpress.org/Installing_WPMU - Install BP:
http://codex.buddypress.org/getting-started/installing-buddypress/
1. bbPress Installation & Configuration (for BP)
- SHELL: Within BPROOT, create a new folder called bbpress
CLI (BPROOT): mkdir bbpress - SHELL: Check out the SVN copy of BB.
CLI (BPROOT): svn co http://svn.automattic.com/bbpress/trunk/. bbpress/. - BROWSER: In your browser, visit http://yourdomain.com/bbpress and complete the BB installation.
- BROWSER: Once BB is installed, login into BB as the “admin” user. When asked, be sure to select the following options:
“Add integration settings”
“Add user database integration settings” - BROWSER: Create a new user in BB called “admin-bp” and grant them “adminstrator” rights. NOTE: This account can be named anything you like, but “admin-bp” will be used for this tutorial.
- SHELL: Copy the “buddypress-enable.php” from the BP to BB.
SOURCE: BPROOT/wp-contents/plugins/buddypress/bb-plugins/buddypress-enable.php
DESTINATION: BPROOT/bbpress/my-plugins/buddypress-enable.php
CLI (BPROOT): cp wp-contents/plugins/buddypress/bb-plugins/buddypress-enable.php bbpress/my-plugins/buddypress-enable.phpNOTE: Do not install this plugin in BPROOT/bbpress/bb-plugins.
- BROWSER: From the BB admin, click “Plugins” on the left-hand menu. Then, find “BuddyPress Support Plugin” in the plugins list and click the “Activate” link for it.
- BROWSER: From the BB admin, click “Settings” on the left-hand menu. From the Settings submenu, select “Writing”. At the bottom of this page, click the checkbox next to “XML-RPC” and then click “Save Changes” at the bottom of the page.
- BROWSER: From the Settings submenu, select “Discussions”. At the top of this page, click the checkbox next to “Enable Pingbacks” and then click “Save Changes” at the bottom of the page.
- SHELL: Using the text editor of your choice, open BPROOT/bbpress/bb-config.php in the shell. At the bottom of the file, just before the close of PHP … ?> … add the following line then save the file.
$bb->bb_xmlrpc_allow_user_switching = true;
2. BuddyPress Configuration
- BROWSER: Login to the main blog of your WPMU/BP installation as the “Administrator”.
- BROWSER: From the menus in the left side of the Admin UI, select “BuddyPress”. Then, select the “Component Setup” sub-menu and make sure the “bbPress Forums” component is enabled. If it isn’t click the “Enabled” radio button and then “Save Settings” at the bottom of the page.
- BROWSER: From the “BuddyPress” submenu, select “Forums Setup” and enter the following information then click “Save Settings” at the bottom of the page.
bbPress URL: http://yourdomain.com/bbpress/
bbPress Username: admin-bp (or whatever name you gave in Step 1e.)
bbPress Password: Password for admin-bpNOTE 1: Make sure you have the ending slash “bbPress URL”.
NOTE 2: Some users report a bug where, at random, the password is not saved. I did not see this behavior, but if you have issues with your install, you may want to try entering the password again to see ifthat reolves the problem.
3. Reset Existing Groups and Test Forums
At this point, BB should be fully integrated into the groups of your WPMU/BP installation. To make sure, complete the following checks. If your WPMU/BP installation does nothave pre-existing groups, skip to 3b.
- BROWSER: If you have pre-existing Groups, you need to reset the Forums “switch” now. Complete the following steps for each pre-existing Group.
- Go to the pre-existing Group and select “Admin”, then “Group Settings”.
- In “Group Settings”, uncheck the box next to “Enable discussion forum” and click “Save Changes” at the bottom of the page.
- Staying within “Group Settings”, recheck the box next to “Enable discussion forum” and click “Save Changes”.
- Visit http://yourdomain.com/bbpress/ and see if a subforum was created for the Group in the non-integrated BB interface. If so, repeat this process for all pre-existing Groups. If not, see “FAILED TEST” below.
- BROWSER: Complete the following steps to create a new Group and enable Forums.
- From the BuddyPress Bar at the top of the page, select “My Account >> Groups >> Create a Group”.
- Give the Group a Name and Description, then click “Create Group and Continue”.
- In “Group Settings”, check the box next to “Enable discussion forum”.
- Select any additional Group options and complete the Group creation wizard.
- Visit http://yourdomain.com/bbpress/ and see if a subforum was created for the Group in the non-integrated BB interface. If so, everything is working correctly. If not, see “FAILED TEST” below.
- BROWSER: 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.
FAILED TEST
If you do not have the Group as a new sub-forum in the non-integrated BB, something went wrong. Check your work by reviewing all of the previous steps to see if you missed something.
DEEP INTEGRATION :: Embedded Forums Page
To achieve the integrated home forum found here …
… one must pursue “deep integration” which is not fully documented yet. I will attempt it shortly and document the process if I get it working. If you care to look into it yourself, this is a good place to start:
http://bbpress.org/forums/topic/bbpress-integration-plugin-for-wpmu
Trent’s Notes
- The refresh bug noted in Step 2 – Note 2 killed it a couple of times and I made sure I saved it at least 2 times.
- Forgetting the line in bb-config.php killed it for me a couple of times as well.
- 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.
- 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.