Do you want me to look at it? and did you clear your cache after you just have one line?
WordPress + bbPress Integration 101
(186 posts) (70 voices)-
Posted 3 months ago #
-
I don't need to clear the cache, just the cookies, but yes I did, i cleared both!
Posted 3 months ago # -
It works when i login first in bbpress, then I'm logged in wordpress also, but first in wordpress and then in bbpress is not working!
Posted 3 months ago # -
do you want me to look at it??? email me ftp and give me admin access.
Posted 3 months ago # -
Cross-Domain Intergration
I've not seen anything about messy cross-domain integrations, so I thought I'd share my method. I'm using Wordpress 2.8.6 with BBPress 1.0.2. Your mileage may vary on other versions. I suspect this method is not valid for 2.5/0.9.
The setup:
- example.com/blog
- example.com/forum
- example.org/forumWith shared user tables and database.
The config AUTH_KEY/SECURE_AUTH_KEY/LOGGED_IN_KEY should be the same for all (remember to add BB_ to the forum config files). Within the BBPress admin intergation, have the same auth/secure/logged in values for all forums (remember it's the value shown within the Wordpress options screen, not the values in the config files).
In this case cookiepath should be '/' ($bb->cookiepath = '/'; // in bb-config and, define('COOKIEPATH', '/'); // in wp-config). Set other $bb->style configurations as you wish.
Basically, everything is the same. Except: The Cookie Domain must be explicitly set**. And not always set to the same value.
In example.com/blog's wp-config add: define('COOKIE_DOMAIN','.example.com');
In example.com/forum's bb-config add: $bb->cookiedomain = '.example.com';
So far, so simple.
Now, in theory, example.org/forum can be set with $bb->cookiedomain = '.example.com'; // But I've not tried. Paranoid browsers would surely reject this. Instinctively having the forum rely on something that might look like a security risk is bad.
Instead, try adding this to example.org/forum's bb-config: $bb->cookiedomain = '.example.org'; // Users will still need to log in separately when they switch domain, but all the other integration features seem to be fooled, with no adverse problems.
I'd welcome any feedback on this method. I'm still not sure this is the best approach.
( ** Not setting the cookie domain appears to work, until the user switches between domains - example.com/blog doesn't simply fail to find a cookie set by example.org/forum, it may fail a fresh blog login until cookies are cleared. I'm not sure exactly what's happening, but it's messy.)
Posted 3 months ago # -
daudev, I messed up on step
4 Open bb-config.php (in the bbpress folder) do the same thing here. With the SAME keys you put in the wordpress file put in the bb-config file around line # 41-45. ***You have to add BB_ to the front of the names. Example: BB_AUTH_KEY to all eight.*** Save. Keep the file open for now.
Posted 2 months ago #
Reply
You must log in to post.