Skip to:
Content
Pages
Categories
Search
Top
Bottom

WordPress + bbPress Integration 101

Viewing 25 replies - 76 through 100 (of 191 total)

  • flywitness
    Member

    @flywitness

    [gives up]

    bring on the docs


    isaacgreenspan
    Member

    @isaacgreenspan

    Though I hesitate to say this out loud, it is possible to integrate bbPress 0.9.0.2 with WordPress 2.6.x (I have a site running the two and logins to one part work in the other, cookies are properly set and cleaned up, etc.), BUT it requires plugins to both bbPress and WordPress (or, alternately, modification of core code) and I’d venture to guess that it might substantially weaken the cookie security introduced in WP2.6. If anyone is desperately interested, I can share details, but it’s messy.


    _ck_
    Participant

    @_ck_

    I experimented for awhile with making a plugin that would make 2.6 work with the 2.5 cookies using a pluggable replacement but the task proved overwhelming. Then I tried making a replacement pluggable for bbPress to make it work with 2.6 cookies and that was just as insane too.

    Unless your mods are concentrated into one file I wouldn’t recommend tampering with the core.

    I don’t get the rush to WP 2.6 It’s getting terribly bloated.

    I miss 2.0 – feature rich yet still lightweight.

    Got integration working under WP 2.5.1 and bbpress 0.9.0.2

    I’d just like to make an observation regarding integration instructions for power users –

    Instruction part 8 says: Copy all these items into the bottom of wp-config.php and edit as required:

    $wp->cookiedomain = ‘.your-domain-name.com’;

    define(COOKIE_DOMAIN,’.your-domain-name.com’);

    // note the leading DOT – this is important

    // we list both for WordPress legacy compatibility

    Originally, I took this to mean:

    $wp->cookiedomain = ‘.mysite.com’;

    define(COOKIE_DOMAIN,’.mysite.com’);

    It wasn’t working. However, once I changed it to:

    $wp->cookiedomain = ‘.www.mysite.com’;

    define(COOKIE_DOMAIN,’.www.mysite.com’);

    and in bb-config.php:

    $bb->cookiedomain = ‘.www.mysite.com’;

    (adding the www part) It works perfectly fine now.

    Hope this helps.


    _ck_
    Participant

    @_ck_

    “.mysite.com” should cover all subdomains.

    Techincally .www.mysite.com is a subdomain.

    I don’t know why it didn’t work for you

    unless perhaps it was already “.www.mysite.com” on the WP side. They have to match.


    doyle640
    Member

    @doyle640

    I successfully integrated bbpress alpha with the latest wordpress. The install is pretty flawless.

    Now, I want to pull in the header and sidebar from wordpress. Does anyone have any tips for me on how to do this?


    chrishajer
    Participant

    @chrishajer

    To use the WordPress functions get_sidebar and get_header, you need to include WordPress inside bbPress:

    https://bbpress.org/documentation/integration-with-wordpress/#func

    This might help as well:

    http://www.adityanaik.com/integratepress-part-i/


    doyle640
    Member

    @doyle640

    that works, however, i can no longer access the admin section, it only loads as blank, any ideas why? thanks for your help with this.

    the rest of the functions work on the main pages of the forum.


    isaacgreenspan
    Member

    @isaacgreenspan

    @ck:

    based on my recollections, as i’m on a road trip and can’t readily pull up the code, WP2.6 (maybe older, too, i don’t know), in the midst of their new cookies, has an action hook that can be tapped at cookie-creation to make an additional cookie for bbPress to read (in my instance, bbPress is in /forums/ so the new cookie is restricted to that path). the function that destroys the cookies at logout doesn’t have an action hook, so it has to be overridden (it’s pluggable). on the bbPress end, it’s virtually identical–use an action hook at login to create the various cookies that WP expects, override the pluggable cookie-destroying function.

    there’s also some work in syncing up all the various secrets.

    it’s worth noting that the cookie that’s now restricted to wp-admin/ in WP2.6.x is the same cookie that was unrestricted in path previously, so the mechanics of the cookie contents and whatnot aren’t any different, just the path restrictions.


    doyle640
    Member

    @doyle640

    Does anyone know why the admin section is displaying blank when the wordpress functions are included in bbpress?


    chrishajer
    Participant

    @chrishajer

    If the browser is blank when you load a page, it’s probably due to a 500 error. Do you have access to error logs to see what’s causing that error? I have not hear of that before when including WordPress in bbPress.


    nekita
    Member

    @nekita

    Seems as if I have the same problem as doyle640. Integrated the Alpha with WP 2.6.2 and after adding “require_once(‘../wp-blog-header.php’);” to bb-config.php I can’t access the bbP Admin section anymore. the “Reply” and “New Topic” area is gone as well, Profile can’t be edited etc. The title under my Admin name (“Key Master” by default) will also change to Invalid.

    The loading error for the admin section is indeed a 500 error. At first I figured it might be related to some class conflicts within the WP and bbP CSS structure but fiddling with that didn’t help either.

    Now it seems more likely that the User Account looses all of it’s user privileges in bbP once it’s integrated with WP for some reason.


    doyle640
    Member

    @doyle640

    here is my errors when I try to access the bbpress admin section:

    [15-Sep-2008 12:10:48] PHP Warning: require_once(../wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/forum/bb-config.php on line 34

    [15-Sep-2008 12:10:48] PHP Fatal error: require_once() [function.require]: Failed opening required ‘../wp-config.php’ (include_path=’.:/Applications/MAMP/bin/php5/lib/php’) in /Applications/MAMP/htdocs/forum/bb-config.php on line 34

    On the regular part of the forum, I do not get these errors.


    chrishajer
    Participant

    @chrishajer

    Is the wp-config.php actually located at ../ ?

    Also, you could try the absolute path rather than a relative one. I have heard before that that might be a problem (although I’ve never seen that. I don’t use MAMP though.)

    First verify if the wp-config.php is located ../ from bb-config.php. If it is, try the full absolute path rather than a relative one. Something like /Applications/MAMP/htdocs/wp-config.php.


    nekita
    Member

    @nekita

    In my case, yes, the relative path works just fine, given that I have access to my WP scheme files after I utilize it.

    However, I just found out that adding:

    if (file_exists(‘../wp-blog-header.php’))

    require_once(‘../wp-blog-header.php’);

    instead of just

    require_once(‘../wp-blog-header.php’);

    does the trick, at least to get access to the admin area.

    I’m still stuck with the limitation of my admin account though. Once it’s integrated and I log on the bbP, I can’t write a post nor reply or edit my own profile because the admin user receives the status “Inactive”.


    nekita
    Member

    @nekita

    To give you an idea of what I’m talking about:

    http://chocolatebydeath.com/forum/

    User: Rauko

    PW: IIlCuxOmYRpn

    This is a test user I just registered. Once you log in with this data, you’ll see that this account is extremely restricted for whatever reason. It’s the same with my own admin account and other user accounts.


    chrishajer
    Participant

    @chrishajer

    Nekita – the reason that works is because it’s not including the wp-blog-header.php (can’t find it), but it doesn’t error out because you’re saying “if it’s there, then include it”: otherwise, just continue on, but it’s not included.

    So, it errors out when you don’t have the conditional, but with the conditional there, do you have access to WordPress functions, or you can just access specific theme files? Accessing the theme files would not require integration. But using the functions like get_header, get_sidebar, get_footer would all rely on integration being correct.

    This assumes that the errors are the same as doyle640:

    PHP Fatal error: require_once() [function.require]:

    Failed opening required '../wp-config.php'


    nekita
    Member

    @nekita

    I’m using the functions get_header and get_footer in my front-page.php etc. and it’s working just fine as you can see on my site.


    chrishajer
    Participant

    @chrishajer

    Hmm – that makes no sense to me. What is the exact error you get if you do not include the if (file_exists statement?


    nekita
    Member

    @nekita

    Chris,

    thanks for your reply. You are right, there’s not much general sense in that problem to begin with.

    Unfortunately the issue already starts with the use of a relative vs. an absolute path because the absolute variant isn’t even recognized. The only two options available seem to be either the relative take with

    require_once(‘../wp-blog-header.php’);

    or something that could be called absolute, but is pretty inconvenient to use:

    define(‘WPPATH’, dirname(dirname(__FILE__)) . ‘/’);

    require_once(WPPATH . ‘wp-blog-header.php’);

    Both of these result in the availability of WP commands like get_header etc. which would be needed to visually integrate bbP with WP, but with the major problem that all my accounts in bbP are Inactive for some weird reason.

    Every other attempt where the path to wp-blog-header.php would really be false would just result in the forum link to not work any longer. Therefore it does seem much more likely that different elements of bbP are more or less able to deal with this way of WP integration or access to that file. I would love to give you more detailed error information about the 500 error but I’m not sure where to aquire it.

    Furthermore, that problem with Inactive accounts doesn’t seem to be entirely new. I did some research via google and it does pop up every now and then, here’s an example even from way back in 2006: http://comox.textdrive.com/pipermail/bbdev/2006-September/000719.html

    > > > There is an issue with posting:
    > > > bbpress shows the users (admin) as Inactive. This lets me login, but
    > > > I cannot post since the post form is hidden.
    > >
    > > You must have integrated an old bbPress install with WP (that is, you
    > > must have run the bbPress install script before integrating the
    > > two). If that's the case, none of your bbPress users exist anymore
    > > (they're not defined in WP's user table), and your admin account is
    > > inactive. To fix your admin account, you'll have to change the usermeta
    > >
    > > bb_capabilities = a:1:{s:8:"inactive";b:1;}
    > >
    > > to
    > >
    > > bb_capabilities = a:1:{s:9:"keymaster";b:1;}
    > >
    > > for your admin account. (Where 'bb_' is your $bb_table_prefix.)

    Unfortunately the usermeta in my database is already set as a:1:{s:9:”keymaster”;b:1;}, but it’s still acting as if users are inactive.

    It really is pretty tiresome and after many many database restores and bbP reinstalls I come to the conclusion that integration of WP Functions is somewhat poorly treated so far.

    For now my best bet seems to be to either try and replicate my WP scheme within bbP which would take a lot of double work and maintenance when I apply changes to my blog or go with a different forum solution altogether. : /


    doyle640
    Member

    @doyle640

    The absolute path works completely, I don’t understand why, but it does.

    Thank you so much.


    doyle640
    Member

    @doyle640

    By the way, i am also having the problem with the some of the forms, like the reply forms, disappearing. No html is posted whatsoever. I haven’t looked into it thoroughly yet though.


    nekita
    Member

    @nekita

    The essence of this is that it screws with the usermeta data in the database once you try and integrate WP functions, up to a point where even your admin account for WP doesn’t work anymore.

    Here’s an example:

    Variant1:

    1. Upload bbP to the Server

    2. Change the bb-config.php including the require_once line

    3. Run the Installer

    4. After Installation is finished you can’t log on to your WP admin anymore because the admin user suddenly has insufficient access rights, requiring a database restore.

    Variant 2:

    1. Upload bbP to the Server

    2. Change the bb-config.php excluding the require_once line

    3. Run the Installer

    4. Add the require_once line after installation is finished

    5. Your WP admin account is still working as it should and you can even use it for bbP, but with the Inactive user status.

    Doesn’t make much sense, does it?


    Sam Bauers
    Participant

    @sambauers

    @Nekita

    Don’t modify your bb-config file until after you have installed bbPress.

    Even then I can’t guarantee it will work with Trunk as it isn’t tested for deep integration yet.


    nekita
    Member

    @nekita

    Hello Sam,

    yes I thought as much, but I had a database backup ready so it’s all good.

    So is it safe to assume that one is better adviced to wait with deeper integration until 1.0 or a stable beta is released?

    Thanks

    Lars

Viewing 25 replies - 76 through 100 (of 191 total)
  • The topic ‘WordPress + bbPress Integration 101’ is closed to new replies.
Skip to toolbar