[Bb-trac] Re: [bbPress] #972: Loading WordPress inside bbPress broken in several ways

bbPress bb-trac at lists.bbpress.org
Mon Nov 10 11:11:08 GMT 2008


#972: Loading WordPress inside bbPress broken in several ways
-------------------------+--------------------------------------------------
 Reporter:  sambauers    |        Owner:                    
     Type:  defect       |       Status:  new               
 Priority:  high         |    Milestone:  1.0-beta & XML-RPC
Component:  integration  |      Version:  1.0-beta (trunk)  
 Severity:  major        |   Resolution:                    
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by svennid):

 I tried to figure this on my own, but I didn't get very far. Though, I
 thought I should share my experiences.

 In the first place, the login did not stay open so that I would be able to
 enter the admin menus of bbPress after loggin in to WP.

 Doing these steps made it possible to keep the login from WordPress open
 when entering bbPress:

 1. bb-settings.php : Change the $bb->authcookie from "wordpress_" to
 "wordpress_logged_in_"
 2. pluggable.php : rename "wp_validate_auth_cookie" to
 "bb_wp_validate_auth_cookie" (rename all occurences in bbPress)
 3. class.wp-auth.php: remove the hmac hash check

 Now I was able to log in to WP and stay logged in when entering bbPress.
 And even use /bb-admin/.

 Next, I fixed the problem with role names in the forum in bb-includes
 /template-functions.php:

 1. change "@$caps = array_keys($user->capabilities);" to "@$caps =
 array_keys($user->bb_capabilities);"

 This was the closest I got to making the integration work. The next step
 would be to be able to enter /bb-admin/ without getting returned to the
 home page.

 I made it by uncommenting some redirect-functions, but I did however not
 have the caps to edit any info, more than a moderator. I figured it had to
 be the caps which are wrong.

 So I checked the $bb_current_user variable, and it proved me correct. The
 ->allcaps does not show the caps from bb_press, but only from wordpress.
 It is also missing the role as keymaster, even though keymaster is one of
 the ->bb_capabilities.

 You would probably have figured this on your own when you were trying to
 fix this bug, but I hope I might have provided som info to help you
 troubleshoot it :)

-- 
Ticket URL: <http://trac.bbpress.org/ticket/972#comment:2>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list