Want to know when there are new posts?

SUBSCRIBE VIA EMAIL

SUBSCRIBE VIA RSS

Jul 29th

Some bbPress Issues I faced

Topics: All Things bbPress

When I first started installing bbPress for a client, here are some issues that I faced. I’m giving you the solutions so you don’t have to go thru the entire process of searching for an answer.

  1. What is the link to the theme directory?
    In Wordpress if you need to link to the theme directory you just use the tag:
    bloginfo(template_directory)

    For the moment there is no such option in bbPress. The basic documentation does not provide this very essential piece of information. After much research this is what I found:

    <?php bb_option('uri'); ?>my-templates/your-template-directory-name

  2. If you want to add a menu for registered users which includes a link to their profile, edit profile, favorites, etc, you will find it a bit tricky. This is the code which displays the menu on the profile page.

    <?php if ( is_bb_profile() ) profile_menu(); ?></p>

    If you try placing profile_menu(); outside of this page, it gives an error.

    I assumed there had to be direct links that can be placed anywhere for Profile, Edit Profile and Favorites. I was right. Here is the code you can add to your logged-in.php file so these links appear only when a user is logged in:

    For Profile Link:

    <?php printf(bb_get_profile_link(Profile, bb_get_current_user_info( 'name' )));?>

    For Edit Profile

    <?php echo '<a href="'.get_profile_tab_link( bb_get_current_user_info( 'id' ), "edit" ).'">Edit Profile</a>' ?>

    For Favorites

    <?php echo '<a href="'.get_profile_tab_link(bb_get_current_user_info( 'id' ), "favorites" ).'">Favorites</a>' ?>

    This function can then be called using:

    <?php login_form(); ?>

    This displays the file login-form.php if your user is not logged in. And logged-in.php with the links you just added if they are.

  3. Wordpres integration is very simple. You just follow the steps in the installation and fill in the right information. There are two important fields you need to enter in order for integration to go smoothly.

    One is a secret key found in your wp-config.php file. This is defined as:

    define('SECRET_KEY', 'YOUR-KEY-HERE'); // Change this to a unique phrase.

    YOUR-KEY-HERE needs to added as is.

    The second part is a Secret field which can be found in your Wordpress admin. You will get the direct link on the instalation page.

    Now guess what I did? I mixed up the two.

    It was easy to change the first one via bb-config.php as it was defined the same way it was in wp-config.

    Now how to change the Secret field to the correct one? There is a section under Settings in the bbPress admin called Wordpress Integration. You can make changes here. However, lady luck was not favoring me. It just wouldn’t update the field and kept logging me out. And the integration could not work until I updated the field. I was caught in a vicious cycle.

    Anyway turns out you can also update your Secret field by adding a line to bb-config.php. The value is then picked up from here. Of course you need to remove it once the value has updated as it is not very secure having both parts of the key in your config file.

    So just in case you have a problem updating your Secret field, here is the code to add to bb-config.php

    $bb->secret="VALUE-HERE";

The script itself is pretty good! It is the lack of documentation which can be problematic. I hope they come up with something as good as the Wordpress codex pretty soon.

Tags: , ,



RSS Feeds

Sales Letter Graphics

Turn Ordinary Sales Letters Into The Extraordinary!

You'll Save A Ton Of Time And Money, Plus Explode Your Sales With The Sales Letter Graphics Pack! Find Out More

Related Posts

3 Responses to “Some bbPress Issues I faced”


  1. For problem number 1, use bb_active_theme_uri() and bb_get_active_theme_uri()

  2. Thanks!! Really needed that bit of info.

  3. tmaster says:

    Reply

    Come up with a way to take the tags and insert them into a keywords meta string for google to read?

What Do You Think?

Enter your name as YourName@YourKeywords and YourKeywords will be used as the anchor link to your website. Psst this gives you Page Rank advantage.

  1. (required)
  2. (required)
  3. (required)

Comment Preview:

Just in case you wanna see.

You can also subscribe to comments via RSS Comments RSS