I’m not sure if this worked but …
I added in the standard Plugin header to the bad-behavior-generic.php file (see below) and then copied it and the rest of the bad-behavior folder up to bbPress. It turned on. I’m trying to sort out how to hack the wordpress plugin. I’m running the same DB for wp and bb so, in theory, this should work easily. It’s not
Fatal errors.
/*
Plugin Name: Bad Behavior
Version: 2.0.24
Description: Deny automated spambots access to your PHP-based Web site.
Plugin URI: http://www.bad-behavior.ioerror.us/
Author: Michael Hampton
Author URI: http://www.homelandstupidity.us/
License: GPL
I just created a plugin for WordPress that allows me to over-ride the authentication process and supply my own user account data. I was in the process of doing the same thing for bbPress when I hit a snag.
In both cases the first step is re-writing the wp_validate_auth_cookie function. (conveniently pluggable in both cases)
For WordPress, I was then able to modify the get_userdata function to pipe in my own data (reformatted for WP compatibility) rather than grabbing it from the usual database.
The trouble comes in that the comparable bbPress function is get_user, within the BB_Cache class. (line 15, cache.php)
So that means I have to ‘hack’ to make my plugin work. Fine for the meantime, but perhaps this is something to make pluggable in the future.
meitershaker – In theory, the principle that worked for Adding default Gravatars to WP 2.6 should work for bbPress.
Haven’t tested it yet.
Okay I think I figured it out. There were no wp_ tags on my user and usersmeta and I did not require login for comments so there was no users to add to bbpress. So I think I have it working properly!!! Yay! Thanks me for all the help!!!
Yeah NM on that last one. I decided to just risk it and take a chance and deleted the bb_ listings out of the database and it worked.
However I have a new problem
The forum is working fine however when I tried to intergrate wordpress it told me that wp_user doesn’t exist and looking in my wp_config.php it doesn’t….now what do I do?
When doing a fresh install do I delete all the bb_ files out of my database before reinstalling?
Still getting the same error. I also tried wiping the bbpress and doing a fresh reinstall but for some reason the installation didn’t go to step two. Once I put all the information in it skipped step 2 and 3 and went to the forum, with my all my old login info.
I think you can fix that in your bb-config.php file by overwriting.
Under define('BB_LANG', '');
Add in this: $bb->wp_table_prefix = 'wp_';
Hello,
I installed bbPress on wordpress 2.5.1. It went smoothly. I did not intergrate on install because I didn’t not have all the information to input (these instructions need to be explained better). Once installed I followed the instructions as per: http://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101.
On the last part where it asks about shared user table or some such (can’t look at it now) I entered WP_User. I think I was suppose to just enter WP_ (This needs explained better). Anyway now when I try to log on I get this message:
bbPress database error: [Table ‘hornymel_ss4949.WP_USERSusers’ doesn’t exist]
SELECT * FROM WP_USERSusers WHERE user_login = ‘384tlzxvu97’
However I cannot get in to change this value. How do I fix this?
If you are integrated with wordpress, I believe you can mass edit users on that side (either natively or via plugin). With 1.0 using backpress, they will hopefully port over some of the user functions into the admin panel – ie. create new user and mass edit.
Keep in mind bbPress (and I don’t even thing WordPress) actually deletes users entirely from the db, it just disables them.
If you find a WP plugin that does what you want, it should be fairly straightforward to port to bbPress.
@ctsttom – In order for a user that was registered in WordPress to have any authority in bbPress, they need to have the option ‘bb_capabilities’ in their user metadata. This does not have anything to do with the role maps in bbPress. Those role maps only affect users that are registered within bbPress that need to have capabilities inside WordPress. I think you are having the same problem that I had – you need to go the other direction. You need a default capability in bbPress for a new user registration in WPMU.
There are two ways to do this:
1) go to your bbPress admin panel, drill into each new user that was registered in WordPress, edit their profile, and assign them a ‘User Type’
2) use my shiny new WordPress plugin that creates a default capability of ‘member’ in bbPress for users that are registered in WordPress
https://bbpress.org/plugins/topic/wpmu-enable-bbpress-capabilities/
I would be interested in any feedback you have. There are two caveats to this plugin:
1) it does not handle any users registered in WordPress that existed before the plugin was activated, you’ll have to do that manually (but you get the idea and could handle this with a mass SQL)
2) there is no logic to determine which bbPress User Type to use, I just start with ‘member’ and assume that I’ll manually set admins/moderators, and further that everyone with a login should be able to post.
Let me know what you think!
Did some research. Short answer: If it fixes your site, then no, no black hole is created.
Mod_security is a weird beasty. You may want to ask your ISP/Host why it’s set up such that it butchers ajax, though.
Did you have any issues with your wordpress setup that made you fiddle with the security?
Okay, I tried using the settings that the setCookieParams seems to be recommending.
PathcookiePath: /
Cookie domain: blank
Cookie hash: 84bdfc54a51c9a8b123e73fe41df39a3
No change in bbpress/blog behavior. When I use the bookmark to show cookie settings, they are unchanged since yesterday. It doesn’t appear the setCookieParams worked.
Another question, the 2Diabolos site has two setCookieParams on the page. Is there one that should be used over the other?
I found more info on the setCookieparam plug in.
http://www.2diabolos.com/blog/?s=cookie
What threw me was that the download given here is in an ‘upload’ subdirectory, but needs to be uploaded to the plugins folder and implement the usual way. It can then be accessed through the ‘settings.’ But, I’m still confused. The instructions here say that it can be used to check the cookie settings, but all I see is the ability to set the cookies. If I am to set them, should I just follow the suggestions given with the plugin?
I’ve checked and double checked all the steps to coodinating wp-config.php with bb-config.php but no-go. I can only log into bbpress if I’ve already logged into wp, but even then it doesn’t let me into the admin.
One possible area of confusion, I couldn’t figure out how to get the .zip file that would display cookies to work. How is it supposed to be implemented?
I got the bookmark cookie check to work, but it gave a number of different sets of numbers.
/r__utmc=162181740
__utma=162181740.1942902695.1222437978.1224615332.1224620799.21
__utmz=162181740.1222437978.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
__utmb=162181740
wordpress_test_cookie=WP+Cookie+check
Which string is relevant?
Ooops – please see my conversation with Donncha in the ticket above.
The short story: defining COOOKIEHASH as md5(get_option(‘site_url’)) will work for the main blog but not any other blogs if you are using VHOST (subdomains).
There is a fix/hack: calculate the md5 hash of your domain, and use that value to define COOKIEHASH.
define('COOKIEHASH', md5('http://yourdomain.com');
No subdomains, no trailing slashes, will work fine.
You can also get this value from bbPress speedup settings, found at Settings, WordPress Integration, and the bottom of the page.
$bb->authcookie = 'wordpress_biglonghashvalue';
$bb->secure_auth_cookie = 'wordpress_sec_biglonghashvalue';
$bb->logged_in_cookie = 'wordpress_logged_in_biglonghashvalue';
In your wp-settings.php,
define('COOKIEHASH', 'biglonghashvalue');
I’m about this close to making my new forums live. I’ve got WP 2.6 and bbPress alpha tied in together pretty well, but they recently announced the lockdown on 2.7, which means that may come out by years end.
Has anyone started testing with 2.7 yet? I’m not asking if I should not go forward and get my forums started, just wanted to know what kettle of worms I was opening
musnake –
I think this must be a big source of the problem for MU and getting it to work with bbPress. And why some get integration to work (standalone) and other can’t (wpmu).
In the WP standalone install, it does indeed appear to be there (is that where you got the code above?).
In WPMU 2.6.2 (https://mu.wordpress.org/latest.zip) wp-settings.php, line 317:
// Used to guarantee unique hash cookies
$cookiehash = '';
/**
* Used to guarantee unique hash cookies
* @since 1.5
*/
define('COOKIEHASH', '' );
$wpdb->hide_errors();
if( defined( 'MUPLUGINDIR' ) == false )
define( 'MUPLUGINDIR', 'wp-content/mu-plugins' );
if( is_dir( ABSPATH . MUPLUGINDIR ) ) {
if( $dh = opendir( ABSPATH . MUPLUGINDIR ) ) {
while( ( $plugin = readdir( $dh ) ) !== false ) {
if( substr( $plugin, -4 ) == '.php' ) {
include_once( ABSPATH . MUPLUGINDIR . '/' . $plugin );
}
}
}
}
Want to know the funny part? I actually debugged it instead of going to the source in WP standalone. At least I came to the same conclusion. This should probably be reported as an MU bug – I’ll let Donncha know.
Ok, I just reinstalled using seperate db’s this time (+WP integration). The installation process is very, very smooth with good feedback at every stage.
Again, I believe the install was successful.
Cache cleared etc. but numb ‘Add Forum’ button issue persists.
I am using the same filebase (with no PHP errors in logs) though.
The only blank spot I have in the install is:
>>>>>> WordPress "secure auth" cookie salt not set. which appears to be an acceptable state based on the doc’s.
The 6 session cookies are all suffixed with COOKIEHASH.
I am unable to create new fora as keymaster or Admin.
Can I provide any useful data?
Caught wearing my underwear on the outside. It doesn’t make me immune to cosmic cookie rays?
This was a cherry install so I didn’t have any experience with bbPress and its issues etc. The ‘add forum’ button issue existed before I added the quick fix…I found it on my first pass through the support forums trying to see how other WP2.6 success stories started out…
Did I mention that I have the bbPress files located in a subdomain called ‘forum’ i.e. mydomain.org/forum/ ?
I’ve just gone through the phpbbb vs SMF review again, just so I can get something going while these small things get cooked off, but I think I’ll stry bbPress as a stand-alone in its own db and integrate later…Do you see any drama with that path?
I just noticed that I didn’t add the SECRET_KEY value from wp-config.php (sic) to wp-settings.php as per a comment in that file…but it turns out that’s an artifact. Strike that.
These are some of the cookies that FireBug reports:
wordpress_logged_in_f004625b18565e7c579076261d01b3a5
myDomain.org 105 B /forum/ Session
wordpress_f004625b18565e7c579076261d01b3a5
myDomain.org 95 B /wp-content/plugins Session
wordpress_f004625b18565e7c579076261d01b3a5
myDomain.org 95 B /wp-admin Session
wordpress_f004625b18565e7c579076261d01b3a5
myDomain.org 95 B /forum/my-plugins Session
wordpress_f004625b18565e7c579076261d01b3a5
myDomain.org 95 B /forum/bb-plugins Session
wordpress_f004625b18565e7c579076261d01b3a5
myDomain.org 95 B /forum/bb-admin Session
wordpress_test_cookie
myDomain.org 36 B / Session
I’m checking…
Have you read this?
https://bbpress.org/documentation/integration-with-wordpress/#func
That allows you to use WordPress functions (like get_sidebar, get_header) inside bbPress.
There’s no way I know of to load bbPress in a WordPress page, or anything like that. It’s not a WordPress plugin.
Hey,
Is it possible to load bbpress inside wordpress ?
I am using bbpress (latest from trunk) + wp2.6.2
I have designed a theme for wp2.6.2. And my wp2.6.2 has a lot of plugins. I wish to load bbpress into wordpress. Is it possible ?
Nice layout, but isn’t it possible to change the URL structure? It would look a lot cleaner if it was rewritten.
Nice concept.
I’m away from WoW for 2 years now but it’s interesting to see that people still raid Naxxramas.