Both bbPress and WordPress have a very simple way of fetching data.
WordPress uses $wpdb
bbPress uses $bbdb
(the db part means database, very simple)
Then there’s the good old “get_results”. They both use that.
bbpress:
$results=$bbdb->get_results("mysql query goes here");
wordpress:
$results=$wpdb->get_results("mysql query goes here");
Many times you can use the same query in either bbpress or wordpress by just changing $bbdb to $wpdb or visa-versa.
Then you have to figure out what you are asking for.
Let’s use the really simple bbPress Topics table as an example. Unless you’ve customized your install, the Topics table is probably called bb_topics
Here are all the fields available inside of bb_topics
.
topic_id
topic_title
topic_slug
topic_poster
topic_poster_name
topic_last_poster
topic_last_poster_name
topic_start_time
topic_time
forum_id
topic_status
topic_open
topic_last_post_id
topic_sticky
topic_posts
tag_count
I’m not sure if this has been addressed elsewhere already or a plugin already exists but for novices that have even just a beginner’s knowledge of how php+mysql works I want to show you how easy it is to show bbPress info inside of WordPress and vise-versa.
You should NOT be using overly complex plugins like bbPress-Live or parsing RSS feeds if you have WordPress and bbPress sharing the same database but different tables. Instead, it’s a piece-of-cake to grab info from each other directly and display it. You don’t even need a plugin, you can code it right into your templates (as long as you know they will remain working together).
So I’ll give some examples here and then if anyone has questions feel free to ask.
bbPress doesn’t show actual time, but the elapsed time to prevent timezone confusion while internally tracking via gmt/utc time. If you insist on seeing accurate local time for your posts you might want to try the user timezone plugin.
https://bbpress.org/plugins/topic/user-timezones/
and
https://bbpress.org/plugins/topic/accurate-post-time/
Did you already figure this out?
They look very well matched.
You shouldn’t need a RewriteCond in that case, the RewriteRule can work without it if it’s simple enough.
If you are using the .htaccess inside of the /forum/ directory though, the above examples need to be trimmed without the forum/ part.
ie.
RewriteRule ^forum/faq
should actually be
RewriteRule ^faq
Only leave the forum/
part in there if you are using the .htaccess in the parent (webroot) folder.
WordPress is good for a few authors <-> many commenters, with high quality authors.
bbPress is good for many authors <-> many commenters.
If you want *everyone* to have their own blogs then you want wpmu.
If you want your own social network then you probably want to wait a tiny bit longer for buddypress.
You put it in the folder that you want your forum index to be, most people usually make a folder called /forums/ or /forum/ unless you want it to be as the root index of the whole website (for example if the main site itself is the forum).
Another alternative is to make a subdomain like forums.domain.com, I prefer this way personally. Then just put the files into the root folder where the subdomain points. Hope this helps.
To get bbPress you work you might be able to go into bb_config.php
and edit this line
$bb_table_prefix = 'bb_';
and make it say
$bb_table_prefix = '';
(that’s just two single quotes together with no space)
Not sure if it would work and it’s bad idea to keep running like that.
Using phpMyAdmin, you could try to rename all the tables to bb_users, bb_usermeta, etc.
But do you see your WordPress tables? You have a bigger problem is there’s wp_users and wp_usermeta and then you don’t see topics forums posts tables.
You may have installed bbpress into a new database instead of the old wp database?
Copy all the names of the tables in the left hand site of phpmyadmin here so we can see better what’s wrong.
It looks like you have an extra db in there. So if your database is database, your tables are actually named database.dbusers, for example?
The default would be database.bb_users.
To change the table prefix your bbPress installation uses, there is a value in bb-config.php called $bb_table_prefix which is normally set to “bb_”. What is the value in your file?
To recover, you might want to rename all your tables using a prefix, then add that prefix to bb-config.php for $bb_table_prefix
. I think that would work.
I think leaving the tables with no prefixes is a bad idea, because if you install other software in the same database, you might have a conflict with similarly named tables. Not every application behaves well and allows a table prefix. oscommerce used to do that (no table prefix, just tables with normal names that would step all over any existing similarly named tables.)
I am also curious as to when a converter would be available. The only thing holding me back from switching to bbPress is the lack of an easy way to import a phpBB3 database into a bbPress installation.
I have an idea for a simple site, but I’m driving myself nuts deciding between bbPress and WordPress. On the front page of the site, I want to be able to add my own content, but also allow readers to post their own experiences and stories. I then want other users to be able to comment on those stories, and rate them. Simple idea, been done before.
Is this better done with WordPress, following this example:
http://creativebriefing.com/how-to-use-wordpress-to-build-a-website-with-user-generated-content/
or WordPress and TDO Mini Forms
or bbPress with a customized front page?
thanks for any insight.
Michael
Looks like you’re close already. You need to do some CSS work in style.css for your bbPress template. Just take one thing at a time. It’s probably paths to images and things like that that need to be adjusted.
I just thought to check the address bar to see if the proper reply number is being appended, and it is. So, the URL looks like:
https://bbpress.org/forums/topic/column-widths-topic-posts-last-poster-freshness?replies=2#post-21105
But there is no #post-21105 (my reply) on the page. It’s just not there yet. Odd.
If you substituted db for the name of your database in your example, then it appears you have no table prefix at all for your bbPress tables, or you used db with no underscore where the first db is the database name you edited out, then db is the table prefix, but it really doesn’t look like one. If you use phpMyAdmin to look at the database, you might find that you have bbPress tables there, but with no prefix or a db prefix (not database name, but just two characters db before teh table name). So, you’ll have your wp_ tables, then you will have a bunch of tables with names like:
dbusers
dbuser_meta
dbtopic
Can you look at the database and take a screenshot of the table structure and host that somewhere then link to it here? Maybe with that info, someone will be able to figure out what you did.
The Revolution themes are pretty nice and a lot of work have gone into them. I doubt you will find anything for bbPress that you can easily edit to make it look the same.
Brian Gardner has a bbPress theme for Revolution here:
http://www.briangardner.com/blog/revolution-finally-meets-bbpress.htm
Or, you can find people who are familiar with Revolution and can create a theme for you, here:
http://www.revolutiontheme.com/support/viewforum.php?f=15
Not exactly what you’re looking for, but the quality of those Revolution themes is so high, you’re going to have a hard time finding something for bbPress of similar quality.
You could also start with one of the bbPress Raw themes:
http://bbpressraw.com/bbpress_blank_themes/
Just a question:
do you include your wp functions in bbpress? I see calls to wp functions in several bb functions (also in bb_insert_topic and bb_insert_post) and I can imagine that if you dont include wp functions in bbpress, that these statements fail.
I cannot include wp functions with the
$bb->WP_BB = true;
if (file_exists('../wp-blog-header.php'))
require_once('../wp-blog-header.php');
else
if (file_exists('../../wp-blog-header.php'))
require_once('../../wp-blog-header.php');
part because then my forums don’t work. I can’t access my bb-admin pages and bbpress doesn’t recognize my users.
ok…
http://holstein.it/bbpress/
http://holstein.it/
Now bbPress and WP are integrated…how to customize look? Is there a way to have bbPress looking like WP theme?
I don’t think any bbpress installation are compatiable with WP 2.6.5 e.g the installs are:
WP 2.5/1—- bbPress 0.9.2
WP 2.6.3 — Unstable bbPress Alpha 1.0
It takes care of the problem of bbpress users from MU being set as Inactive. It’ll make them a member instead.
I used my keymaster. I think it logged in. When I go to http://kauaihypnosis.site90.com/bbpress/bb-login.php and use my user name and the correct password, it doesn’t let me log in. Not sure what the heck is going on. Mind you I’m using the unstable version.
So I got my bbpress theme looking great. The only problem is that I can’t login to my BB Admin. I am using the latest unstable version with wp 2.6.5. I used the require_once (wp_blog_header.php) trick then added get_header/get_footer to the necessary files in my bbpress theme.
Yes, using those functions will bring the header and footer over. Whether or not they look like you want is up to you to decide. The functions will work, but your bbPress template needs to be setup to display the WordPress header/footer/sidebar properly.
As keymaster, at the bottom, you can [Close Topic] – is that what you mean?
Screenshot:
http://www.chrishajer.com/bbpress/close-topic.png
Chrishajer, whats going on. I’m attempting to get my bbpress theme to look like my wordpress theme. I’ve done what you said above (my-templates folder with the kakumei theme). Now what do I need to do? Do I need to use wordpress functions (then get_header & get footer)?
Thanks
Antonio
Hey everyone, hows it going. I’m trying to find out how to match my current wp theme to my bbpress theme. How can I accomplish this?
Thanks
Heres my wp installation
http://kauaihypnosis.site90.com/
and bbpress
http://kauaihypnosis.site90.com/bbpress