Skip to:
Content
Pages
Categories
Search
Top
Bottom

admin link not working

  • i’m new to all this wordpress stuff so forgive me if this is too hackish.

    i installed wp2.6 and bbp1 alpha. they almost integrate. i had a problem getting the admin link to work when i had logged in via wordpress (no problem logging in via bbpress). on investigation i discovered wp login was setting cookies only for itself, whereas bbpress was setting cookies for itself and wordpress.

    my solution tells wordpress to be as polite as bbpress:

    insert the following into wp-config.php replacing {bbpath} with your bbpath:

    define(‘BB_ADMIN_COOKIE_PATH’, ‘/{bbpath}/bb-admin/’);

    define(‘BB_PLUGINS_COOKIE_PATH’, /{bbpath}/bb-plugins/’);

    define(‘BB_MYPLUGINS_COOKIE_PATH’, ‘/{bbpath}/my-plugins/’);

    open wp-includes/pluggable.php and find where the cookies are set – these lines:

    setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure);

    setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure);

    insert the following immediatley after:

    setcookie($auth_cookie_name, $auth_cookie, $expire, BB_ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure);

    setcookie($auth_cookie_name, $auth_cookie, $expire, BB_PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure);

    setcookie($auth_cookie_name, $auth_cookie, $expire, BB_MYPLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure);

    now wordpress will set the same cookies as bbpress thus allowing full access averywhere.

    like i say, i’m fairly new to this so please correct me if i’m wrong or if this approach has security implications.

Viewing 1 replies (of 1 total)

  • Jimmy B.
    Participant

    @jimmyvt

    This a very good thread, might even want to sticky it. I’ve tested this and it works and is needed if you really want true cookie sharing :)

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar