Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Using login_form from bbPress on a WordPress site

@kevinjohngallagher

Member

I’m really confused, how can you be using bbpress and not have bb-load be called? bbPress doesn’t load if it’s not called :S

First:

If you’re building a wordpress website and want to include bbPress functions, I’d strongly suggest re-reading this:

Deep Integration, the allowing of wordpress functions to be called in bbPress, is totally unsupported and unintentional. If you can hack it to make it work then cool, but really, you’re on your own for the most part.

Calling bbpress functions in wordpress is always always always going to cause issues in the long run. it wasn’t built for it in any way shape or form. It’s a square peg in a round hole scenario, and if you can push something through then awesome, but sometimes it’s just not worth it.

Second of all, you could do this:

<br />
if(function_exists('bb_is_user_logged_in'))<br />
{</p>
<p>}<br />

Third:

in WordPress:

<br />
<?php<br />
if ( is_user_logged_in() ) {<br />
// Logged in user<br />
// Hardcode your form here<br />
} else {<br />
// Not logged in<br />
// Hardcode your form here<br />
}<br />
?><br />

in bbPress:

<br />
<?php<br />
if ( bb_is_user_logged_in() ) {<br />
// Logged in user<br />
// Hardcode your form here<br />
} else {<br />
// Not logged in<br />
// Hardcode your form here<br />
}<br />
?><br />

Overall:

I suppose what I’m trying to put across to mr_pelle, pagal and mikkelsen is that you’re trying to come up with an eloquent/easy/catch-all solution that doesn’t really exist.

bbPress and WordPress don’t play that nice together (reguardless of what the front page of this website says). Integrated cookies (logged into one means you’re logged into the other) is really where the buck stops; and any deeper integration is really really unsupported.

You’re best bet, without a shadow of a doubt, is to hardcode things to look and act the way you want them; and treat wordpress and bbpress differently. The realism is if you can’t code, then bbPress is definately not for you – sadly. We can help and guide the best we can, and there are some great people helping on this board, but at the end of the day, we can’t give out generic answers that are sure to work I’m afraid (honestly we’d love to).

Skip to toolbar