Search Results for 'code'
-
Search Results
-
Now that I converted my board from phpbb to bbpress I need to know how to redirect the old stuff to where the new board is (so people coming from google can at least get to the new bbPress index and not just get a 401 – which is what is currently happening). I suppose I need to do this in my htaccess file. Does anyone have the code for this? Thanks.
Hi,
Where can I find the code that generates the “edit a post” page?
The bbcode buttons and live preview plugins don’t appear to be working on this page and I’d like to add support for them.
Thank you,
Ok, it’s a slight fix since it’ll only solve one of the issues (I was having) with integration.
The problem was that I could not for the life of me force bbPress to set a ‘logged_in’ cookie with path ‘/’.
WordPress: domain.com
bbPress: domain.com/forum/
This meant once I’d logged in via bbPress, when I was browsing WordPress (although it set the ‘auth’ cookie fine and I could view wp-admin/) it ‘appeared’ that I was logged out (log in and register link, instead of log out and site admin).
I’d already tried this in bb-config.php, along with the other ‘integration speedups’ bbPress supplied;
$bb->sitecookiepath = '';
I’d also tried setting it to ‘/’ as well, but every time the cookie would not get set.
And here was the culprit; line 673 in bb-settings.php;
$bb->sitecookiepath = rtrim($bb->sitecookiepath, '/');
Then on line 735, it checks if $bb->;sitecookiepath is not set or empty. Otherwise, the ‘logged_in’ cookie for sitecookiepath will not get added to the $cookies array, and hence will not be set when wp_set_auth_cookie is called (specifically line 172, pluggable.php).
Changing the culprit to this fixed it for me;
$bb->sitecookiepath = '/' . trim($bb->sitecookiepath, '/');
The complete fix (for me) was to force all logins, registrations and logouts through bbPress with this in a .htaccess at the WordPress root;
RewriteCond %{QUERY_STRING} action=register
RewriteRule ^wp-login.php forum/register.php [R=301,NC,L]
RewriteCond %{QUERY_STRING} action=logout
RewriteRule ^wp-login.php forum/bb-login.php?logout=1 [R=301,NC,L]
RewriteRule ^wp-login.php$ forum/bb-login.php [R=301,NC]
This actually worked out better for me, since bbPress by nature allows you to skin the login, and users get to enter a little more info for their profile during registration.
Hope this of some help to others!
Well, now I’ve gone and done it. I installed bbpress 0.9 first then installed WordPress mu 2.6.3. I then tried to turn on integration, and now my bbpress installation is completely broken. I cannot login as I get the error:
bbPress database error: [Table 'web_forums.wp_users' doesn't exist]
SELECT ID FROM wp_users WHERE user_login = 'admin'
bbPress database error: [Table 'web_forums.wp_users' doesn't exist]
SELECT * FROM wp_users WHERE user_login = 'admin'My databases for WP and BBP are separated. Is there a way to reverse the integration? I cannot drop the database as there are existing users and posts.
I only realised this would be a problem after the fact, when I came here searching for a solution. If anyone is able to help me I’d greatly appreciate it. I’ve searched the forum posts extensively and looked through the bbpress configuration file to no avail. I hope someone can assist as I am at a loss on how to fix this.
Topic: Integrate wp2.7 and bbp1.0a2
Okay, I think I’ve experienced similar problems as most of you, and I just got mine working logging in and out from every angle with access to the admin panel on both. It still seems to hiccup a little when changing roles, so I am still trying to track that down, but I wanted to share where I am so far.
I am using the WordPress 2.7 beta 3 nightly build, and the bbPress 1.0 alpha 2. I am using various plug-ins and what-not and have akismet active on both.
My host is 1and1.com.
There are a few things that are of the utmost importance:
- I recommend BEING LOGGED INTO WORDPRESS AS ‘admin’ with user_id of ‘1’ when you install bbPress. Any other Administrator account didn’t want to redirect to the admin panel properly. I assume the cookies will immediately conflict as they are shifted around, causing weird issues from the start.
- BOTH -config.php files need to have the AUTH, SECURE, and LOGGED_IN KEYS defined correctly.
- I personally also defined the SECRET_KEY in WordPress, although I’m not sure this is necessary yet.
- bbPress needs to have the salts entered correctly during installation so that they match WordPress. Fortunately the link to the hidden admin panel is provided during the install so you can get them pretty conveniently. I personally did not have a secure_salt so I left it empty.
- MUST add
$bb->WP_BB = true;
if (file_exists('../wp-blog-header.php'))
require_once('../wp-blog-header.php');
else
if (file_exists('../../wp-blog-header.php'))
require_once('../../wp-blog-header.php');or your personal equivalent to bb-config.php
- I personally had to add
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');to my wp-config.php to make it go.
- Login to bbPress as ‘admin’ if you are already not, navigate to settings/wordpress integration, and adjust the role map accordingly.
- Visit bb-admin/rewrite-rules.php page and copy the code
- Put the following in a file named “.htaccess” file and place that file in the bbpress root directory:
Options -MultiViews
YOUR PREVIOUSLY COPIED CODEThis is to make sure your URL’s are rewriting correctly.
- Logout.
- Clear all website cookies and attempt logging in either/or/both WordPress and bbPress. Access admin panels of both. Basically check for functionality.
That’s how I got mine working. Like I said, I’m still having issues assigning user roles for some reason, so I’ll try and figure that out next.