If you’re looking to integrate bbPress and WordPress, life just got a little easier.
Database Integration
Setting $bb->wp_table_prefix
in bbPress’s config.php
will tell bbPress to grab users and user meta data from those WordPress tables.
The CUSTOM_USER_TABLE
and CUSTOM_USER_META_TABLE
constants are still around and will override other settings if you need more fine grained control.
UPDATE: I should have mentioned Matt’s external user database update from a few months ago. It allows you to pull user and user meta information from a separate database. All you have to do is define USER_BBDB_NAME
, USER_BBDB_USER
, USER_BBDB_PASSWORD
, and USER_BBDB_HOST
.
Cookie Integration
If you’ve installed bbPress into a subdirectory of your WordPress installation, define $bb->wp_home
and $bb->wp_siteurl
as your WordPress blog address and WordPress address, respectively. Both sites will now share the same cookies so that when you’re logged into one, you’re logged into the other. (The addresses referenced above can be found in WordPress’ Options -> General admin tab.)
If bbPress is not installed in a subdirectory of your WordPress install, you’ll probably need to adjust both bbPress’ and WordPress’ cookies to meet your specific requirements. Below is a brief outline of the variables and constants that control the cookie behavior in the two programs.
PHP | bbPress | WordPress |
---|---|---|
name | $bb->usercookie | USER_COOKIE |
name | $bb->passcookie | PASS_COOKIE |
path | $bb->cookiepath | COOKIEPATH |
path | $bb->sitecookiepath | SITECOOKIEPATH |
domain | $bb->cookiedomain | COOKIE_DOMAIN |
Registration Integration
Currently, when a user registers on your bbPress forum, your WordPress blog doesn’t know about it (and vice versa). The user will be created, but WordPress won’t know what user role to apply.
At the moment, integrating user registration more tightly will require a plugin both for bbPress and for WordPress. Hooks to look at include bbPress’ bb_new_user
and bb_user_has_no_caps
along with WordPress’ user_register
.
Function Integration
bbPress keeps all of the code it has in common with WordPress in a couple of discrete files. If you’d like to load both bbPress and WordPress at the same time (so that you have access to both sets of functions and APIs), you’ll need to tell bbPress not to try and load functions and classes that WordPress has already defined.
Do so by defining WP_BB
as true
in either config.php
or wp-config.php
. Also, WordPress will have to be loaded first.
The short of it
We’re always trying to make things simpler around here. Integration with WordPress is easier now than it used to be but will hopefully continue to become more and more painless as we keep working.
As always, config-sample.php
has a couple hints.
[…] Simpler integration with WordPress and bbPress, this is getting really cool. « Lloydomattic […]
This makes what was easy even easier.
Many thanks
It’s about time! I’ve been waiting for this for a while, this will make life better. Thanks!
[…] 自 Mike Adams (mdawaffe) 加入 Automattic 後,bbPress 的開發?度展開,最新是進展是簡化 WordPress 和 bbPress 的整?。 […]
[…] Simpler integration with WordPress Someday this’ll be usable enough for anybody who wants an all-in-one solution for their blog and forum. (tags: wordpress development) […]
Ow man, bbPress just keeps getting niftier and niftier. I hope you guys can get a solid release out there soon because I’m dying to use this on a public site.
Cheers!
[…] Blog Software Sep 20 at 4:01 am by Thord Hedengren -The good folks over at bbPress (you know, the forum software made by the people that brought you WordPress) just posted about easier integration with WordPress. It looks easy enough, but I’m still waiting for the software to leave alpha. […]
Are there actually user creation plugins available to WP and BBpress? Or is this just a heads-up that these will need to come along at a future point?
Thanks for all the hard work, by the way.
Wow! It’s Great! Wery helpfull for me.
1. Would you integrate some Gallery software into this pretty good integration bundle?
2. Would it work in bundle where WordPressMU + bbPress inegrated?
It’s important for me, because i’m interested in creation of community, where users can have their own blogs, communicate in forum, and share their pictures from one user account.
When will rhe forum be up here so we can ask questions like:
– When will bb-press support img tags so we can add images into our forum
– When will the plugins (page) be ready?
– When will bbpress use Vet like this way?
What, no language files for bbPress?
I’m a Hebrew blogger and I would love to offer it translated.
😀
[…] bbPress » Blog bbPress和WP的整? (tags: bbPress) […]
[…] bbPress » Blog Integrating WordPress and bbPress has gotten easier. (tags: wordpress bbpress integration database community todo) […]
[…] – wie man das bbPress-Forum mit WordPress integriert – AuthOnly erlaubt ausschließlich registrierten Usern den Zugriff aufs Blog, zusätzlich benötigt man dazu den RoleManager (vom gleichen Autor) – KillPreview ist mehr für die Blogschreiberlinge selbst, es schaltet die olle Vorschau im Write-Modus aus. Spart halt Zeit beim Aufruf des Fensters – Whisper werde ich wohl bei mir einbauen. Es erlaubt registrierten Usern via Kommentar anderen registrierten Nutzern eine Nachricht zu hinterlassen. Nicht registrierte User können diesen Kommentar nicht sehen – WordPress SMTP ist für all diejenigen interesssant, deren eigener Server aus welchen Gründen auch immer Mailversand-Probleme bereitet […]
[…] bbPress Integration with WordPress Easier Looks like there has been some movement in the bbPress world which I am happy to report: WordPress integration! If you’re looking to integrate bbPress and WordPress, life just got a little easier. […]
I’ve updated this post’s Database Integration section to include the news about Matt’s work allowing for an external user database.
[…] Finalmente qualcosa di nuovo in casa bbPress, il forum preferito da chi usa WP: la tanto sospirata integrazione con WordPress soprattutto per quanto riguarda la gestione degli utenti e le funzioni disponibili a livello di codice. Per i più curiosi, in attesa di una traduzione nella nostra pagina wiki, ecco un esempio del nuovo file di configurazione di bbPress. […]
[…] bbPress » Blog (tags: wordpress) […]
[…] Most olvastam feedolvasómban a hírt, hogy lehet egyszerűen integrálni a bbpress forumainkat wordpress blogunkba. […]
[…] BBpress integrato in WordPress per chi non lo sapesse, BBpress un motore per forum, gratuito, scritto dall’autore di WordPress usando praticamente lo stesso codice. diciamo che una derivazione forummistica. Sebbene gi in passato fosse possibile condividere gli utenti, tramite qualche ritocchino al codice e/o al database, ora i due prodotti sono integrabili nativamente https://bbpress.org/blog/2006/09/simp…ith-wordpress/ Via Tambu __________________ Sono un e Non perderti il Convegno GT sul SEO & SEM Ci saranno i migliori professionisti, con argomenti davvero innovativi […]
Is it always necessary to have a SQL backend for this wonderful blogs software?
I would suggest text files as a backend. Please can you write this kind of software?
Regards.
[…] bbPress integration with WordPress […]
I love you guys
[…] bbPress is from the same folks that make WordPress. So integration with WordPress should be easy. They just (Oct. 2006) released the first version of bbPress and my testings so far have been bug-ridden. I’m sure the problems will be worked out. Integration Instructions and the bbPress support forum. […]
[…] “Simpler integration with wordpress” […]
the problem with this is that the instructions are so bad really horrible… anyways i will try it
[…] that looks sweat, im checking out bbpress now, its from the developers of wordpress. bbPress Simpler integration with WordPress __________________ MediaSwim.com […]
[…] 这篇文章最早发布在bbPress博客上,题目是Simpler integration with WordPress。 […]
Yeah, really geeky directions here that only another geek could follow.
i’ve already used bbpress here…. http://www.speedytown.com/forum/garamdunia/ and it’s easy to manage … many thanks to you..
it’s seem to be next big thing, for all forumer … switch your forum to bbpress !!!!
“As always, config-sample.php has a couple hints.”
Please, the link is missing a slash.
To get it working with WPMU i had to add the following lines to config.php, after $bb->wp_xxx settings:
if ( isset( $bb->wp_table_prefix ) ){
$bb->usercookie = ‘wordpressuser’;
$bb->passcookie = ‘wordpresspass’;
}
Because WPMU does not use HASH in its COOKIES.
[…] Simpler integration of bbPress with WordPress […]
Anybody who is looking for “more” integration of wp with bb, check out this article:
http://www.adityanaik.com/integratepress-part-i/
[…] community site, WordPress and bbPress, all holding hands and skipping through a field of daisies. here are instructions on how to achieve such a […]
I use WP and BB with german language! If I include wp-blog-header.php in the configuration file (config.php) of bbpress, the following error occurs:
Fatal error: Cannot redeclare class streamreader in /homepages/.../www/forum/bb-includes/streams.php on line 26
If I uncomment the lines 122 + 123 in bb-settings.php:
// include_once(BBPATH . BBINC . ‘streams.php’);
// include_once(BBPATH . BBINC . ‘gettext.php’);
No error occurs … but the forum is in english!
I use WP 2.3.3 and bbpress 0.8.3.1
Is there a documented way to fix this?
cu, helpy