horrorshow (@horrorshow)

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)

  • horrorshow
    Member

    @horrorshow

    sambauers,

    Will there be a new release of WordPress MU as well?

    I am not complaining, but I sometimes feel like WPMU is the ugly stepchild in that there is always extra hurdles to get things working with other software. ;)

    Don’t get me wrong, I love WPMU since it allows me to create a blog community and do some really cool things. keep up the good work!


    horrorshow
    Member

    @horrorshow

    Funny that my settings are screwy and there are better ways at accomplishing single sign on?

    Or funny: “yes, this is the closest that I am able to get to single sign-on, and I get the same results”?

    If it’s the first case, then please enlighten me.

    If it’s the second case, then this link might help you.

    https://bbpress.org/forums/topic/cookies-subtle-bug-single-sign-on-bbpress-and-wordpress


    horrorshow
    Member

    @horrorshow

    nolageek,

    In WPMU, did you put the bbpress-integration.php in the “mu-plugins” directory or the “plugins” directory?

    I want only the site admin to be able to activate the “bbpress Integration” plugin, but it shows up for all users giving them an option to activate the plugin. That’s not good.

    On the bbPress side, I found that the wordpress-integration is not necessary (I’ve asked about this, but no replies so far), and display name plugin requires some code changes to the BBPress code for it to work properly. It causes permission problems, and I had to dig around the forum where it shows you which code to change.. In retrospect, it probably wasn’t worth the trouble. (Gurus, please correct me if I am wrong, as I am new to BBpress)

    If you want me to look for that thread again, let me know.

    To get single sign-on working properly, you need to make code changes on the bbPress side to bb_cookie() and bb_logout() in pluggable.php along with the config changes I mentioned (which you’ve done already).

    function bb_cookie( $name, $value, $expires = 0 ) {
    if ( bb_get_option( 'cookiedomain' ) ){
    setcookie( $name, $value, $expires, bb_get_option( 'cookiepath' ), bb_get_option( 'cookiedomain' ) );
    }else{
    setcookie( $name, $value, $expires, bb_get_option( 'cookiepath' ) );
    }
    }

    function bb_login($login, $password) {
    if ( $user = bb_check_login( $login, $password ) ) {
    bb_cookie( bb_get_option( 'usercookie' ), $user->user_login );
    bb_cookie( bb_get_option( 'passcookie' ), md5( $user->user_pass ) );
    do_action('bb_user_login', (int) $user->ID );
    }
    return $user;
    }

    I hope this helps, and please let me know how it works out.


    horrorshow
    Member

    @horrorshow

    Hi beaulebens,

    I like your site!

    Which version of wpmu and bbpress are you running? Which plugins are you using for the integration. (I had to modify some cookie setting code in bbpress to get the single signon working properly: https://bbpress.org/forums/topic/cookies-subtle-bug-single-sign-on-bbpress-and-wordpress)

    BBsync doesn’t work with WPMU, btw.

    What other things have you customized? Thanks for sharing!


    horrorshow
    Member

    @horrorshow

    I fixed the problem by making changes to the bb_cookie() and bb_logout() since wpmu and bbpress set cookies differently: (the expire times are different). If anyone wants to me to post the code, please let me know.

    Also, I added the “cookiedomain” to the config.php

    Here’s the full list relevant to the integration.

    $bb->wp_table_prefix = 'wp_';
    $bb->wp_home = 'http://achillesblog.com';
    $bb->wp_siteurl = 'http://achillesblog.com';
    $bb->usercookie = 'wordpressuser';
    $bb->passcookie = 'wordpresspass';
    $bb->cookiepath = '/';
    $bb->cookiedomain = '.achillesblog.com';
    $bb->path='/forum/';


    horrorshow
    Member

    @horrorshow

    _ck_, I cleared all the cookies for this domain when doing the test. I also closed all open pages, and started fresh.

    The three cookies that I see generated when doing this test on both BBPress and WPMU are:

    wordpressuser

    wordpresspass

    wordpress_test_cookie

    I’ll look at the code for logging out of wpmu, and also see if anything gets changed in the database. I’ll then compare that to how BBPress logs out and see if it makes any changes in the database too.

    Thanks for the link, but he basically added:

    $bb->usercookie = ‘wordpressuser’;

    $bb->passcookie = ‘wordpresspass’;

    And I’ve already done that.


    horrorshow
    Member

    @horrorshow

    FofR, he’s trying to integrate WPMU, not WP, with BBpress


    horrorshow
    Member

    @horrorshow

    themebyc,

    Just curious, have you been able to get single sign-on between phpbb and wordpress?

    thanks.


    horrorshow
    Member

    @horrorshow

    Hi,

    I am trying to integrate bbpress(0.8.3.1) with wordpress mu (1.3.3), and I am having some issues with cookies for login/logout.

    I’ve tried setting this: (“MD5hash” replaced with my MD5)

    $bb->usercookie = 'wordpressuser_MD5hash';
    $bb->passcookie = 'wordpresspass_MD5hash';

    However, that didn’t seem to synchronize login(meaning, if I am log into wp, go to bbpress and find myself already logged and vice versa)

    Watching the cookies during the login/out process on WP MU, I found that the cookie names that WP MU uses are: “wordpresspass” and “wordpressuser”

    So in config.php for bbpress, I used:

    $bb->usercookie = 'wordpressuser';
    $bb->passcookie = 'wordpresspass';

    This works somewhat, let me explain:

    This scenario works:

    Log into WPMU, refresh bbpress page, I find myself already logged into bbpress.

    Log out of WPMU, refresh bbpress page, I find myself logged out of bbpress.

    Log into BBpress, refresh WPMU, I find myself logged into WPMU

    This doesn’t work:

    Log into BBpress, refresh WPMU (I find myself logged into WPMU) AND THEN when I try to log out from WPMU, I can’t log out.

    I refresh BBpress page, and I am not logged out either.

    If I log out from BBpress at this point, then I am logged out of WPMU as well.

    I have a feeling it might be something with WPMU, but I thought I’d post here first since this is where I found all the information about the integration. Thanks for your help. I am appending my config.php relevant to the integration part.

    $bb->wp_table_prefix = 'wp_';
    $bb->wp_home = 'http://achillesblog.com';
    $bb->wp_siteurl = 'http://achillesblog.com';
    $bb->usercookie = 'wordpressuser';
    $bb->passcookie = 'wordpresspass';
    $bb->cookiepath = '/';

    thanks for your help.

Viewing 9 replies - 1 through 9 (of 9 total)