UPDATE: These steps are valid for previous version of BBPress. May not work with WP 2.6.X and BBpress Alpha.
With the redesign of my site I have taken the integration of wordpress and bbpress a step beyond theme integration. This time I wanted to reuse the plugins for wordpress and also have forums showup with wordpress. I received requests from many of you about how to do it. Also the previous post about the integration is sort outdated because of the consequent releases of bbpress.
For the purpose of this article I am assuming that the bbpress installed in a subdirectory of wordpress
File: bbpress/config.php
Add the following code to the top of config.php
define('WP_BB', true);
if ( !defined('DB_NAME') ) {
require_once( dirname(__FILE__) . '/../wp-config.php');
}
Define the following variables.
$bb->wp_table_prefix = 'wp__'; // your wordpress db prefix is
$bb->wp_home = 'http://www.yourwebsite.com';
$bb->wp_siteurl = 'http://www.yourwebsite.com';
File: wordpress/wp-config.php
In this file the last statement is which says
require_once(ABSPATH.'wp-settings.php');
After this statement (before the php closing tag – ?>) add the following statements
if ( !defined('BBDB_NAME') )
require_once(ABSPATH.'bbpress/bb-load.php');
replace bbpress with whatever the directory bbPress is in.
bbPress Plugin: Display Name
This plugin ensures that the name shown is the display name from the wordpress rather than the username.
Download, Upload and activate this plugin in bbPress.
bbPress Plugin: Wordpress Integration
This plugin ensures that your existing wordpress users can log into your bbPress install.
Download, Upload and activate this plugin in bbPress.
Wordpress Plugin: bbPress Integration
This plugin makes suer that the users created in wordpress have valid roles in bbpress.
Download, Upload and activate this plugin in wordpress. After activating this plugin, go to Plugins » bbPress and enter the bbPress database prefix and update.
Theme: Template Integration
Download this file and drop the created directory in your my-templates directory. All this theme does is takes that header and footer from the wordpress theme and uses it.
Note 1: You will still need to add some more css styling for the forum contents.
Note 2: This theme does assumes that the footer and header will bring in any sidebar that you need automatically. If thats not the case you will have to add get_sidebar(); wherever needed.
Enjoy the bliss
That should do it. Now all your plugins and functions in wordpress should work with bbPress and also all the functions in bbpress should work with wordpress. You can all any of the bbpress functions in the wordpress themes.
I think that bbconfig also needs settings to force the use of certain cookie names….
Also, folks using Ultimate tag Warrior should make sure they are using the latest version of UTW to ensure no function conflicts.
You don’t need that if the fourm is hosted in the subdirectory of the wordpress install. If its in a directory – yes that needs some fiddling around. That’s probably a sticking point in many installs. I’ll write about it soon enough I suppose :)
Thanks for the tip.
I think you are doing great work.. your tutorials are very easy to follow and a step in the right direction for BBpress and what users really want it to do… but I am wondering about the CSS part.. do I edit the one in the Themepress Directory or in the WP theme?? It also shoves my SIDEBAR to the bottom which I am also trying to figure out… Can you restrict the width of the embedded BBpress forum somewhere??
Take a look.. so far
WP http://www.djvibe.com/content/
BBP http://www.djvibe.com/content/forums
PS is there a way that we can make Themepress use the CSS for the WP theme??
Thx ;)
Thanks! I’m glad I could help
you edit the one in the wp theme.
to restrict the width of the forum just add the css for that in the wp theme css itself. if you want to keep them separate, just create a new css for forum and import it in the wp theme css.
Themepress does use the css in the wp theme.
I just upgraded to WP 2.3 and had to turn off integration between BB and WP. At the moment, one cannot require wp-config.php from bbpress/config.php – you get the white screen of death. Any ideas?
Actually i haven’t yet tested the tutorial on 2.3. I’m planning to do that soon and i’ll update the tutorial or post an update.
Putting
define(‘WP_BB’, true);
if ( !defined(‘DB_NAME’) ) {
require_once( dirname(__FILE__) . ‘/../wp-config.php’);
At the top of my config pages makes my forum page blank
thanks for the reply… Ill try that… Cheers!!
Can I worship you and call you goddess? You just made my life so much easier! Thank you for all your hard work and time! You are in my favorites forever.
you can worship me but you may not call me goddess! NO you may not!
you may call me god though.
that reminds me I should write about myself somewhere on my website! :)
My apologies, great one. :D I wanted to point out though that there is something about the Use Display Name plugin that is not allowing me to administrate my forums (add new or delete forums). I haven’t quite figured out what the conflict is yet but I’m looking into it.
Thanks Adi, yours is the only site that has a sensible, easy-to-follow tutorial on how to integrate bbPress with Wordpress. Cheers.
I’m glad it was helpful..
Just had a try.. think I am getting there.
I have an error message though
“Fatal error: Call to undefined function: get_header() in /home/xxxxxxx/public_html/forum/my-templates/ThemePress/front-page.php on line 1″
Will it change the design to the active WP theme?
This happens if you have not included in your bbpress/config.php
‘require_once( dirname(__FILE__) . ‘/../wp-config.php’);’
if you have wordpress anywhere other than parent of the bbpress directory then point to the wp-config.php using absolute path.
Great work and nice tutorial. I got it working but when I tried to post on my wpress I got the following error. Any idea ?
Warning: Missing argument 2 for bb_bozo_pre_post_status() in /home/robertd1/public_html/**/forum/bb-includes/bozo.php on line 173
Warning: Missing argument 3 for bb_bozo_pre_post_status() in /home/robertd1/public_html/**/forum/bb-includes/bozo.php on line 173
Warning: Cannot modify header information – headers already sent by (output started at /home/robertd1/public_html/**/forum/bb-includes/bozo.php:173) in /home/robertd1/public_html/**/wp-includes/pluggable.php on line 390
Commented out the site directory :P
does this error go away if you remove the integration?
Yupe , it does go away. I’ve just removed the integration. Sigh it was really a sad I wanted to integrate it. Error seems to happen when I try to
- save a post
- publish a post
- logging out from bbpress
I’m also using WP 2.3 and BBPress 0.83 ( Desmond ). Any recommendation ?
It always an error msg that has to do with bozo.php too… if that helps.
Thanks Aditya.
Andrew
the first step to debug is disable all the plugins..
then intergrate pure wordpress with pure bbpress..
if that’s not working then then there then we need to find the call to bb_bozo_pre_post_status without the other parameters..
if you are not using the bozo features.. deleting the bozo.php will fix this problem..
let me know how it goes
I’ll give it a try now and post back. The last time I did tried on a clean install. Only Wordpress and Only bbpress with no plugins on either site.
Aditya,
Still crashing on a clean install. No other plugin than the ones that you asked to install. Crash is happening at wp-admin/post.php
Warning: Missing argument 2 for bb_bozo_pre_post_status() in /public_html/smi/forum/bb-includes/bozo.php on line 173
Warning: Missing argument 3 for bb_bozo_pre_post_status() in /public_html/smi/forum/bb-includes/bozo.php on line 173
Warning: Cannot modify header information – headers already sent by (output started at /public_html/smi/forum/bb-includes/bozo.php:173) in /public_html/smi/wp-includes/pluggable.php on line 390
where smi is the folder where my wordpress is installed
Deleting the bozo.php doesnt seem to work too. Cause now there are files that are looking for bozo.php and random crashes whenever places that calls bozo.php
Yes, I’m having the same problem as Andrew – a shame, because what you’ve done is brilliant! I’ve been looking everywhere for this solution.
If it’s any help, I removed the integration and the problem went away when I removed the following:
if ( !defined(‘BBDB_NAME’) )
require_once(ABSPATH.’talk/bb-load.php’);
Ben,
Definately agree with Ben , Aditya’s work is absolutely brilliant. The only one that I know of that works ‘almost’ perfectly. :P
Which integration did you removed ? Both wordpress and bbpress integration ?
Andrew
i appreciate your comments guys..
im working on the fix right now..
for some reason i dont know why i cannot reproduce the problem.. i have tried two fresh installs on windows and mac.. both work fine..
but here is a short cut fix to the problem.
go to bbpress/bb-settings.php
line 132 –
require( BBPATH . BBINC . ‘bozo.php’);
comment this line off..
Also if you are comfortable, i’d like to see both your config files as is – just wipe off passwords and stuff
Yes, commenting that out worked for me. I’ll send you the config files tomorrow. Thanks again!
I am having the same problem to and commenting did the trick any idea what are we loosing when we comment?
When you comment that row you are loosing the bozo feature.. if you want to know what is bozo.. that means that you probably are not using it and don’t need it :)
Thanks Aditya for the quick reply and who cares about bozos anyway :)
I have just noticed that if i add
if ( !defined(‘BBDB_NAME’) )
require_once(ABSPATH.’forums/bb-load.php’);
in my wp-config.php to integrate i’m loosing the static homepage functinality in wordpress 2.3 :(
can i safely omit this?
Trying to track down the issue
bb-load.php is calling config.php
and config.php is calling bb-settings.php
oops i’m sorry but something went wrong only 1/2 my post went thru …
Trying to track down the issue
bb-load.php is calling config.php
and config.php is calling bb-settings.php
the latter (bb-settings.php) is causing the error if i comment this one all goes ok but I still think that commenting out
if ( !defined(’BBDB_NAME’) )
require_once(ABSPATH.’forums/bb-load.php’);
from wp-config.php might be safer
`if ( !defined(’BBDB_NAME’) )
require_once(ABSPATH.’forums/bb-load.php’);`
you need this only if you want to call bbpress functions and plugins from wordpress.
eg.. if you look at my wordpress homepage i have displayed the bbpredd forum discussions there. if you remove that line you wouldnt be able to get that.
i am interested in why that is happening though.. because of the if clause it should get into recursive mode..
thanks for bringing this up
I see thank you for the clarification
but then you are using static page and integration is my case “unique” or you are not using wordpress 2.3?
Getting….
Warning: Cannot modify header information – headers already sent by (output started at /home/sites/xxxx/public_html/forums/bb-admin/themes.php:2) in /home/sites/xxxx/public_html/wp-includes/pluggable.php on line 391
any ideas…?
ta
Dave
nm me being rather silly :S
I was doing all of this tutorial, but when I try to login on my forum with my WordPress User, I have some error message
This username does not exist. Register it?
What should I do to make integration works?
Please help me.
Thanks
I followed your instructions to the letter, but I am new to PHP, CSS etc.
All instructions you wrote are very clear and everything worked the first time.
My WP theme uses two sidebars, and I thought the easiest way to add them to BBP would be to append left sidebar to the header and right sidebar to the footer. I added [code]
[/code] to the ThemePress/header.php and [code]
[/code] to ThemePress/footer.php
However they are not being rendered. I had to go and edit every file in the theme, such as front-page.php, forum.php, post.php, topic.php… Can anyone explain why editing header and footer doesn’t work? Is there an easier way?
Also, ThemePress doesn’t have little login boxes that regular BBP themes have. Am I correct to think that since now BBP and WP are integrated, WP logins will be used for both applications? Thus separate login on BBP is no longer required. Right?
You can take a look at what I’ve got so far at http://www.MaxiMovieBlog.com/ and http://www.MaxiMovieBlog.com/forums/
I only added side bars to main page and topic page so far. Please let me know if there’s an easier way to add sidebars – through headers, perhaps.
Hey, I suppose I can modify the original WP theme to add sidebars ALSO from header and footer and get rid of all duplicate code in the rest of the pages… After all, I have customized my theme quite a bit already so there’s no going back to the original theme or ever upgrading it to a new version when theme author releases one…
…for some reason my code blocks weren’s displayed… Here they are:
Header.php:
Footer.php:
Dang.. didn’t display again. I suppose I need to escape all of them…
Header.php:
<div id=”content_box”>
<?php include (TEMPLATEPATH . ‘/l_sidebar.php’); ?>
<div id=”content” class=”posts”>
Footer.php:
</div>
<?php include (TEMPLATEPATH . ‘/r_sidebar.php’); ?>
</div>
Never mind. I actually implemented the changes I was talking about, but inetad of editing ThemePress’s header and footer, I moved the code for left and right toolbar to the header of footer, but of WordPress’s theme!!!
Now BBP is fully intergated and displays wthin WordPress blog.
The last problem I need to solve is that th forum uses WP theme’s CSS and appears centered horizontally and vertically in the page.
Could you please look at the original website at http://www.MaxiMovieBlog.com/ and then at http://www.MaxiMovieBlog.com/forums
You’d have to scroll to the middle of the page to see the forum… Please let me know what should I do with the CSS to make the forum look normal. Should I just append ThemePress CSS to my WP theme’s CSS?
Note that the forums have not been linked to from the main page yet and not been submitted to the search engines until I fix the formatting.
Alas I simply appended CSS from ThemePress to the CSS of WordPress. There’s no overlap in style definitions so it should be OK.
Now the forum looks fine: instead of centered unformatted text it displays nice tables.
But I am not out of the woods yet. The table is too wide and messes up the DIV elements: instead of sidebar-forum-sidebar, all DIVs are stacked up on top of eachother. I need to edit the width of the forum table in the CSS…
Does anyone know how to limit the width of the forum pages to, say, 500 pixels? Whatever I do, they seem to always take 100% width of the page and mess up the formatting,
Oh, crap! OK, I am using Cutline theme, slightly modified.
After I followed your instructions, particularly about adding bb-load into wp-config.php,
if ( !defined(‘BBDB_NAME’) )
require_once(ABSPATH.’bbpress/bb-load.php’);
some pages stopped working.
The Contact Us page was not rendering anything following “Contact Us” header, and sitemap was rendering the page only until it hit php scriptlet that displayed all the posts. I spent last 10 hours trying to figure out where the problem was. I checked PHP error log (nothing), uninstalled and reinstalled all plugins, theme etc.
The pages began to work normally again once I commended the above two lines…
What do you think is the problem? Am I out of luck and it’s not that easy to intergate forums with WP after all?
the above lines are only used if you want to use bbpress functions in wp.. if you dont need that you can comment those out.. you still will have a integrated bbpress and wordpress.. you forum users will be able to log into wordpress and vice-versa..
about the actual problem. I’m not sure why that would happen..
ideally you should integrate with the default theme of wordpress and bbpress and no plugins. and once everything is going good add on plugin at a time and then theme.. that way you’ll know what the trouble is.
let me know how it goes..
Interestingly when I integrated WP and BBP on my local Windows machine it worked fine, but when I hosted on to the server (goDaddy), the site kinda crapped out…
Can people with problems mention the OS, maybe the path settings could be an issue??
P.S. Still need to check on my Ubuntu VM.
Hey thanks varun..
that might explain why i could not replicate the issue.. thanks for the heads up..
i’ll check on mac and linux..
Hello!
I followed strictly this tutorial. It was easy to do this way but unfortunatelly I get an error. I did it on a fresh WP and as well fresh bbPress installation. No theme and no plugin was activated in WP, in order to avoid any conflict.
Aparently everything works fine, but finally when I try to save a topic or a post, I get always an error message:
“The requested URL /bbpress/topic/again- was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”
It’s interesting that I do not have that ‘topic’ folder on bbpress folder and even I create one with 777 permissions nothing is changed.
I will appreciate a lot and advice.
Mihai
I think the error is unrelated.. there should be a line in the config.php which sets value for $bb->mod_rewrite.. set that to false. that should get you going.
You are really so good! I did the shift from ’slug’ to false and it works! THANKS VERY MUCH!
I’m back… I observed that I have the ‘bozo’ problem and I wonder if I can keep using the complete integration.
Have you ever found any solution to this bug?
Appreciating at maximum your contribution,
Mihai
$bb->wp_home = ”; // WordPress – Options->General: Blog address (URL) // Example: ‘http://example.com’
$bb->wp_siteurl = ”; // WordPress – Options->General: WordPress address (URL) // Example: ‘http://example.com’
what is the difference b/w wp_home and wp_siteurl. if they r same then why confuse us with 2 entries. pls can u tell me regardign this
if i have a wordpress blog at example.com and my forum at example.com/forums , what should be the values.??
is it possible to display new posts inside wordpress.. how to make my bbpress look similar to my bbpress?? any theme that works out for both
Hi!
I’m trying to make it work under Wordpress 2.3 but without luck.
Whit this line added to wp-config.php
if ( !defined(‘BBDB_NAME’) )
require_once(ABSPATH.’forum/bb-load.php’);
the whole site stop working
(Fatal error: Cannot redeclare class CachedFileReader in bora.la/forum/bb-includes/streams.php on line 163)
if i remove from wp-config.php
the error is still there in bbpress.
if i remove the changes made to the bbpress/config.php
define(‘WP_BB’, true);
if ( !defined(‘DB_NAME’) ) {
require_once( dirname(__FILE__) . ‘/../wp-config.php’);
}
i get this error while using the ThemePress template
Call to undefined function get_header()
but i thing this is normal becouse there is no link between the WP and BBP.
Is there a way to include bbpress as a subpage of wordpress?
Like i create a page within WP that is based on a template that load the BBpress?
i’m also getting the same error, fatal error due to Cachedfilereader; where the page is shown empty!
Aditya, what you did here is exactly what i have been looking for. can you help look at what further tweaks needed to make this run on wp2.3+ ? thanks so much.
Sorry but I just had to undo everything I did with instruction from your tutorial. All it did was cause a bunch of errors and warnings making posts to WordPress. The instructions on the official bbPress website worked just fine. If it ain’t broke…don’t fix it!
I’m going to take a shot at this in the coming weeks.
Which version of Kakumei did you use as a base? I plan to do a big diff to see what changes you made.
Note, the base Kakumei theme has changed since you made your modifications.
See diffs here.
http://trac.bbpress.org/changeset?new=%2F%40971&old=%2F%40951
sorry guys.. my schools been taking much more time than i imagined…
i’ll try to get to this first thing i get some breathing space..
bear with me.
Warning: Cannot modify header information – headers already sent by (output started at /home/balitrav/public_html/wp-config.php:48) in /home/balitrav/public_html/wp-includes/pluggable.php on line 391
i get this error when do post or any other post. i use the newer wp.
thanks
Hi, just wanted to thank you for your notes on integrating functions between both wp and bbp. I saw the tutorial on the bbpress site, and it said nothing about getting bbpress functions working in wp, so you really saved me!
Thanks again :)
I was able to install your plugins and the transition looks good from WP to BBpress.
Only problem is that the WP site has 2 right sidebars, and I don’t know how reproduce that when a user goes to the bbpress forum section – it takes duplicates the functions in the header and footer. What is the easiest way to get around that so I can get my sidebars back for the forum sections?
Hi
I’m using WP 2.3.3 and BBpress 0.8.3.1 and I’ve managed to get everything to work except that I can’t access the BBpress admin at bbpress-folder/bb-admin
So far as I’ve goten it seems as it compares the WP-user with the authorities among the BBpress users but I can’t find out where that happends.
Do you have any ideas?
I followed your instructions and the template looks good.
However, on the forum, all page titles say “My site blog” and do not change – why is this happening?
has anyone used this method, or any other successfully when connecting installs on different domains? Say wordpress is on http://www.domain.com and bbpress on forum.seconddomain.com?
so far everything I’ve try does not work. it seems like there’s something i’m missing.
I’ve try’d editing the cookie domains to match but that disables log in on one or the other. Any help would be loved.
thanks
Hi, I’ve installed the bbpress 0.8.3.1 version into the wordpress v2.3.2 directory.
I’ve followed your instructions for integrating bbpress in wordpress, and it works fine (the get_header(); and get_footer(); are working from the template which is very convenient !!)
But there is a major issue when you try to localise bbpress by adding the .mo file into bb-includes/languages/
and add: define(‘BBLANG’, ‘fr_FR’);
into config.php file
I’ve the Fatal error: Cannot redeclare class cachedfilereader in E:\wamp\www\hyporec\rs_next2\bbpress\bb-includes\streams.php on line 163
After many hours of research and tests, the problem seems to be due that there is a confict between wordpress fr mo file and the bbpress one.
Please how can I solve this issue ?
Many thanks in advance for you help
Hi Aditya
I used this all as you gave.
It was giving me error when i used to save pages in WP.
something related to bozo.php.
i have set error reporting to 0.
do you think i should do something better ?
Regards
Mihir
@mihir
the problem with the bozo error is that wordpress and bbpress use some filter names which are conflicting.
at this stage the only way to fix this
http://www.adityanaik.com/integratepress-part-i/#comment-7894
try doing that..
@Lee
that is because you are using the same hear file as wordpress.. if you want to use a different heading in forum you will need to write a code to do that seperately.
Wow, phenomenal. I’ve almost got it useable. However, I just need a little help editing the CSS. Right now, I’m using the awesome Vistered-Little theme (http://windyroad.org/software/wordpress/vistered-little-theme/), and after following your directions, I get bbpress using that theme, but all of the forums elements are transparent, meaning the text is nearly unreadable over the background image.
Please take a look at my forums page here: http://www.thewisemanfamily.org/wp/bbpress/
I’m no stranger to editing a CSS file, but I have no idea what tags/classes/etc. I need to edit in the ThemePress’s style.css file to make this text readable.
I’d greatly appreciate your help!
Thanks again for all of your work with this!
@adam
in this case it will take much more than just css edit.. the template will need to be modified to add the distinct back box around the forum..
also i suspect that you will need a new background image which is wider than the one already there..
Hi Aditya
thanks
this sounds great. I will try it.
I thought it was better to ignore error for trial :)
will change code as per direction.
btw : Great work bro ..
Thanks A Lot
Mihir
@tfab
i have not worked on localizations.. but if you are creating the mo files i think just create the wordpress and bbpress mo files together and put the mo file in wordpress and do not initialize bbpress language seperately.. that i think should do it.
@jelthure
i dont see a reason why it should not run.. what is the error you are getting?
@tfab
I found the solution to the localization problem.
You can’t load 2 localization files (Wordpress + bb¨Press) because there is a conflict.
You can however put all the translations in one single .mo file and load it in WordPress. This way you don’t need to load the bbPress localization file.
I created the merged .mo file using the GNU gettext msgcat utility, and then poEdit to create the new .mo file
It works fine, I get all the translations in WP and bbP
That was tricky. Took me 3 hours to figure out but you put me on the right track by diagnosing the locale problem! Thx!
(posted this solution on the bbPress forum as well)
thanks ydubois for the solution..
Wordpress 2.5, BB-Press .9.0.1 and your theme integration. Its KILLIN ME. :P If anyone can help please do so. And yes I’ve checked for spaces/lines before/after my php tags in both of these files, there are none..
Warning: Cannot modify header information – headers already sent by (output started at /var/www/virtual/mywebsite/forums/bb-config.php:1) in /var/www/virtual/mywebsite/wp-includes/pluggable.php on line 689
:) dude!
first integrate wordpress and bbpress.. forget the theme integration. once you are done with the user integration – login logout and stuff with wordpress and bbpress’ default themes.. then move onto theme integration.
i am trying out the integration for those version right now.. will let you know the results..
Hah. The integration works. I think. ;P I don’t know. I can’t hit admin so I renamed the integration theme folder to push it to default to one of the new ones. No change. It authenticates across to the forums read/etc is fine. Its just when I post or attempt to login to admin where it chokes. I posted the same error msg on the bbpress forums. Thought you’re worldly integration experience might be able to help :P :)
Woot. Let me know
Chad
completely rebuilt my bb-config.php file. All is good now. No clue why it was jacked.
Chad
thanks for letting me know. I integrated my forums and its worked fine. so i was scratching my head :)
cheers!
Hi Adita
had integrated forum wid wp
upgraded WP, now its :(
Any help ?
Mihir
sorry for yupo wid ur name
btw ! for now i hv removed forum link from wp.
if you have upgraded the wp install i will suggest that you upgrade the BBpress install also..
if you want to keep the current bbpress install take a look at this post
http://bbpress.org/forums/topic/how-to-integrate-bbpress-09-with-wordpress-23-or-lower
what i mean is 2.5
but 2.5 seems to be a major problem to me ..
its sleek n all ..but u know wot ? it doesnt give me option to upload pic ..
i had to remove 1 line frm wp-admin.css .. to see tht option
.hide-if-no-js {
display: none;
}
but then it doesnt open a sub window…
its funny i use mozilla n ie both r set not to restrict any JS
hmm.. interesting. i am running wp 2.5 and i never had this problem.. did you discuss this on wordpress forum?
No ! i didnt discuss it atall
you know IPL is on n ppl r crazy ..
so downgraded WP to old one by restoring backup files n mysql ..
which in-turn fixed problem with forum as well …
But i think i will try new version on non-production before upgrade .. :)
This is a great tutorial. I spent so many nights finding the way to integrate bbpress to my wordpress blog. I do not know how to thank you enough.
Now I have a problem. The style.css in Mytemplates doesn’t look like it is working. No matter how I change it, nothing happens. If you talke a look at my forum, dandelionbreeze.com/skc/bbpress, there is not enough spaces between the headings, basically no table is there.
Where do I have to go to fix this?
Thank you.
Oh, never mind.
I copied the style.css of Thempress and added it to wordpress current theme style.css. Now it works. Thank you.
Hi there,
Great tutorial, did it all step by step and its looking good.
I am getting an error though – it says:
bPress database error: [Table 'graylink_wrdp1.wp__users' doesn't exist]
I presume it has something to do with the “$bb->wp_table_prefix = ‘wp__’; // your wordpress db prefix is” line which was added to bb-config.php
however, my wp database prefix is “wp_” so I am confused.
My full db name is “graylink_wrdp1″
If I can fix this then I am almost there!
thanks for the great help!
Matt
you are right.. instead of
$bb->wp_table_prefix = ‘wp__’;user
$bb->wp_table_prefix = ‘wp_’;sorted – sorry there was a double “__”
I installed your script to integrate wordpress and bbpress. However, no one can register or log in because I get the error message ”
bbPress database error: [Table 'wp.bb_users' doesn't exist]
SELECT * FROM bb_users WHERE ID = 1″. I looked in myphpadmin, and that’s true – there’s no table called bb_users”. Any idea why this is or how I can put that table in the db?
Thank you,
enigmaik2@yahoo.com
what are the versions on wordpress and bbpress.. this tutorial was for 0.8.x bbpress.. for 0.9 the integration is automated.
wp version is 2.5.1. bbpress version is 0.9.0.2
hmm.. those two are automatically integrated.. you dont need to do anything..
go to bb administration panel and in the settings for wp integration select the integration and you should be good to go.
thank you
Aditya,
Great tutorial, but I am having a slight problem using WP 2.5.1 and bbPress 0.9.0.2.
I integrated the WP and bbPress using bbPress’ built in functionality. I then made the code modifications above and installed themePress, but now I get the following error:
“Fatal error: Call to undefined function: get_header() in /home/public_html/board/bb-press/bb-templates/ThemePress/front-page.php on line 1?
My bbPress is installed in a subdirectory of my WP installation, but I seem to be having difficulty getting the WP elements to show up on the bbPress page.
Any help is appreciated, and thanks again for the tutorial.
the built in functionality to integrate wordpress and bbpress does not make it share the functions across the two systems.
for that you will have to do these two steps
in bbress config
define(‘WP_BB’, true);
if ( !defined(‘DB_NAME’) ) {
require_once( dirname(__FILE__) . ‘/../wp-config.php’);
}
and in wordpress config
if ( !defined(‘BBDB_NAME’) )
require_once(ABSPATH.’bbpress/bb-load.php’);
for details on doing these see the article..
hope this works for you
cheers!
I have installed wordpress 2.5.1 and bbpress 0.9.0.2 and I tried installing ThemePress-v-1 into bbpress.
I then got the error ‘Fatal error: Call to undefined function: get_header()…’.
I tried the fix you described above but I didn’t work. I now get a new error.
When entering bbpress:
Parse error: syntax error, unexpected ‘.’ in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38
When entering wordpress:
Parse error: syntax error, unexpected ‘.’ in /hsphere/local/home/tinab/femmeextreme.com/wordpress/wp-config.php on line 29
This is what I added to bb-config.php file:
define(’WP_BB’, true);
if ( !defined(’DB_NAME’) ) {
require_once( dirname(__FILE__) . ‘/../wordpress/wp-config.php’);
}
And this is what I added to wp-config.php file:
if ( !defined(’BBDB_NAME’) )
require_once(ABSPATH.’../bbpress/bb-load.php’);
i think you should verify the backticks.. have you used the right syntax? there are three different ticks
` ' ’make sure you are using the right one..
Also make sure you have them placed in the right location.
I changed to absolute paths instead as:
require_once(‘/hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-load.php’);
But now I get the same error entering bbpress as wordpress:
Parse error: syntax error, unexpected $end in /hsphere/local/home/tinab/femmeextreme.com/wordpress/wp-config.php on line 33
end of file looks like:
…
/* That’s all, stop editing! Happy blogging. */
define(‘ABSPATH’,dirname(__FILE__).’/');
require_once(ABSPATH.’wp-settings.php’);
if ( !defined(’BBDB_NAME’) ) {
require_once(‘/hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-load.php’);
}
?>
ah three different ticks! I would have never seen that one! Thanks!
I get this error instead now:
Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: Division by zero in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Warning: main(0php?): failed to open stream: No such file or directory in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38 Fatal error: main(): Failed opening required ‘0php?’ (include_path=’.:/hsphere/shared/apache/libexec/php4ext/php/’) in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-config.php on line 38
are you sure you have typed in right.. coz it looks like you have a typo ‘0php?’ somewhere
I went back to the ABSPATH . method and used ” ticks and now the wordpress page loads but the bbpress page says:
Fatal error: Cannot redeclare _http_build_query() (previously declared in /hsphere/local/home/tinab/femmeextreme.com/bbpress/bb-includes/wp-functions.php:768) in /hsphere/local/home/tinab/femmeextreme.com/wordpress/wp-includes/compat.php on line 18
in bbpress config.. the include for the wordpress should be at the top of the file..
Nice!! Now it loads, thanks a lot for your help! Looks really good!
Ok, next problem.. now the header is nice but how can I make the forum to look nice?
Should I edit bbpress/bb-templates/ThemePress/style.css or some other css file?
no.. you can edit the wordpress css and add forum css
if you want to improve performance create a new css and hack the header in wordpress only to load this css if the bbpress is being displayed.
I included the style.css that came with themepress in header.php of wp theme and it improved the look of the forum a lot.
Now I only need to find a bbpress style that works with my wp theme.. Thanks for a great plugin!
I want to match my bbpress template here http://www.atriskstoriesofhope.com/bbpress to this wordpress template http://www.atriskstoriesofhope.com/media.html
Where would I begin?
i think just follow the post.. it should take you where you need.
Hi Aditya,
First of all I want to say that it’s wonderful that you are offering so much help here. People like you make it possible for so many to make the most of their websites!
So, I want to add bbPress to my Wordpress site. I have a new installation of both. Can I assume that the tutorial still works for the latest releases of both?
I followed your tutorial on a local installation and ran into two problems…
1. The changes seem only to take place for the front page of bbPress but then when I click on anything on the front page I get redirected to the front page again but with no changes.
2. My Wordpress CSS file is already massive from adding a gallery and I am hesitant to add more to it. How do I get the forum to either use its own CSS or its own on another directory?
Thanks for all of your help!
Pierrot
Ok, I feel like an idiot, but can someone tell me where in the file (exactly) this goes:
$bb->wp_table_prefix = ‘wp__’; // your wordpress db prefix is
$bb->wp_home = ‘http://www.yourwebsite.com’;
$bb->wp_siteurl = ‘http://www.yourwebsite.com’;
@Pierrot – thanks
1. i think the best way to debug it is.. remove the integration between forum and blog and then see if they independently are working. once they start working they you can integrate. also make sure your plugins are disabled also so they dont interfere with your system.
2. you could but you will have to hard code and program to load certain css when you are in bbpress.
@Joe these were the setting from previous version of wordpress. with the new version you dont need these settings.
Hi,
I’ve tried the first part of the integration (modifying bb-config.php and wp-config.php) and when attempting to enter both wp and bbpress there’s the following error:
Parse error: syntax error, unexpected $end in F:\xampp\htdocs\wordpress\bbpress\bb-config.php on line 44
I am not so familiar with php, but in line 44 only appears the php closing tag ?>.
¿Some ideas?
Thanx
Sorry.
I’ve forgotten a “}”.
Shame on me.
got it working.. cheers!!
great tutorial!
Take a look.. so far
WP http://www.djvibe.com/content/
BBP http://www.djvibe.com/content/forums
Thanks Aditya
Great Tutorial.. Perfect..
I can not thank you enough..
I have integrated my Forum
http://www.gjtutorial.com/forums
and WP
http://www.gjtutorial.com/news
I am facing some issues with SideBar Login Plugin for WP. I will try and solve it, however will appreciate any ideas if somebody has tried it so far..
I haven’t tried that plugin but one word – cookies.
Awesome code! Thanks!!
One quick question:
I move my forum to a subdirectory of my blog like you said to do re: cookie; but I’m still not automatically logged into my forum when I log in to my blog.
Any help would be greatly appreciated.
if you are talking about wp version 2.6 this is an known issue..
http://bbpress.org/forums/topic/wordpress-26-problems-logging-in
if you have version 2.5.x for wp let me know
I have WP v2.5.1, but was thinking of upgrading to 2.6 soon.
with 2.5.1 you have to do some special stuff like making sure your secrets are in sync etc.. did you install the forum new or did you already have forum before you moved it to the subdir
I installed the forum in an external folder, got the wp integration working, then implemented your code.
Then noticed the user was not automatically logged in, so I moved the bbpress folder directly underneath my WP folder.
that wont work.. the BBHASH used for cookies is based on the directory you are in.. it wont match.
i suggest that delete the bbpress tables and reinstall after placing the files in the subdir..
So, delete my database tables and reinstall bbpress?
(I read that integration is easiest when WP and BB are each installed in their own directory. And, the author specifically mentions that it is very difficult to install BB in a subdirectory of WP.
Here’s the link to his post http://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101#post-17412 )
Is there no way to just change the BBHASH that exists to the correct one?
I think I have it working.
When I login at the regular WP login page and then visit my bbpress directory, I am logged in.
Thanks for you help.
My problem comes from another script I am using to manage subscriptions to premium content – aMember. When I login via aMember I have access to the blog (without the cookie being set), but I am not logged into the forum. This is a problem with aMember not actually logging the member into WordPress.)
I installed my bbpress forum and has already successfully integrated the logins.
But I want to try this theme/template integration.
I am using bbpress 0.9.0.2 and wordpress 2.5.1..can I try this method or there would be some problems later.
ALso the plugins which you mentioned are not compatible with the latest bbpress versions.?
Expecting an answer from you!
i am using these very same versions and its working for me..
but that said.. try this on a local install or a dev install of your site before fiddling with your live site.
… and as always YMMV.
Well I tried After doing a backup.
But please can you look at my blog
Is there any way to match bbpress with my blog theme:
http://www.funadda.co.cc/funblog
http://www.funadda.co.cc/funblog/funforums
Thanks in advance
Thanks for this quick reply too
And Also Where to put these lines which u mentioned.
$bb->wp_table_prefix = ‘wp__’; // your wordpress db prefix is
$bb->wp_home = ‘http://www.yourwebsite.com’;
$bb->wp_siteurl = ‘http://www.yourwebsite.com’;
I copy and pasted these lines in config.php below the following lines:
require_once( dirname(__FILE__) . ‘/../wp-config.php’);
}
Is this right.I don’t know much about php…I am still trying to learn.:-)
looks like the apps are integrated and done..
dont worry abou the lines bbpress will take care of it..
I saw that you wrote at the beginning ‘For the purpose of this article I am assuming that the bbpress installed in a subdirectory of wordpress’
By subdirectory of wordpress do you mean in the same Database as my Wordpress Site on MySQL? The WP website mentioned doing the bbPress in its own dedicated database for installation. Will it still work either way?
I’m running WP 2.5 and the latest bbPress so I should be good, but wanted to double check before I did anything.
Thanks!
i meant physical directory on the filesystem.
i think it should work having its own database should work. please note that both wordpress and bbpress have updated versions after this articale wasx written. so YMMV..
Thanks for the article. The bbPress.org instructions didn’t seem to work for me, but yours did like a charm. My only problem was mentioned by Antione some time ago (http://www.adityanaik.com/integratepress-part-i/#comment-8068) regarding the fact that my WP static page ceases to function after I add the bb-load.php include to wp-config.php. Any thoughts on that?
Have you ever posted a question, only to find the answer seconds later? I think I got it. I had the bb-load.php include statement at the bottom of wp-config.php. I moved it to the top and now we’re in good shape.
@Jason I’m glad it worked out for you.
I have WP 2.6 installed and BBPress 1.0 (alpha). The them carries over, but once i try to login, it doesn’t know what to do…
It accepts the login information. Also, the bb-admin/ doesn’t load, when Themepress is selected.
Weird.
apparently, if one logs in using the WP form, everything loads. It’s when you try to use the BB-Press form, that it doesn’t know what to do with your login.
Great tutorial! I have implemented the integration, and you mentioned that there’s access to Wordpress plugins after this is successful. I’m using the Members-Only plugin which only gives access to Wordpress if logged in. How would I implement this to be used for my bbpress installation, too? As of now, I can navigate to the forum if not logged in, and I need to have my forum behind this protection.
Thanks!
Hi, your integration works fine but now I can’t login on bbpress. I noticed that this happens when I add the following string to bpress’ config.php file:
define(‘WP_BB’, true);
if ( !defined(‘DB_NAME’) ) {
require_once( dirname(__FILE__) . ‘/../wp-config.php’);
}
$bb->wp_table_prefix = ‘wp_’; // your wordpress db prefix is
$bb->wp_home = ‘http://gsupoetry.com’;
$bb->wp_siteurl = ‘http://gsupoetry.com’;
@Jenny I’ve never used that particular plugin but i would think the way it works in wordpress should work in bbpress. also note not all plugins for wordpress will work in bbpress. eg.. if the plugin uses wp only hooks to do some tasks.. then they may not be triggered with bbpress. unfortunately these hacks require PHP knowledge.
@seidl please note that this tutorial was for a older versions of bbpress and wp..
also see
http://www.adityanaik.com/integratepress-part-i/#comment-12965
and
http://www.adityanaik.com/integratepress-part-i/#comment-12967
I figured that was it but was hoping you would have a solution. :P I’ll just have to stick with the default theme for now and redesign it to be identical. Thanks anyway. :) (I’ll keep an eye peeled.)
Hey, actually, I got it to work. I figured it had something to do with cookies so I took the following code out from my wp-config.php file:
define(‘COOKIE_DOMAIN’, ‘.’);
define(‘COOKIEPATH’, ‘/’);
define(‘SITECOOKIEPATH’, ‘/’);
I am using WP 2.5 and BBPress 0.9.0.2 . I haven’t done all the work with the .css yet but as far as I can tell there are no structural problems.
Thanks for this tutorial! It’s the only one that worked for me.
i am glad it all worked out for you..
I’ve followed your instructions and the integration looks good. However, when I try to save a post in Wordpress it adds a backslash \ before every apostrophe. I can save the post over and over and actually watch the backslashes increase.
I’m running WP 2.5.1 and BBP 0.9.0.2. Any thoughts on why this is happening?
Well so far so good. I haven’t had any luck with the backslash issue though I did see a good deal of conversations about it. I’ve decided to only integrate this one direction. From Wordpress to bbPress and it seems to working for my needs.
Hi Aditya,
I have been using WordPress for 7 months and recently realized it was time to do a forum. It’s a no-brainer to go with bbPress, particularly because of your integration work. However, being fairly tech-illiterate, I have a few novice questions.
(1) Is it possible to integrate blog.domain.com (WP 2.6) with forum.domain.com (bb 1)? After reading the thread above it sounded possible, but would take some extra fiddling around if the forum was in its own directory and not in a subdirectory of the blog.
(2) How would one handle the situation of already having an operational blog with many plugins and a custom theme (semiologic) and going about doing the integration? It sounds like it is important to do the integration before any custom plugins or themes are used.
(3) Do you know of any resources or people that I could hire and pay to help with the integration?
Thanks,
Michael
@michael 1. Yes it’s possible. As you said there would be some extra fiddling. Specially with the cookie settings
2. It works perfectly fine with existing blogs. Plugins and theme included. You will need some extra styling for the forum but should work fine
3. Yes. I do some consulting in that area. Mail me at Aditya at Aditya Naik point com
Aditya-
messing with 2.6.1 and bbp 1.0 alpha. I have them integrated and working fine until I light up the theme integration again. Then I lose some functionality.
Have you had a chance to look at those two together?
Thanks in advance.
Chad
Is anyone alive out there? Are there any other known methods at this point for theme integration or is it possible that this method will be reworked to function?
:) im alive.. i tried the integration and it worked fine for me.. what functionality are you loosing?
Almost have theme integration working fine with your tutorial, but I am no having a problem with the backend of bbpress.
Whenever I click on any of the links in the admin section, I’m taken back to the main blog site instead of say, “Plugins” or “Settings” in the BBPress backend.
Now, I have followed your tutorial up until this:
—-
Define the following variables.
$bb->wp_table_prefix = ‘wp__’; // your wordpress db prefix is
$bb->wp_home = ‘http://www.yourwebsite.com’;
$bb->wp_siteurl = ‘http://www.yourwebsite.com’;
—
Where do you define these? They are not in my bb-config file anywhere. I’m assuming this is my problem?
Thanks again for the great work on this and letting us all integrate these two great programs!
dont worry about those setting the latest version on bbpress automatically takes care of it..
about the login issue.. its a cookie thing.. try this
http://bbpress.org/forums/topic/wordpress-and-bbpress-integration-101#post-17419
Hey Aditya. I’m losing free text boxes to create new post etc. Also I am unable to edit a post via clicking the edit button under a post. Obviously I can edit if I go to the back end but I like to edit on the fly as I’m reading if necessary. I’ve been using the theme integration for some time I’m going to try to re-up the theme for bb and see if that works just in case I modified something I shouldn’t have a long time ago.
Chad
same deal. If I click add new topic no free text box. would seem to me I have a permissions issue.
does this problem go away when you remove the theme integration?
I also realized that when I am integrated I don’t have plugin links in the admin side of bb-press. Pretty sure I am keymaster.
Also this is all I have anymore in my config for bb-edit to trip the theme integration, not sure if this is correct or not:
define(‘WP_BB’, true);
if ( !defined(‘DB_NAME’) )
{
require_once( dirname(__FILE__) . ‘/../wp-config.php’);
}
If I comment these lines out I have full rights back in bb-edit.
FYI I have no other plugins besides askimet and bozo.
I’m baffled.
Yes as soon as I remove the theme integration everything works as it should.
Hah..not full rights back in BB-Edit…BB-Press.
Bottom line I comment the integration lines out of my config and use a std theme and I have all functionality.
As soon as I change themes to the integrated theme I get a header error if I don’t uncomment those lines mentioned earlier. As soon as I uncomment them I get some functionality but lose the others listed.
I have to roll for a few hours to a meeting but will check back early this afternoon.
Thanks for helping on this and if you need ftp access into my stuff let me know and I’ll hook it up.
Chad
I believe im having the same problem as Chad (above).
Maybe I am missing a step.
I have integrated the users between bbpress and wPpress. Im using seperate databases and install directorys.
ie: domain.com/blog/ and domain.com/forum/
thanks!
Aditya
This is worth all the time it takes to make it work, thanks so much.
After a few trials and tribulations, I managed to get things working with the WP_Premium theme. My only issue is that it seems no matter what changes I make to the “css” files, nothing seems to move anywhere. I have funky tables as of now with off-set titles etc… Anyone have any kind of css guide to work from? Most of the coding I deal with on a trial and error basis and need a little helping hand.
You can see my blog here: http://www.theanglerreport.com
and the forums here: http://www.theanglerreport.com/forums/
Any help is certainly appreciated. Thanks in advance.
I’m working on getting my wordpress theme integrated into my bbpress installation. I got it working somewhat by adding require_once(‘/home/a2251203/public_html/wp-load.php’); into bb-config. When I try to log into bbpress it never logs in. Think it has something to do with me using wordpress 2.6. Is there anyway around this?
http://bbpress.org/forums/topic/wordpress-26-problems-logging-in
Lost on this
*eagerly watches the RSS feed for this forum for a clear-cut solution*
Aditya-
Are you no longer going to work on this? Not judging just curious as I am desperate to find a solution.
Chad
sorry for not getting to this.. but i did try to reproduce this..
I used the latest wordpress and used bbpress alpha 1.. mine worked just fine.. the steps aren’t the same. so i am working on the screencast for the integration. Will send out a email to you when done.
Hey, just wanted to say thanks. I used the ideas from this blog post to solve my wordpress/bbpress integration problem.
I didn’t use the theme, but it gave me an idea for how to implement this using hooks. Thanks for the inspiration.
Thanks for the helpful tips. I will try this to get my menu to cross over onto my forum.
Where is ThemePress-v-1.zip? The link in the article doesn’t work.
Hey – great looking solution but where’s the ThemePress zip file, the download link is broken…
Hi,
The Link http://www.adityanaik.com/download/ThemePress-v-1.zip is no longer valid.
So I Can’t finish your tutorial :-(
Sorry.. link is fixed..
Hey, thanks for the tutorial. I just have one question.
When I make the above changes, I lose my CSS layout in both WP and BB. However, I see that BB is in fact using the WP header & footer which is a great start.
I just need to figure out why it’s not picking up the WP CSS, and why the WP no longer follows the CSS :(
Any ideas? Much appreciated!
look at the generated code and find out whats happening..
Thanks Aditya,
From the page source it looks as if it is calling the incorrect CSS as seen:
This only seems to happen when I enter the following line to wp-config.php:
if ( !defined(‘BBDB_NAME’) )
require_once(ABSPATH.’forum/bb-load.php’);
Anybody have a similar issue? Cheers guys :)
Apologies, the generated page source is missing from above comment:
“link rel=”stylesheet” type=”text/css” href=”http://www.cents.ie/ah3/wp-content/themes/default.css/style.css” media=”screen” “
Sorry, false alarm!! I got it working.
Turns out to be an error in the theme I was using, incorrect CSS variable used.
Working as design, great job, thanks a million!!
-p