Skip to:
Content
Pages
Categories
Search
Top
Bottom

Integrate WP Twentyten and bbPress Kakumei


  • wblogan
    Member

    @wblogan

    I’m running WP 3.01 using the Twentyten theme and have successfully integrated bbPress with WP so that everything works but the theme (and the need to log out of WP or bb to administer the other – which my research indicates is “normal” at this time).

    I’ve followed several tutorials in order to get bbPress integrated into the WP Twentyten theme but with no luck. I can get the header and footer to display properly, but I can’t figure out out to get the Twentyten sidebar to display properly. I’m sure it’s something simple, or simply can’t be done. I’m not exactly a newbie to all of this, but have clearly reached my limit.

    Does anyone know of a tutorial, or can anyone give me some guidance on this? TIA

Viewing 16 replies - 1 through 16 (of 16 total)

  • Ashfame
    Participant

    @ashfame

    I wrote this sometime back. http://www.wpwebhost.com/make-bbpress-theme-match-with-wordpress-by-deep-integration/

    Twentyten shouldn’t be difficult to follow up with.


    wblogan
    Member

    @wblogan

    Your’s is one of the tutorials I followed, Ashfame. It helped me a great deal and I’m grateful to you for it. However, the following code broke my site:

    /* Deep integration */

    if ( !defined('ABSPATH') & !defined('XMLRPC_REQUEST'))

    {

    define('WP_USE_THEMES', false);

    include_once(dirname(__FILE__) . '/../wp-blog-header.php' );

    header("HTTP/1.1 200 OK");

    header("Status: 200 All rosy");

    }

    I started replacing the bb_get tags as you recommended in front-page.php. As I said, I could not get the get_sidebar to work.

    Also, I moved ahead with your instructions regarding the style sheets, and then on to editing the twentyten them header.php to insert the link to the bbpress theme and couldn’t figure out where to put the link – it broke my wordpress.

    What am I missing?


    wblogan
    Member

    @wblogan

    Perhaps I should have included this info in my last reply. This is the error I get when using the code you recommended in bb-config.php:

    Parse error: syntax error, unexpected ‘;’ in /myfullpath/public_html/bbpress/bb-config.php on line 15

    Line 15: if ( !defined('ABSPATH') & !defined('XMLRPC_REQUEST'))

    FWIW, I learned from another tutorial that I needed to put this code at the end of the bb-config.php file:

    require_once( '/myfullpath/public_html/wp-load.php');

    I found that the integration will not work without it.


    Ashfame
    Participant

    @ashfame

    I haven’t played with twentyten code yet so can’t say if that will be easy for you to follow up. I am in my bed right now, typing this on my mobile.↲You do one thing, get back to me tomorrow & I will tell you. I am quite busy with my schedule so if I don’t come back on my own, hit me an email > ashishsainiashfameatgmaildotcom↲


    wblogan
    Member

    @wblogan

    Will do. Thanks! Sweet dreams. :)


    wblogan
    Member

    @wblogan

    I’ve gotten this to work this way so far:

    Put this line in bb-config.php

    require_once( '/your/full/path/wp-load.php');

    In the files listed below, replace

    <?php bb_get_header(); ?> with

    <?php get_header(); ?><div id="container">
    <div id="content" role="main">
    <?php if ( !in_array( bb_get_location(), array( 'login-page', 'register-page' ) ) ) login_form(); ?>

    and <?php bb_get_footer(); ?> with

    </div>
    </div>
    <?php get_footer(); ?>

    404.php

    edit-post.php

    favorites.php

    forum.php

    front-page.php

    login.php

    password-reset.php

    profile-base.php

    profile-edit.php

    profile.php

    register.php

    register-success.php

    search.php

    stats.php

    tag-single.php

    tags.php

    topic.php

    I use Twentyten with one right sidebar. I decided I didn’t want it in the bbPress section of the site. If you want it, replace the footer code above with this:

    </div>
    <?php get_sidebar(); ?><div id="primary" class="widget-area" role="complimentary">
    </div><?php get_footer(); ?>

    I want bbPress to fill the width of the “container”. I can the following in-line style in each page (<div id=”content” role=”main” style=”width: 95%; font-size: 1.2em;”>`), but I’m sure I can use the style sheet to define a class or something and do it right – that is once I get Twentyten to read the bbPress style sheet.

    I’d also like to rearrange the objects on the page, which I may also work on once I can use the style sheet.

    May not like it when I’m done, but it’s been a learning experience!


    Ashfame
    Participant

    @ashfame

    Looks like you got it done. Post a link to your forums. You need a little bit of CSS to fix that.


    wblogan
    Member

    @wblogan

    Well, I don’t quite have it done. I can’t figure out why your code breaks the site as I mentioned earlier. Do I need it? (I forgot to mention that your code calls wp-blog-header.php, and another tutorial I referenced calls wp-load.php. I know that requiring wp-load.php is a requirement; but what about wp-blog-header.php?)

    Also, I don’t know how to link the style sheet to bbPress because I can’t figure out how to get the link in the header. I don’t understand header.php in Twentyten. Can you help me with that?

    I’ll post a link when I get it published, but I’m doing all of this on a local mirror of my public site.


    Ashfame
    Participant

    @ashfame

    Instead of loading WordPress from wp-load.php, load it from wp-blog-header.php.

    I checked the header.php file of Twentyten and there is nothing in it that would stop you from making changes. Follow the tutorial and you will be fine.

    This is the line before which you should add the link to bb-style.css

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

    Rest is in the tutorial.


    wblogan
    Member

    @wblogan

    The “deep integration” code still breaks my site, but the link to the style sheet in header.php wasn’t working because I had bb-styles.php in the wrong place.

    Also I’m loading WordPress from wp-blog-header.php instead of wp-load.php.

    The only thing that remains is to figure out how to make changes to the bbPress pages without making changes to the whole site since it’s calling two style sheets. I’ve spent no small amount of time with “inspect element” and “firebug” in Google Chrome trying to find the styles I want to change on the bbPress pages. You could tell me in short order I’m sure how to make the changes I want. But as I said, I wanted to get all of the kinks worked out before I go public with it.

    When I get it all figured out I’m thinking I’ll publish the info specific to integrating Twentyten and Kakumei (for those of us unambitious, ignorant folks who don’t have the where with all to do something original). I assume that you won’t mind me referencing your tutorial? No need to reinvent the wheel!

    Thanks again for your tutorial, your interest and your help!


    Ashfame
    Participant

    @ashfame

    Make changes in your bb-styles.css itself and if it conflicts with any of the WP side elements then rename them and then do it.

    There is no need of specific theme integrating tutorial, it can be done exactly by following my tutorial. If that didn’t help, yours won’t too. It requires some techhow to deal with that. It wasn’t for end users anyway.


    wblogan
    Member

    @wblogan

    In the end we’re all “end users”. It all depends on where you start and where you want to finish. As good as it is and as grateful as I am for it, your tutorial did not tell me exactly what I needed to know in a way that I could understand so that bbPress and WordPress worked in my situation. If it had I would not have come here. We’re all getting and giving “techhow” with some end in view.

    This is a good place and time to give my thanks to the developers of WordPress and bbPress! I’m really amazed at their “techhow” and grateful for their willingness to share it.

    By the way, I found the tutorial at wpbbpthemes very helpful as well. (I actually started with it.) Thanks to the author!


    Ashfame
    Participant

    @ashfame

    You didn’t have a clue what I was talking about. Leave it. Have fun on your ride.


    wblogan
    Member

    @wblogan

    I’ve documented how I got the theme integration to work for me. My thanks again to those here and elsewhere who helped. Twentyten and Kakumei Theme Integration

    @wblogan – So are you actually running the integration on one theme now?. What issues did it create for you to have two different themes?.

    I am using the default WordPress and Kakumei themes at the moment. It seemed that bbPress was very sluggish, so I activated the default theme in order to check the load on the server and found that it was significantly less with the default theme than with the integrated theme. In my case it’s a personal call in favor of performance. This is a well known trade off about which there is plenty of information available.

    Having an integrated and non-integrated theme created no issues of which I am aware. Unless I am forgetting something the only change to the WordPress theme was the call to the bbPress style sheet in header.php. All other changes are made to the bbPress theme. So either remove, comment out, or leave the call – I don’t think it hurts performance. I commented it out so that I can do some testing. I may be wrong about something here, but it’s all working for me at the moment.

Viewing 16 replies - 1 through 16 (of 16 total)

You must be logged in to reply to this topic.