Skip to:
Content
Pages
Categories
Search
Top
Bottom

*seamless* wordpress integration

  • Hiya all,

    My question is this. How do I integrate bbpress into wordpress so that it all looks like the same site? Eg. Just like here on bbpress.org there is a “Forums” tab and the forum is opened seemlessly into wp like any other page (but without all the sidebars).

    Thanks!

    fab

    p.s. I need to do the same trick to zenphoto gallery. Would it also work?

Viewing 25 replies - 26 through 50 (of 68 total)
  • Also, is it possible to have a “forum” header? a header that would go beneth the wordpress header, but only appear on forum pages?

    Thanks!

    -Baldwin

    If you have the same code for the header then I think you need some conditional if statements in there to check if it’s wp or bb. This isn’t really straightfoward I’m afraid, but then I’m in the dark here (haven’t done it myself) so perhaps it is and I don’t know about it.


    Vili
    Participant

    @vilimaunula

    My header title tag reads like follows, I think you can modify it to fit your setup:

    <title>
    <?php if ($forumpage == TRUE) {
    bb_title();
    echo " :.: AKNI";
    } else { ?>
    <?php wp_title(' '); ?>
    <?php if(wp_title(' ', false)) { echo ' :.: '; } else { echo "AKNI: "; } ?>
    Akira Kurosawa News and Information
    <?php if (is_utwtag()) { echo ': '; UTW_ShowCurrentTagSet('tagsettextonly'); } ?>
    <? } ?>
    </title>

    The last condition with UTWTAG is for the Ultimate Tag Warrior plugin — remove it if you don’t use it.

    To see how the title works across the site, I think it’s easiest if you just visit http://akirakurosawa.info/

    AHHH

    I’ve copied what you have above, and modified it slightly (to match my site), but I am not getting updated titles on topic pages like:

    http://ppacp.org/forums/topic.php?id=1&page&replies=1

    I’m assuming this has something to do with the templete files for bbpress, so I looked at the top of the files and it looks like this:

    <?php get_header(); ?>

    <?php global $forumpage;
    $forumpage = TRUE; ?>

    I changed all the files that had <?php bb_get_header(); ?> from the “kakumei” folder.

    Am I doing something wrong?

    “confused”

    -Baldwin


    Vili
    Participant

    @vilimaunula

    <?php get_header(); ?>
    <?php global $forumpage;
    $forumpage = TRUE; ?>

    …should be the other way around:

    <?php global $forumpage;
    $forumpage = TRUE; ?>
    <?php get_header(); ?>

    You need to set the $forumpage boolean before you call the header, or you won’t be able to use it there.

    Alternatively, forget about $forumpage, and use a global boolean such as $bbdb that bbPress uses anyway, as suggested by fel64.

    I changed all of the tops to:

    <?php global $forumpage;

    $forumpage = TRUE; ?>

    <?php get_header(); ?>

    but, I am still not getting any changes to the title.

    hmm, what else could be wrong?

    -Baldwin

    Has anyone else been able to get the titles to work?

    Thanks!

    -Baldwin

    ok i got my header/footer running smoothly, was anyone aware that bbpress get header is written as get_head is this the same ?

    oh yea and I was curious, now that the bb pulls in the header/footer of wp it knocks out the style for the forums, whats the recommended next step ?

    include the kakumei stylesheet in your template header, or copy the kakumei styles and put them into the stylesheet for your wordpress theme.

    won’t that mess up your wordpress theme ?

    It’s a stylesheet, it will not interfere with the styles in your WP theme unless there are name collisions between the class/id’s.


    airdrawndagger
    Member

    @airdrawndagger

    I tried just copy-pasting my kakumei css to my wordpress css and while the structure of bbpress got back to normal with some minor quirks, it majorly disrupted my header and footer and with it my wordpress as well. How would I work around this, any other way then going through the stylesheets and changing everything so nothing’s colliding? I feel that’s A LOT of work.

    http://www.doublepeace.se/forum


    airdrawndagger
    Member

    @airdrawndagger

    Ok, so answered my own question in the last post. Just had to go through everything step by step and see what collides and adjust accordingly. No, however, I need help with something else regarding this! I need to add a link to my forum profile edit to my loginanywhere script. It works at the bbpress site but then I switch over to the blog and it says profile_tab_link is an undefined function. Maybe there’s even another way to link to the profile edit? Please help!


    airdrawndagger
    Member

    @airdrawndagger

    Ok, solved that as well :D

    Now, for my next problem. What do I type so it knows when I’m browsing a forum page? If you look at my site I have highlighted tabs for my different sections. I need the forum tab to be highlighted while in the forum and for the start tab not to be! I use is_home for the start tab

    http://www.doublepeace.se/forum

    Please help!

    So, if you now go through the template files for your bbPress installation, you will need to replace all instances of “<?php bb_get_header(); ?>” with the WordPress command “<?php get_header(); ?>“. The same thing goes for the footers, so you change all instances of “<?php bb_get_footer(); ?>” to “<?php get_footer(); ?>“.

    I used a simpler method to achieve the same result. Rather than going through and changing every call to bb_get_header() and bb_get_footer() I simply created a custom header.php and footer.php file.

    Then in the header I have only:

    <?php get_header(); ?>

    In the footer I have only:

    <?php get_footer(); ?>

    The benefit of this is you only need 2 custom files, you don’t need to search and replace all instances, and if you need to setup global vars for the more advanced WordPress integration techniques you only have to add them once into your custom header.php.


    Vili
    Participant

    @vilimaunula

    kenzor — That would indeed work the same way and be far easier to do. It remains a mystery to me why I didn’t do it that way to begin with. I must have lost my +5 Blessed Boots of Intelligence at some point.

    Thanks for this tutorials guys, it really helps.

    One more thing is not straightforward to me, how to integrate the forum Titles. I tried it like it was written here but it didn’t work out.

    You can see my integration on http://www.tasty.sk/forum

    There is a really good tutorial to integrate the WP + BBP seamlessly here.

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

    It worked great for me and includes a Theme for BBP that integrates all WP functions into BBP and keeps the header and footer in tact… the only problem is that the BBP CSS is totally lost.. I am currently trying to create a Master CSS file that integrates the kakumei CSS in my WP CSS.. but my CSS skills are not exactly up to date… Ill keep you posted on how it goes…

    After talking with the author of the tutorial I am going to create a separate CSS file that I can import into my WP CSS.. I think this is better because then it can be used as a starting point for others using the Themepress BBP Theme.. I think this should be integrated into the next release of Themepress..

    I am thouroughly confused on how to do this. Where the heck would I actually start? I don’t want to integrate the the databases/cookies/etc., I just want to apply the same look of my header and footer at http://www.atriskstoriesofhope.com/ with http://www.atriskstoriesofhope.com/bbpress&#8230;


    775251
    Inactive

    vilimaunula – your site akirakurosawa.info is an quite impressive integration of WP and BBPress. I’m wondering how you managed to integrate your forum and wordpress loops into one, as presented on this page: http://akirakurosawa.info/forums/. You are showing a single chronological list of recent posts and comments across both your WP blog and BBPress forum. Would you mind sharing how you did this? I’m very new to PHP so would not be able to tweak things easily to make this happen.

    Thanks!


    Vili
    Participant

    @vilimaunula

    deliciousbass:

    The “latest discussions” list at http://akirakurosawa.info/forums/ is compiled without the use of WordPress or bbPress loops. Instead, it makes use of two direct hand-crafted MySQL queries to the database, one to the WordPress tables and the other to the bbPress ones.

    Basically, both queries search for all the posts (or comments, in the case of WordPress) written in the past month, then put these posts into various arrays. The arrays are then sorted so that the items are in a reversed chronological order, and finally the resulting list is displayed on the page with only the latest post/comment from each thread/blogpost/page included.

    In case it is any help, here is the code that I use — I wouldn’t suggest just copy-pasting it to your site though before reading it through and knowing what you are doing. You may at least need to change the table names. I have added comments to give some idea what is done where.

    See the code here

    There most probably is a simpler way to do this, the php code could be streamlined, made more error-resistant, and it could possibly also be done with WordPress/bbPress tags, or it could be turned into a plugin, if someone has the time and the energy.


    775251
    Inactive

    vilimaunula – thanks for the help. i’m going to try to digest what you’ve done – this is way more complicated that what i’ve done in the past. but i’ll check it out and will let you know how it goes!


    bruinfelix
    Member

    @bruinfelix

Viewing 25 replies - 26 through 50 (of 68 total)
  • You must be logged in to reply to this topic.
Skip to toolbar