What you’re trying to do should be done in bbPress’ config.php file, but you’re really close ![:) :)](smileys/smile.gif)
Put your index.php back the way it was. In bbPress’ config.php file, put the following two lines right after the <?php
line.
require_once('/path/to/wp-blog-header.php');
define('WP_BB', true);
It seems you’ve found the correct path to use in you system: /home/myusername/public_html/blog/wp-blog-header.php
So it should now look like:
<?php
require_once('/home/myusername/public_html/blog/wp-blog-header.php');
define('WP_BB', true);
Then, copy your bb-templates/
directory to my-templates/
this is so you can modify the template files without editing the original ones; bbPress will use the files in that directory automatically instead of the original ones.
In my-templates/front-page.php
(and any of your other template iles), you can now call any WordPress template function, even get_header()
.
You should be able to use any bbPress functions you like in WordPress as long as you
require_once('path/to/bbpress/config.php');
When u load wordpress function inside bbpress. U already integrate both design point and database point. You only need to add WP template tags inside bbpress template.
Nope. Here is my index.php file from the bbpress directory. What am I doing wrong?
‘<?php
require(‘./bb-load.php’);
//the next two lines are my attempts to load it myself
require_once(‘/home/myusername/public_html/blog/wp-config.php/’);
require_once(‘/home/myusername/public_html/blog/wp-blog-header.php’);
$bb_db_override = false;
do_action( ‘bb_index.php_pre_db’, ” );
if ( isset($_GET) && ‘1’ == $_GET ) :
$forums = false;
elseif ( !$bb_db_override ) :
$forums = get_forums(); // Comment to hide forums
$topics = get_latest_topics();
$super_stickies = get_sticky_topics();
endif;
do_action( ‘bb_index.php’, ” );
if (file_exists( BBPATH . ‘my-templates/front-page.php’ ))
require( BBPATH . ‘my-templates/front-page.php’ );
else require( BBPATH . ‘bb-templates/front-page.php’ );
//then i tried the include header call to no avail so i tried this
<?php include (/home/myusername/public_html/blog . ‘/wp-blog-header.php’); ?>
?>
‘
I am going to try this, thanks to the page you referenced above.
<?php include (TEMPLATEPATH . ‘/header2.php’); ?>
Ok, now I am beginning to understand. I assume from looking around that I need to add that code (such as ‘<?php get_header(); ?>’) into the bbpress/index.php file.
Naturally bbpress won’t know to look in the /blog/ folder (bbpress is in the /blog/bbpress/ folder) so how do I set the path?
Would that be another require( etc code?
Thanks for all the help, I am learning so much!
The only way available right now is to load wordpress into bbpress. I like to load some bbpress function into wordpress.
Anyone know how to do it?
I’ve modified my Google Analytics Plugin for WordPress and it appears to be working in BBPress (albeit without the UI for configuring the “uastring”).
Testers welcome; get it here…
Found my solution here….
https://bbpress.org/forums/topic/17?replies=26
Thanks astereo:
Solved my problem. It was coming from
#
$bb->wp_table_prefix = false; // ‘wp_’; // WordPress table prefix.
#
$bb->wp_home = false; // WordPress – Options->General: Blog address (URL) // No trailing slash
#
$bb->wp_siteurl = false; // WordPress – Options->General: WordPress address (URL) // No trailing slash
I had set the urls only to domain.com/directory, when I added the http and www it worked fine.
I’m digging the idea of bb inside wordpress. thanks
installed bb following integration with wordpress. installed fine. however, none of my logins work for bbpress. if i try to write a post, i’m asked to login. i do so, and the login doesn’t allow me to post or comment on threads. nor can i get into the admin area.
i know the login is correct because when i use a false login, i get an error message – which doesn’t happen when i use the correct login. all that happens when i login with the correct info is i end up being told i need to login again. it’s as though i’m stuck in some loop.
not sure what to do next. any help?
cmcraft, you need to call WordPress’ template functions yourself. bbPress doesn’t do that for you.
Integrated WordPress with bbPress. I’ve added the integration plugins. But can’t get logins to work in bbPress.
I pre-registered a few new users in WordPress. Can login fine in WP. But I can’t even seem to login as admin in bbPress even to write/comment on a post – regardless of admin or other users. Can see an admin screen, but not allowed to do anything there without login – which I can’t do.
No error message comes up. I login, checks the database and returns to the screen. Doesn’t matter which login link I’m using in bbPress, I can’t create/edit a thread, nor can I gain admin access.
Any ideas?
I’m interested in this too… but I understand it might sound a bit odd to some people, depending on how they use WP.
A little more detail…
I’ve installed bbPress in a folder inside WordPress (I want to integrate them). I’ve followed the instructions for integration. I think everything’s right – but, obviously not if it’s not working.
I love WordPress and was stoked to hear about bbPress. So any help getting this started would be greatly appreciated.
Ok so I got it to work without error, but it still does not load my blog site on top of the forum. Maybe I misunderstood, I need more than just username and password integration. I need it to show my blog.
Perhaps this should go in the plugins forum but something I’m instantly realizing is that not everybody tags things the same, and so not everybody finds the same documents when using the tags.
It would be nice to have the capability to have tag synonyms (so for a very simple example) if someone adds a “WP” tag, then future readers would also see the article when looking for “WordPress”.
This could be achieved at a number of points (a) by adding an extra tag when the post is written, or (b) replacing the “WP” tag with “wordpress”, or (c) when a user searches for a tag.
It strikes me that “a” is best options because with there is a better chance that search engines will find the post.
Hey, I was checking out this board so I could suggest this very idea.
I have some easy style postings on my blog with over 100 comments… that makes for one very long page.
I would love to see a feature that takes WP postings up to the <! –more–> tag and automatically generates a BBpress posting that is tied into the blog comment system.
what would be nice to is to be able to add BB tags in your wp post page.
i’m using
require_once(‘/absalout/path/’)
I tried that and it threw back a serious error. I might be a noob, but is there more defining that needs to be done? Inserting the code towards the bottom didn’t work. My installation works ok, but it doesn’t load wordpress at all, and if I uncomment the wp_bb line, it errors up as well.
Help!
Has anyone considered what might be required to migrate existing WordPress comments into BBPress?
I’m imagining a script that would examine the comments DB, move comments storing them in an article-specific topic (which might be easier if themes could be nested, like categories), tagging them with their previous article’s categories.
One nicety: perhaps each former comment URL could be added to htaccess, redirecting to it’s new location.