Search

bbPress Showcase » wordpress WordPress Integration

Better bbPress + WordPress integration

RSS
  1. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    update: Note most of these steps are no longer needed under 0.9.x and newer but I am leaving the information in place so the process and concepts can be understood.
    See this thread for more current information:
    http://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101

    WordPress integration with bbPress is poorly documented with a few
    important steps and additional plugins/hacks not mentioned at all.

    So first read the original FAQ on integration:
    http://bbpress.org/documentation/integration-with-wordpress/
    and then read the rest of what they forgot to mention...

    Steps required for more complete and problem-free bbPress + WordPress integration:

    (If you are using Wordpress 2.3.x you need bbPress 0.8.3.x
    and if you are using WordPress trunk (2.5 alpha) you should use bbPress trunk r1075)

    1. cookies paths need to be changed to the same path in both WordPress and bbPress (change to domain root recommended)
    http://bbpress.org/forums/topic/wordpressbbpress-single-sign-on?replies=22#post-9010
    (there is a typo in the WordPress cookie plugin, the correct URL follows)
    http://www.2diabolos.com/blog/wp-content/uploads/_setCookieParams.zip

    2. the integration plugin should be installed
    http://bbpress.org/plugins/topic/4?replies=26&more=1

    3. the allow spaces in usernames plugin should be installed (also add my underscore hack for characters bbPress by default forbids but WordPress allows - see my message later in same thread)
    http://bbpress.org/forums/topic/usernames-with-spaces-do-not-work?replies=28#post-7904

    4. add the " set default role when registering new user though forum" mini plugin should be installed:
    http://bbpress.org/forums/topic/yet-another-integration-bug-no-role-set-on-registration?replies=10#post-8768

    5. Optional: search your bbPress templates and force all registrations/logins through wordpress from the several places they are buried on the forum (the WP login interfaces are far more developed) - unfortunately at least one bbPress login location is hard coded in the core which will require a direct hack everytime you upgrade. ie:

    < ?php $request_uri=$GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"]; ?>
    <a href="/wordpress/wp-login.php?redirect_to=<?php echo $request_uri; ? target="_blank" target="_blank">">< ?php _e('Login'); ?></a>
    <a href="/wordpress/wp-register.php?redirect_to=<?php echo $request_uri; ? target="_blank" target="_blank">">< ?php _e('Register'); ?></a>

    .
    6. Optional but highly recommended, install the "use display name" plugin for mods+admin:
    http://bbpress.org/plugins/topic/2?replies=6&more=1

    This is a demo of the bbPress Signatures plugin!
    If you use my plugins, please considering donating to help continue their development.
    Posted 1 year ago #
  2. Greenleaves
    User has not uploaded an avatar

    new member
    Joined: Jul '08
    Posts: 1

    offline

    I have Wordpress 2.5.1 and bbpress 0.9.0.2. It is sort of hard to tell how much of this functionality has been addressed in these newer versions. It would be really cool to keep a topic running that addresses integration issues.

    I am still having trouble logging in on one such that I am logged in on both. I guess the cookies are still not shared, so that part must still apply.

    Posted 4 months ago #
  3. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    If you are not logged into both at the same time you definitely have a cookie sync problem.

    Be sure to follow all the directions for 0.9.x which requires secret keys and such.

    Posted 4 months ago #
  4. tripleG
    tripleG

    new member
    Joined: Jul '08
    Posts: 3

    offline

    _ck_, excellent work here with this. I finally got things working. I was having the same issues as Greenleaves (i am on the same platforms as well).

    What i did to fix:
    step 1 suggests adding code to the bb-config.php file

    $bb->wp_table_prefix = 'wp_'; // WordPress table prefix. Example: 'wp_';
    $bb->wp_home = 'http://example.com/blog'; // WordPress - Options->General: Blog address (URL) // Example: 'http://example.com'
    $bb->wp_siteurl = 'http://example.com'; // WordPress - Options->General: WordPress address (URL) // Example: 'http://example.com'

    $bb->cookiedomain = 'example.com';
    $bb->cookiepath = '/';

    $bb->usercookie = 'wordpressuser_ab1b1c8b2de0ca2b381c25a6b6e812a1';
    $bb->passcookie = 'wordpresspass_ab1b1c8b2de0ca2b381c25a6b6e812a1';

    ***make sure the last two are in the config, the usercookie and the passcookie. copy the wordpress integration code into your bb-config file as well as these last two but make sure you put your own wordpressuser_blabla in there.

    _ck_, my question for you is this: If i set everyone to login via wordpress what is the benefit? because i dont want to have to tweak the wordpress dashboard for the users, just want to them to change their profiles on the bbpress side.

    Posted 4 months ago #
  5. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    You certainly don't have to force it to log in through wordpress, it's just that wordpress had superior registration and login functions to bbpress. That is slowly changing but bbPress is still not up to speed.

    Posted 4 months ago #
  6. tripleG
    tripleG

    new member
    Joined: Jul '08
    Posts: 3

    offline

    so i guess i didnt have it working. After tweaking and trying to make sure everything was correct, it turns out i cannot login anymore on the bb side. If I require once the wp-blog-header.php in bb-config.php i cannot login from bb side, but it looks to create a cookie. Logging in on wp side is fine, but it still doesnt show the person logged in on bb side.

    Any insight on that? if you want to email me and help I am willing to pay to get this headache taken care of (plus im going to use several of your plugins).

    thanks.

    Posted 4 months ago #
  7. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    tripleG, you aren't trying to integrate with WordPress 2.6 are you? bbPress won't work with 2.6, you must use 2.5.1

    The most overlooked part to getting the cookies sync'ed is the new SECRET KEY in WordPress/bbPress. You have to follow the directions on the bbpress.org site.

    Posted 4 months ago #
  8. tripleG
    tripleG

    new member
    Joined: Jul '08
    Posts: 3

    offline

    oh man 2.6 wont integrate? thats not great news, but atleast i know what the problem is. Is there a work around that you know of (so i can use 2.6)?

    Posted 4 months ago #
  9. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    No unfortunately 2.6 uses a completely new cookie system that is not available in a stable release of bbPress.

    It's very easy to rollback WP 2.6 to 2.5.1 - there are no security issues in 2.5.1, just a few new features in 2.6

    Posted 4 months ago #
  10. Commerce
    User has not uploaded an avatar

    new member
    Joined: Aug '08
    Posts: 2

    offline

    Hello. First post here. I have seemingly got some level of integration with wp 2.6 and bb 0.9.x working on a test bed site, blog-o-sphere.com

    At least it seems so (although seperate logins are apparently required in each). While that is not optimal, it does not seem to break anything.

    Bad idea or should I upgrade to the the new 1.0 alpha (is it stable enough?)

    -Commerce

    Posted 3 months ago #

RSS feed for this topic

Post a reply to “Better bbPress + WordPress integration” »

You must log in to post.

keep _ck_ coding >> donate $1 <<     Theme Switcher:
9 users online from  US  DE  MX  GB in the past 30 minutes. 5 bots 3 guests 1 members: _ck_
513 views today 2798 yesterday 3411 ever. Most at once 19 today 24 yesterday 19 ever. Visited today: _ck_
724 posts in 106 topics over 19 months by 146 of 676 members. Latest: nicoosuna, Wish, insightdesigns