Skip to:
Content
Pages
Categories
Search
Top
Bottom

The buddybar is showing on the forums page onfthis site; how do we do it?

  • Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    I would like to add the Buddybar onto my bbPress forums page. They are already integrated and work fine.

    But I cannot figure out how to add the Buddybar so that it shows up on my forums pages.

    I have checked the threads on this, but have yet to find what appears to be a final solution.

    Thanks!

Viewing 25 replies - 1 through 25 (of 44 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Have you included this code in your bbpress header.php theme?

    <div id="search-login-bar">
    <?php bp_search_form() ?>
    <?php bp_login_bar() ?>

    <div class="clear"></div>
    </div>

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    When I added that code, I received this error message:

    Fatal error: Call to undefined function bp_search_form() in mysite/forums/bb-templates/bbpress-forum/header.php on line 59

    It looks like bbPress is not finding the Buddypress stuff

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    Does anyone know how to get the buddybar included?

    Check if you have funtions.php in your theme

    http://buddypress.org/forums/topic.php?id=2606

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @Renzokuomo

    I’m not sure what you mean. I followed the link and it was a topic with only one entry and didn’t really have an answer.

    I’m looking to add the bp-admin-bar the bbPress, so I need something that will cause bbpress to recognize buddypress so I can get the bar to show up. I have the php code; the problem is getting it to show.

    I appreciate your help, though.

    Im working on three bbpress themes for original buddypress theme. Sorry my english suck!

    Maybe you know how to fix my theme. The adminbar in my theme is showing but only a grey rectangle. So, these link just it\’s a example of my progress. But i\’m not programmer ;) only entusiast!

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Jfcarter-

    Have you resolved this issues yet? Obviously Andy has this working as you would like.

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    Make sure you have deep-integration set up inside your bbPress. Basically make sure WP is loaded.

    You’ll need to add a call to the wp-footer action so the BuddyBar is loaded:

    <?php wp_footer() ?>

    Add that before the closing HTML tag in your bbPress template footer and the bar should show up.

    You’ll also need to add a wp_head() call to inside the header of your template too, so that the CSS works:

    <?php wp_head() ?>

    Avatar of Kunal17
    Kunal17
    Participant

    @kunal17

    That seems relatively easy. Ill try it once I complete customizations of other parts of my website. Would I use the same code in member blog templates to bring up the buddy bar there or would that not work? I use subdomains for member blogs.

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @Andy

    Thanks for this information. I do have integration between buddypress and bbPress, such that my users, group forums, and logins, work seamlessly between the two programs.

    I have not been able to understand what deep integration means in terms of WPMU + Buddypress + bbPress, and I’ve even gone over to the bbpress.org and mu.wordpress.org forums. Mostly because the program versions are all so different and the forums are often 1-2 years old that I can’t really gauge what procedures I should follow for WPMU 2.7.1, BP 1.0, bbP 1.0 alpha 6.

    If you could point me to a thread that discusses deep integration between these three versions (whatever is close enough), or a thread on how to load WPMU in bbPress, I would appreciate it. Then I can implement your instructions.

    Thanks!

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @Andy

    Okay, I finally found a thread that I think has the answer, so I am posting this just to check:

    Over at the bbPress forums, it was suggested to add the code below to the beginning of the bb-config.php file:

    if ( !defined( ‘ABSPATH’ ) ) {

    include_once( ‘/Full/Path/To/wp-load.php’ );

    }

    I have added that per the instructions and also included the suggested code in the footer of my template. Still not getting anything in terms of a buddybar, but did not see any errors.

    When I also added the header code in, I got this error:

    Fatal error: Call to undefined function wp_head() in mysite.com/forums/bb-templates/bbpress-forum/header.php

    Any ideas as to how to fix this?

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Jfcarter-

    Where did you place the call to wp_head()? It should be the last line before the closing head tag:

    ...
    <?php wp_head(); ?>
    </head>

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @Jeff

    I did put the call just before the close of the header and still got the fatal error above.

    Just to double check, is this correct code to load WPMU?

    [at the top of bb-config.php]

    if ( !defined( \’ABSPATH\’ ) ) {

    include_once( \’http://mysite.com/wp-load.php\’ );

    }

    Otherwise, I\’m not sure what else could be wrong.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    You’ll want to put this at the top of bb-config.php:

    if ( !defined('ABSPATH') &amp; !defined('XMLRPC_REQUEST')) {
    define('WP_USE_THEMES', false) ;
    include_once( '/your/absolute/path/to/domain/wp-blog-header.php' );
    header("HTTP/1.1 200 OK");
    header("Status: 200 All rosy") ;
    }

    The &amp; should be just the &

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @JJJ

    I’m still getting this error, even with the revised syntax/language.

    Fatal error: Call to undefined function wp_head() in mysite.com/forums/bb-templates/bbpress-forum/header.php

    Not sure what else could be going on. I have the basic integration, in terms of cookies, users, and forums.

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Sounds to me like you’re not including the file correctly. If you were, the function would exist.

    Basic integration has very little to do with what you’re trying to do. They are unrelated in most ways. Basic integration just allows cookies to match up, so that you have a unified login scenario, where you can login and out freely from either side of WP or BBP.

    Deep integration involves loading bbPress inside WordPress, and WordPress inside bbPress, so that all functions and data are available to both sides at any point.

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    Thanks for clarifying this, JJJ. I am hoping to setup the “deep integration” you discussed.

    I’m not exactly sure what you mean by including the file correctly. Which file do you mean?

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I’m not exactly sure what you mean by including the file correctly. Which file do you mean?

    include_once( '/your/absolute/path/to/domain/wp-blog-header.php' );

    ^—Did you change the path to be your ABSOLUTE path to that file? Not the URL to the file, but the absolute path.

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    Jfcarter: you should be able to enable deep integration by adding this to the very top of your bb-config.php file:

    require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php' );

    Assuming WordPress is installed in the root.

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @JJJ – you were correct; I wasn’t using the absolute path – I tried your code and got no errors. Many thanks.

    @Andy – Thanks for your help also; I tried your code and am no longer getting the error messages.

    The challenge: still no buddybar.

    Right now I’m using Andy’s code at the top of the bb-config.php. I have the call files in header and footer of the template. It’s just not showing.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Jfcarter-

    You do have the calls to the buddybar as I outlined in the second post in this thread, correct?

    Are you using a customized bbPress theme? If so, switch to the default bbP theme, add in the necessary code as detailed in this thread, and see what happens.

    Avatar of Jfcarter
    jfcarter
    Participant

    @jfcarter

    @Jeff

    Thanks. I had forgotten to add back the div stuff you suggested. After including it, I now have a blank area where the buddy bar should be and it includes part of the login bar (which I added to the buddy bar).

    The rest of the buddybar menus are not showing.

    But this is major progress.

    Thanks to you and Andy and JJJ

    Avatar of Nicola Greco
    nicolagreco
    Participant

    @nicolagreco

    @jfcarter, try adding do_action(‘wp’)

    it works for me

    Avatar of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Andy,

    The code that I recommended go in bb-config.php actually does what you’re doing here on bp.org, plus it avoids an XMLRPC conflict, plus it bypasses the 404 errors that pop up when viewing the forum from inside WP, plus it loads WP/BP in the admin area by using the absolute path.

    Not sezzin’ it’s better, just sezzin’ is all… :)

    Avatar of Mattlay
    mattlay
    Participant

    @mattlay

    Reading down the thread I have become a bit confused as to what I need to edit and where. Perhaps a summary with all necessary code could be posted for the simple among us.

Viewing 25 replies - 1 through 25 (of 44 total)

You must be logged in to reply to this topic.