Hi ,
I’m having a problem with the function php_e().
I use require_once(dirname(dirname(__FILE__)) . ‘/wp-blog-header.php’); to include wordpress functions into bbpress, the problem is, I think , that there is a conflict between php_e() wordpress function and php_e() bbpress function and it is impossible for me to translate my bbpress forum.
So how can I solve this problem and make bbpress use his own php_e() function and not the wordpress one ??
Thanks for your help.
I needed to put a writeable .htaccess containing “Options +MultiViews” in my bbpress root for “pretty permalinks” to work — there wasn’t one by default.
Perhaps your old install had one and you didn’t copy it over during the upgrade.
IPSource,
The short answer is you have to convert your WordPress theme to bbPress by hand.
I’m currently doing the same thing you’re trying to do on my WordPress blog with bbPress also. It pretty much means taking your WordPress theme and going through each file one by one and converting them to bbPress. So you have to strip out the WordPress tags and functions in the theme files and replace them with bbPress versions. There’s no list of equivalent tags, so translating them is just gonna take a lot of trial and error and testing.
Thanks for getting back to me and I will definitely look into that. But the problem I’m having is putting my forum actually onto my site.
I just want a button at the top next to “Home” on the navigation bar that says “Forum” and when you click on it, it takes you to my forum. I would prefer to keep the header and footer on it so that it looks like it’s actually in the site still.
Any suggestions???
The easiest way is to find and install an existing theme that exists for both WordPress and bbPress. For instance, K2 for bbPress is similar to the WordPress default theme. Here are some bbPress themes for you to check out.
Sorry I’m new and I tried to look around for this topic but I guess I’m not wording it right in the search.
I want to make BBPress a page on my WordPress site. I’ve installed both and they are both sharing information just fine. I just want to integrate it visually into my site.
So is there anyway that when you click “forum” on my Navigation bar that the forum would just show up in the window below?
Again, I’m pretty new to this so when I have to go in and start messing with code I get lost easily. I really would appreciate any advice or help you can give. Thank you.
I discovered another issue with this hack. If you write a new post in a new topic, after the submitting the form, you are redirected back to the forum’s front page, instead of the forum you were on. I spent some time digging around the get_post_link() related functions, and couldn’t figure out exactly what was going on. However, I was able to make this modification to the bb-post.php file to get it to redirect properly.
Paste this after line 43, in bb-post.php of bbPress 0.9.0.2
$link = str_replace('forums/', "forums/". $forum->$topic_slug, $link);
Hey Sam, thanks for making a ticket for this. I was able to query for topics within a date from directly from WordPress as well. Here’s something I wrote to merge “super sticky” bbPress topics into the WordPress loop. It’s a bit of hack, but it brings the “Promote to Front Page” functionality of Drupal into WordPress/bbPress:
<?php get_header(); ?>
<?php
//Put WordPress posts into an array
$wp_posts = $posts;
if (!is_single()){
//Retrieve first post of previous page (we need this post's date to query bbPress topics
$offset=$paged*$posts_per_page+$posts_per_page;
$first_post_of_previous_page = get_posts('numberposts=1&offset='.$offset);
//First set the start and end dates to limit the query to the bbPress table
$startdate=(date('YmdHis',strtotime($first_post_of_previous_page[0]->post_date_gmt)));
//If it's the most recent page, set end date to today
if ($paged){
$enddate=(date('YmdHis',strtotime($wp_posts[0]->post_date_gmt)));
} else {
$enddate=gmdate('YmdHis');
}
//Retrieve "Super Sticky" topics from bbPress tables
//This assumes your bbPress and WordPress tables are in the same database
$bb_topics = $wpdb->get_results("SELECT * FROM bb_topics WHERE topic_sticky = 2 AND topic_start_time BETWEEN $startdate AND $enddate ORDER BY topic_start_time DESC");
//Map bbPress topics to WordPress posts structure
foreach($bb_topics as $bb_topic){
$bb_first_post = $wpdb->get_results("SELECT post_text FROM bb_posts WHERE post_position = '1' AND topic_id = $bb_topic->topic_id", ARRAY_A);
$bb_post->ID = "forum_topic_".$bb_topic->topic_id;
$bb_post->post_author = $bb_topic->topic_poster;
$bb_post->post_date = $bb_topic->topic_start_time;
$bb_post->post_content = $bb_first_post[0][post_text];
$bb_post->post_title = $bb_topic->topic_title;
$bb_post->post_status = "publish";
$bb_post->comment_status = "open";
$bb_post->ping_status = $bb_topic->post_id;
$bb_post->post_name = "forums/topic/".$bb_topic->topic_slug;
$bb_post->post_type = "post";
$bb_post->comment_count = $bb_topic->topic_posts-1;
//add bbPress topic to WordPress posts array
$wp_posts[] = $bb_post;
};
//Create function to sort array of posts by date
function compare($x, $y){
if ( $x->post_date == $y->post_date )
return 0;
else if ( $x->post_date < $y->post_date )
return 1;
else
return -1;
}
//Sort array
usort($wp_posts,'compare');
}
?>
<div id="content-box" class="span-8">
<div id="content-area" class="clearfix">
<?php if ($wp_posts): ?>
<?php foreach ($wp_posts as $post): ?>
<?php setup_postdata($post); ?>
<div class="entry">
<div class="entry-header clearfix">
<div class="info span-2">
<a href="<?php the_permalink(); ?>#comments" class="comment-activity"><?php comments_number('<strong>Post comment</strong>', '<strong>1</strong> Comment', '<strong>%</strong> Comments' );?></a>
</div><!-- end info -->
<div class="content span-6 last">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div><!-- end content -->
</div><!-- end entry-header -->
<div class="entry-content clearfix">
<div class="info span-2 clearfix">
<p><strong><?php the_author() ?></strong><br />
<?php the_time('M j, Y'); ?>
</p>
<p class="share-this"><?php akst_share_link(); ?></p>
<p class="post-comment"><a href="<?php the_permalink(); ?>#respond">Comment</a></p>
</div><!-- end info -->
<div class="content span-6 last clearfix">
<?php the_content('Click to continue'); ?>
<p class="entry-tags"><?php the_tags('<strong>Posted in: </strong>', ', ', ''); ?> </p>
</div><!-- end content -->
</div><!-- end entry-content -->
</div><!-- end entry -->
<?php endforeach; ?>
<?php include (TEMPLATEPATH . '/navigation.php'); ?>
<?php else : ?>
<h2 class="page_header center">Not Found</h2>
<div class="entry">
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
</div>
<?php endif; ?>
</div><!-- end content-area-->
</div><!-- end content-box -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
I think that it needs more time to eliminate possible bugs… I defenively am going to use it! Thanks
Let me premise this by stating that I installed an “integrated” version of the upgrade (BTW, the instructions could be a LOT clearer on this process – not everyone is experienced with php).
I was planning on spending some time on this later, but on this subject (links), my original links were set to “Numeric …/forums/1”. After upgrading, links from my web sites to the bbPress section no longer worked and generated a 404 error. I looked at the links within the bbPress site and they looked fine. For instance, a “sticky” topic I link to from all my web sites is “http://www.masterdata.com/forum/bbpress/topic/62” (I copied the shortcut with a right click on the link). It looks correct, but it does not work. Not even within the bbPress section and certainly not from the outside coming in.
So I switched the setting on my “Pretty permalink type” to “None …/forums.php?id=1”. With this setting, everything once again worked. I left it this way, but these are definitely not “pretty” links. The link to the same topic is now “http://www.masterdata.com/forum/bbpress/topic.php?id=62”. BTW, “Name based …” links do not work either.
OK, that is the first issue. There are more and I will detail those tomorrow, each one in its own separate topic as suggested above.
Let me, however, compliment everyone who has been involved in this project and WordPress. Both efforts are truly beyond belief in terms of what you get by simply downloading some code from the internet. ABSOLUTELY EXCELLENT! So good, in fact, you spoil us to the point where we expect everything to be close to perfect at all times. That is a bit irrational and the experience with both programs should be graciously appreciated. Thank you for your work!
Best
L. Carhartt
It’s worth noting here that you can also override the database value in your bb-config.php file. Just in case anyone can’t directly access their database.
$bb->uri = 'http://example.com/bbpress/';
It could be a plugin sending whitespace when there is no user logged in.
@ mykes
I double checked, the latest stable version of WordPress MU uses the old password hashing and cookie types.
You can dumb down bbPress to work with that version of WordPress MU by using both of these bbPress plugins.
https://bbpress.org/plugins/topic/mouldy-old-cookies-for-bbpress/
https://bbpress.org/plugins/topic/md5-insecurity-for-bbpress/
In addition to the above, the following seem to work properly
Human Test for bbPress
Post Count Plus – Dynamic.Titles & More!
Correct me if I am wrong but the “theme editor” in WordPress is simply a remote file editor for templates. Doesn’t do anything special other than let you edit a file directly on your server without having to use FTP (or shell).
While it seems handy, if I am not mistaken it also requires you to chmod 777 your theme folder which is very dangerous on a shared server.
I suppose bbPress will get the feature eventually because it’s so very simple. I would guess it could be ported from the WordPress code in probably an hour.
You definitely need to post examples of bugs you encounter. There are numerous bug fixes in 0.9 vs 0.8
Perhaps you are simply encountering plugin incompatibilities?
“numerous link revisions” ???
How can your url’s change unless you disabled slugs or visa/versa? That much didn’t change in 0.9
I think it would be best to list the bugs you encounter and then fix them one by one. I can tell you that the developers are hard at work based on the traffic generated on the development list. But if they don’t know of the problems, they can’t fix them. So, please, list your problems in the forum, preferably one post per problem if they are unrelated, with a good subject for each problem.
Some problems undoubtedly have solutions that have already been incorporated into the trunk release. Some will be bugs that need to be addressed in trac tickets.
I upgraded from the previous .8 version to the new .9.0.2 version. After struggling to get it to work at all, it now seems to be running in a stable manner (?). I must admit, I am more than a little disappointed in this new version. It is full of bugs that must be worked around and require numerous link revisions from my various web sites to get to the proper pages.
There are so many bugs, I don’t know where to begin. If you want me to, I will begin to list them as encountered. If you do not reply to this post, I will assume your priorities are somewhere else other than smoothing out this version.
Thank you.
Lauren
Okay, I think I got it working.
I was able to fix the redirection issue by modifying the get_user_profile_link() function in the template-functions.php. I added the following line towards the end of the function, right before the last line of code in the function:
$r = str_replace('forums/profile/' . $user->$column , "profile/" . $user->$column, $r);
This is the full code:
function get_user_profile_link( $id = 0, $page = 1 ) {
$user = bb_get_user( bb_get_user_id( $id ) );
$rewrite = bb_get_option( 'mod_rewrite' );
if ( $rewrite ) {
if ( $rewrite === 'slugs' ) {
$column = 'user_nicename';
} else {
$column = 'ID';
}
$r = bb_get_option('uri') . "profile/" . $user->$column . ( 1 < $page ? "/page/$page" : '' );
} else {
$r = bb_get_option('uri') . "profile.php?id=$user->ID" . ( 1 < $page ? "&page=$page" : '' );
}
$r = str_replace('forums/profile/' . $user->$column , "profile/" . $user->$column, $r);
return apply_filters( 'get_user_profile_link', $r, $user->ID );
}
I noticed that if you did not install bbPress with WordPress cookie integration, then this hack will cause bbPress to always think you are logged out. I think it has something with it not being able to retrieve the cookie because of the path change.
However, if you have WordPress cookie integration enabled, then everything seems to work. Not exactly sure why. But I think it must be something to with the path that’s being set in the cookie.
If you have a WP profile (like the author archive or some other profile) you can redirect the bbPress profile using this hook:
//add_action('bb_init', 'profile_redirect');
function profile_redirect() {
if (is_bb_profile() && $_GET['tab'] != 'edit' && $_GET['tab'] != 'favorites') {
$user = bb_get_user($_GET['id']);
if ($user) wp_redirect("http://www.example.com/member/" . $user->user_nicename);
}
}
I did this using this plugin for WordPress profiles, so even users who don’t have published posts have a profile. It works but you miss the profile edit messages (like “your profile has been updated”).
Hi, i have a plugin that will support this soon 
The plugin is named Gaming Codes. It’s for WP, but i have a stripped down version for bbPress. I’ll post it here soon.
Uh oh, it looks like my bb-attachments is modifying other forms which makes no sense.
I’ll have to investigate this.
update: please try 0.1.1, see this post:
https://bbpress.org/plugins/topic/bb-attachments/page/2/?replies=38#post-1223
I think bbpress should have a theme editor like wordpress.