Sorry for the tangent _ck_ but… you really recommend redirecting all logins to WP, too? As in, this silly thing I just posted about “unifying” registration on the WP side?
Yes, this is why I always recommend to people when integrating with WordPress that they redirect all login and registration links to the wordpress side. It’s had years of development in that area.
In any case, here is a simple plugin to prevent duplicate email addresses. Unfortunately bbPress has no way to place custom error messages on the page without template hacking but this should do:
<?php
/*
Plugin Name: no duplicate email addresses
Author: _ck_
*/
if ($_POST && bb_get_location()=="register-page") {add_filter('bb_verify_email','no_duplicate_email');}
function no_duplicate_email($email) {
if ($email) {global $bbdb; if (!$bbdb->get_row($bbdb->prepare("SELECT * FROM $bbdb->users WHERE user_email = %s", $email))) {return $email;}
else {add_action('bb_foot','no_duplicate_email_alert'); return false;}}
}
function no_duplicate_email_alert() {echo "<scr"."ipt>alert('".__("email address already registered")."');</script>";}
?>
(bbPress 0.9 or higher required)
(Subtitle: how to use registration protection/filtering in WP for bbPress – the lazy but effective way!)
Say: you’re a PHP newbie (like me), want to run bbPress and WP, and have successfully completed the installation of the plugin to integrate the bbPress user database with WP’s (whew!) and then you discover that people can register via either the bbPress or WP . Suppose furthermore that you’re getting hammered by nasty bots registering themselves, and have an open self-registration policy on your WP blog/CMS, and therefore installed a nifty registration screening plugin (oh say, WP-reCAPTCHA) and would like to use that for bbPress.
How could you do that? With two simple edits you can:
1) Open the register.php file of bbPress (in bbPress’ root directory) and delete EVERYTHING in it, and save your cleaned-out register.php file back to its place on the server (saving an empty file is to avoid a possible “file not found” error after the next step)
2) Open (or create if you don’t have it – which would be rare) a .htaccess file in the web server’s root directory and add the following single line (it’s displayed here on two lines, but really ought to be a single line!), and put that at/near the top of your .htaccess file (assuming your bbPress install sits in the /forum sub directory; else, modify accordingly to point to the register.php file):
Redirect permanent /forum/register.php http://www.example.com/wp-login.php?action=register
Make sure you substitute “example.com” with your own domain (of course).
3) This step is non-existent. Instead, enjoy your newfound unified registration bliss for dummies!
I would back up your database first, just to be sure.
If you delete all the files, nothing happens to WordPress.
If you delete all the bb_ tables, that does not affect WordPress.
I’m not sure how you get rid of the bb users from the wp_users table. But once you delete all the bb_ tables from the database, you should verify that you can log in to WordPress admin fine. You might want to manually delete the bb users from the wp_users table, but you’d have to be careful if they created any content in WordPress that would be keyed to their id.
I think this covers integration:
https://bbpress.org/documentation/integration-with-wordpress/
You cannot use WordPress 2.6 with bbPress 0.9
There are major cookie changes in 2.6.
It’s going to be awhile before there is a version of bbPress that will work with 2.6, so stick with 2.5.1
From what I am being told, it’s going to be awhile before an official release of bbPress will work with with WP 2.6 because of the radical cookie changes. Most certainly not the 0.9 branch.
There is a version of bbPress in the trunk that supposedly will work with WP 2.6 but that is definitely not recommended for the average user.
Stick with 2.5.1
Ok I tried it and no success. If i delete all bbpress files and then try to reinstall will it mess up the wp database since I think I integrated it? Also where is a very detailed explanation of integrating with wp so I don’t mess it up again?
Is there a new version of bbpress due soon to support the new version of WP? Prefer to wait if poss.
You can create a new ticket after logging in here:
https://trac.bbpress.org/
bbPress does not create the .htaccess file for you like WordPress does. I think in future releases they are considering creating it for you.
https://trac.bbpress.org/ticket/838
I don’t think that’s it. With an integrated install, you should only be using the wp_users table, not the bb_users.
There used to be a trick, not sure it this works any longer.
https://bbpress.org/forums/topic/cant-login-1#post-795
Might be worth a shot. Sorry I can’t be of more help.
Wait, so was this ever resolved after a year?
With WordPress in the root and bbPress in a sub-directory (ie. /forums/) can they both have pretty permalinks?
I have an idea if not – simple edit the webroot wordpress htaccess like so:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
where /forums/
is the install path of bbpres underneath wordpress. Remember you still need the local htaccess for bbpress in it’s own folder.
Sure, if that really bothers you, with bbPress you can do almost anything if you get clever.
Edit the login-form.php
template and wrap the entire <form></form>
in something like this (untested)
<?php if (bb_get_location()!="register-page") { ?>
<form blah blah blah
...
</form>
<?php } ?>
I can vouch for ThemePress. It is an excellent solution imho. I am using it on a site that is still in the development stage. It is quite easy to use. It is also much better than trying to make separate bbPress and wordpress themes similar.
I want to try to explain a little bit more: I looked at the tables in the MySQL Database (bbpress only install – not WP integration) – in the table “bb_users” are some fields like “user_login”, “user_nicename” and many more …
My problem is that the search function does not give me any results if I search for a user name (user_login) or for example “user_nicename” – and at this time I think it is unrelevant if the user have post something or not. Seams that this fields are not in the search include only the topic or the content of a post is relevant for the search function …
My question is: How can I modify the search that these fields are also relevant for the search?
Thank you very much for help …
Sorry, I dont know about the TRAC thing. Just explain and i will stick it up there.
BTW .. isnt there a PM system within bbpress ?
By popular request here is “The Hybrid”
download:
http://bbshowcase.org/themes/the-hybrid.zip
demo:
http://bbshowcase.org/forums/?bbtheme=the-hybrid
Essentially it’s a mash-up between the bbPress support forum theme here and Kakumei, with a few tweaks.
Requires the Topic Views plugin to be installed.
It’s older work and not as pretty as “FutureKind” (I won’t be releasing that one this year) and you can forget about “validation” unless you want to work on it quite a bit yourself, but it’s a nice alternative to the defaults.
Let me know if you get any errors or other problems.
I’ll try to fix it up some more as I have time.
In bb-includes/class-phpass.php on line 43, bbpress uses getmypid() to create the randomstate for password hashes.
On shared hosting systems, getmypid() is disabled very often.
I replaced it with uniqid(), and bbpress didnt throw the WARNING anymore.
getmypid() does not return a unique value in all cases. Especiall when PHP is running as an apache module in shared hosting sytems. Also for this reason its much better to use uniqid().
uniqid() gives a 13 digits value. uniqid(”, true) even 23 digits. I think this should be good enough for the randomstate. 
Please consider to use uniqid() in future versions of bbpress.
thx for your attention
ix
Had the same bug, when I installed bbpress for the first time today. I noticed that it didnt even create the .htaccess file.
(couldn’t get the quote to work) from _ck_ post above: ” Also, none of this truly fixes WP 2.6 to work properly with cookie integration with bbPress 0.9.0.2 – that’s going to require an upgrade on the bbPress side.
ahh this must be why I am having trouble with single sign-on? In the past hour, I have tried everything in all the other posts about this topic to no avail. Unless I tried every combination/setting with the configs except the right one, of course.
The trouble is that the developers on the WP side, in their wisdom
decided to re-use an existing cookie name for a new purpose and change the cookie path.
The idea is higher security as the admin cookie in theory should only get transmitted when you are entering the admin section.
This is why you need to try deleting all your cookies (for your site) after installing WP 2.6
If that fails, try my define
fix above.
Note that changing the cookie path to ‘/’ takes you back to the lower level of security that WP 2.5.1 and earlier had. There’s a particular WP mod who’s upset with me for even suggesting this but I figured the idea is to get you up and running ASAP first until they address this later.
Also, none of this truly fixes WP 2.6 to work properly with cookie integration with bbPress 0.9.0.2 – that’s going to require an upgrade on the bbPress side.
724719Inactive
hey dbbpress1;
what do you mean exactly by
all of the redirects are causing me problems. I need the pages to return directly without redirecting to show new content.
750185Inactive
Hi – I’m trying to integrate bbPress with the rest of my site and I’m finding that all of the redirects are causing me problems. I need the pages to return directly without redirecting to show new content.
Does anyone have expertise in this area? I would greatly appreciate a few hours of help and I could even do it as a paid consulting gig given the short notice.
Thanks