Going back to the first post, what does this mean:
the db's fine but erased by login information
It seems that the installation went well, you just need to figure out what user to log in with. If you can’t do that, why not register a new user with your email address. (Check the wp_users table now for the last id, and then after you register, make sure you look for the new id.) It will get the normal permissions of a member, then go into the database and modify that user’s meta info to give them moderator permissions? Then log in with as that user?
755833Inactive
I’m not meaning to be rude or anything but I’m struggling to understand why two bits of software made by the same company are so hard to integrate? I’ve never managed to get integration working fully and I always get to the point where users who registered through the forum post on the WordPress blog show up as Anonymous… which basically renders the whole process pointless. I’ve managed to get WordPress and vBulletin to integrate seamlessly, but not bbPress.
bbPress and WordPress are both great pieces of software in their own right, but when it comes to integration with each other they are pretty weak. For example, the new bbPress isn’t compatible with WordPress 2.6 because of an issue with cookie management in WordPress… for the integration to work we now have to wait for bbPress to release an update which according to a moderator on here will be a while away.
There are also so many unsolved integration threads here that it’s very difficult to find any one collection of possible solutions. I appreciate the amount of work that goes into this kind of software and time required to provide support. I’m just feeling a bit frustrated
755628Inactive
Hi.
This is an extension of this question: http://bbpress.org/forums/topic/hiding-subforums-on-the-homepage#post-11761
My forum has forums, subforums, and then subforums of those subforums. Basically, there are three levels of forums.
I was able to hide the subforums from the main forums page. But how do i hide the subforums’ subforums from the subforums pages, so that the visitor must click on the subforum to view the subforums’ subforums.
I would really appreciate any help on this matter. I am not good at coding so it would be wonderful to get assistance!
Of course you can do it, bbPress can do almost anything – as long as you code it 
Showing the gravatar is the easy part, the code to fetch the latest poster and their email address is the tricky part. How’s your mysql?
Showing a gravatar for any email address is as simple as:
<img src="<?php echo "http://www.gravatar.com/avatar.php?gravatar_id=".md5($user->user_email); ?>" >
The mysql code for the email of the last poster is going to need a left join of the users table against the post table and more than I am willing to do right now. I suppose I could be lazy and use get_latest_posts(1, 1) to fetch the entire info the last post and grab the email address from there.
I tried that and this is what I get as the url of the link:
http://mydomain.com/%3Ca%20href='http://mydomain.com/links/profile.php?id=1'>View%20your%20profile
Right now I have it simply by number of posts which of course is not an indication of quality by any real means but easiest way for me to track.
There’s also the top 1000 list where I try to track everyone.
It’s not a contest, no-one wins anything, and it’s completely unofficial, so don’t worry about it
nv1962, it would be a good plugin to learn/practice from. Roughly 3-5 lines total. Essentially you’d add an action to bb_send_headers and just like my plugin above, if the bb_get_location==”register-page” you echo the redirect header for the wordpress page (and then do a die() so no other code can execute until it redirects).
bbPress functions with the word “get” in them do not self-echo, they simply return the string. So you have to add echo. You almost have it, for example, this should work:
<a href="<?php echo bb_get_profile_link(); ?>">My Profile</a>
And just to confuse you, there are a couple of legacy functions with the word “get” in them that do echo. But they shouldn’t and are rare so don’t worry too much, lol.
Well login integration is not as important as the register part. As far as your instructions, I wouldn’t recommend deleting the contents of a core file but the redirect part is okay.
It occurs to me, it’s actually possible to redirect the register page in bbpress to the wordpress side via plugin with no edits required anywhere.
Remember that bbPress registration process should catch up to the WordPress side eventually. In fact I like it’s layout better but WordPress’s is more mature code-wise.
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!
724719Inactive
that means people can keep sign-up new accounts to give them selfs Karma points….
i dont mean to sound like a prick __ck__ but can you whip up some sort of plugin for this problem or some instructions. becuase i wouldnt know where to start let alone code somthing like that.
EDIT: WordPress has it goin ok, I get the message:-
ERROR: This email is already registered, please choose another one.
when registering an already existing email.
Whoa I never realized that.
I wonder if it’s also that way on the WordPress side.
Well it shouldn’t be too hard to whip up some code for that.
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 } ?>
Oh wow I wonder when they slipped that in. Good find.
I bet it’s just copied from the WordPress code.
If you know how, you might want to stick that into TRAC (and if you have the time, check WordPress and it’s TRAC too)
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
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.
724719Inactive
go to the logged-in.php file in your template folder (e.g. http://www.yourdomain.com/yourforum/bb-templates/kakumei/logged-in.php)
you’ll find this piece of code. change it to your likin :-
<p class="login">
<?php printf(__('Welcome, %1$s!'), bb_get_profile_link(bb_get_current_user_info( 'name' )));?>
<?php bb_admin_link( 'before= | ' );?>
| <?php bb_logout_link(); ?>
Good Luck!
Sway
http://www.swaymedia.com
http://www.picbi.com
chrishajer, the code you gave me worked. (I barely saw the “Y” in the “You are logged in” hiding behind my main content). So I guess that the code I tried before worked, only that it was hidden behind my main content so I didn’t see it.
Thanks.
750331Inactive
My installation seems to work with just that slash “/” on it own, but at least it working. I added the below into my wp-config.php file
@define('ADMIN_COOKIE_PATH', '/');
I have tried it with '/blog/wp-admin' and that didn’t seem to work, at all.
parthatel can you post your code here?
What function are you using to check if the user is logged in? Does it error out or does it just not display any content (if it does not error, then the function is probably a valid function.)
And showing one content for logged in members and other content for other members is pretty basic PHP:
<?php
if (bb_is_user_logged_in() ) {
echo "You are logged in.n";
}
else {
echo "You are not logged in.n";
}
?>
I’m 99% certain that is the proper function name, and the code will work.