Been looking around about how to convert an old VBulletin forum into BBPress where all of the users in VB are already in WP. What I was planning on doing was processing the topics finding the WP user for the post and then adding it to BBPress.
Only there doesn’t seem to be an API type widget to add a post, is there a bit of a hint somewhere as to what I need to do that will let me add the topics (as topic or reply) so that I can do it diresctly if necessary?
Thanks
Larry
Robin, Yes – I’ve dug pretty deep myself and it is all pretty complicated.
I’ve tried the action you provided and it does not do anything different, unfortunately.
Topics
Earlier – I did try “hacking” (editing bbpress core plugin code) and changing the redirect as you did here with the hook. But I could not get it to stay on the homepage then either.
Hm. Maybe its not possible? I coudlnt find the exact code where it was happening. I thought it was inside the bbp_favorites_handler() function located here: bbpress/includes/users/functions.php line 430 Looks like youre using that hook on line 481 (bbp_favorites_handler).
I wonder if it has to do with either of these actions:
template_redirect
bbp_template_redirect
I tried this modified version of your hook code:
add_action( 'bbp_favorites_handler', 'tcdf_redirect_to_home_page' , 99, 1) ;
function tcdf_redirect_to_home_page ($success) {
if ( true === $success && (is_front_page() || is_home() || is_page(2)) ) {
$redirect = home_url() ;
wp_safe_redirect( $redirect );
// For good measure
exit();
}
}
No luck. đ
Thank you for taking a look Robin.
Below is the entire block of code for the post block.
The lines youll be concerned with are 76-80 and 84-93. But ultimately it is line 92 <?php bbp_user_favorites_link($fav_args); ?>
<?php
/**
* BuddyPress topic "query"
* Show grid of all topics inside "ul.container"
* @link http://hookr.io/plugins/bbpress/2.5.9/functions/bbp_has_topics/
*
*/
$topic_id = bbp_get_topic_id();
$forum_id = bbp_get_topic_forum_id($topic_id);
$date = bbp_get_topic_post_date($topic_id,true);
$time = reformat_bbp_post_time($date);
$title = bbp_get_topic_title();
$content = strip_tags(bbp_get_topic_content());
$content = trim(preg_replace('/^[ \t]*[\r\n]+/m','',$content));
$content = preg_replace('/(Attachments:).*$/','',$content);
$content = preg_replace('/(This topic was modified).*$/m','',$content);
$excerpt = getSummary($content,186);
$forum_title = get_post_field( 'post_title', $forum_id, 'raw' );
$forum_link = bbp_get_forum_permalink( $forum_id );
$user_id = get_post_field('post_author', $topic_id);
$avatar = get_avatar( $user_id, 30 );
$author_name = esc_html( get_the_author_meta( 'display_name', $user_id ) );
$voice_count = bbp_get_topic_voice_count($topic_id);
$voice_label = $voice_count === 1 ? 'voice' : 'voices';
$reply_count = bbp_get_topic_reply_count($topic_id);
$reply_label = $reply_count === 1 ? 'comment' : 'comments';
$image_size = 'post-featured';
// get topic post featured image
$src = wp_get_attachment_image_src( get_post_thumbnail_id($topic_id), $image_size);
$imgsrc = get_the_post_thumbnail($topic_id) != '' ? $src[0] : '';
$image_type = 'img';
$has_image = true;
// attempt to get the file attachment
$attachments = d4p_get_post_attachments($topic_id);
$attachment_url = wp_get_attachment_image_src( $attachments[0]->ID, $image_size);
$attachment_url = $attachment_url[0];
$cn = d4p_topic_attachments_count($topic_id);
// if its empty, set src as attachment url
if ($imgsrc == '' && !empty($attachment_url)) {
$imgsrc = $attachment_url;
$image_type = 'bg-img attachment';
}
// if its still empty, set src as first image found in the post
if (empty($imgsrc)) {
/**
* catch_that_image()
* Gets the first image in the body of the post
* defined in /library/custom-theme-functions.php
*/
$imgsrc = catch_that_image($title,true);
if (empty($imgsrc)) {
$has_image = false;
$image_type = 'none';
} else {
$image_type = 'bg-img catch';
}
}
$is_ss = bbp_is_topic_super_sticky() ? 'super-sticky' : 'not-super-sticky';
$bgcolor = get_post_meta( $topic_id, 'sticky_post_color', $single = false );
$bgcolor = (!empty($bgcolor)) ? $bgcolor[0] : '';
if (!empty($bgcolor)) {
$image_type .= ' color-'.$bgcolor;
}
// gold count
$gold_count = bbp_get_topic_favoriters($topic_id);
$gold_count = count($gold_count);
$before_html = '<span class="gold-count">'.$gold_count.'</span>';
$fav_args = array('before' => $before_html);
?>
<li class="fourth a <?php echo $image_type; ?>" data-id="<?php echo $topic_id; ?>" data-userid="<?php echo $user_id; ?>" data-sticky="<?php echo $is_ss; ?>">
<?php if (!is_user_logged_in()) : ?>
<span id="favorite-toggle">
<?php echo $before_html; ?>
<span id="favorite-<?php echo $topic_id ?>" data-tooltip="Give Critter Gold">
<a href="#" class="favorite-toggle" data-topic="<?php echo $topic_id ?>" rel="nofollow">Favorite</a>
</span>
</span>
<?php else : ?>
<?php bbp_user_favorites_link($fav_args); ?>
<?php endif; ?>
<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink(); ?>">
<figure <?php if($has_image) : ?> style="background-image: url('<?php echo $imgsrc; ?>');"<?php endif; ?> class="<?php if(!$has_image) { echo 'no-img'; } ?>">
<?php if ($has_image) : ?>
<img src="<?php echo $imgsrc; ?>" alt="<?php echo $title; ?>">
<?php else : ?>
<h3><?php echo $title; ?></h3>
<?php endif; ?>
<span class="meta-inside">
<span class="read">Read Post</span>
<span class="data">
<span class="replies"><?php echo $reply_count; ?> <?php echo $reply_label; ?></span>
</span>
<span class="author">Started By <?php echo $avatar; ?> <?php echo $author_name; ?></span>
</span>
</figure>
<!-- <a href="<?php echo $forum_link; ?>"><?php echo $forum_title; ?></a> | -->
<figcaption>
<?php if ($has_image) : ?>
<h3><?php echo $title; ?></h3>
<?php endif; ?>
<span class="meta">
<span class="category"><?php echo $forum_title; ?></span><span> | </span>
<?php /*
<span><?php echo $voice_count; ?> <?php echo $voice_label; ?></span> |
*/ ?>
<span class="comments"><?php echo $reply_count; ?> <?php echo $reply_label; ?></span> |
<time><?php echo $time; ?></time>
</span>
<?php if ($has_image) : ?>
<p><?php echo $excerpt; ?></p>
<?php endif; ?>
</figcaption>
</a>
</li>
It could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that deosnlt work, also deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Then come back
If you can – I’d try it with a standard theme (eg twentyxx) and no other plugins and confirm that it is a bbpress issue
bbpress just uses wordpress registration, so this should work for you
WP After Registration Redirect User Advanced
come back and confirm
At certain points searching/filtering/sorting in the admin for bbpress custom post types (topics, replies, forums) I get a white screen with the error “Invalid post type.” It appears in the URL that it might be resending the post type which is creating an array so in the url it says &post_type=array& which is throwing the error.
Example: https://mydomain.com/wp-admin/edit.php?orderby=modified&order=asc&s=Product+Releases&post_status=all&post_type=Array&_wpnonce=d255a43653&_wp_http_referer=%2Fwp-admin%2Fedit.php%3Forderby%3Dmodified%26order%3Dasc%26s%3DProduct%2BReleases%26post_status%3Dall%26post_type%3Dtopic%26action%3D-1%26m%3D0%26bbp_forum_id%26action2%3D-1&action=-1&m=0&topic-prefix=0&bbp_forum_id=18134&filter_action=Filter&paged=1&action2=-1
Is there any way to fix this? We are trying to sift through many many topics to do some edits on a forum that we are migrating and need better ways to find posts in the admin. Any input as to where to fix it or if it is even fixable would be greatly appreciated.
WP version: 5.0.3
bbPress version: 2.5.14
Site: https://corepointuc.wpengine.com (it’s locked down private but this is an admin issue)
Theme: Divi Child theme
Not sure if this is a bug so please let me know if I need to report it as such. (ie. trac ticket)
Thank you for any input or leads in the right direction!
Leslie
WP : 5.0.2
bbPress : 2.5.14
Theme : Custom (built with _S)
Hi everyone,
Im having some issues in my custom theme.
I have a custom register page where I put this code :
<?php echo do_shortcode( ‘[bbp-register]‘ ); ?>
The thing is, I don’t want the user to be redirected to my wp-login page after registration, for obvious security reasons.
I had a look to some codes but non of them fit to my issue.
Do someone have any idea ?
Cheers,
Chaaampy.
Hi,
i installed bbpress today on my wordpress site which have WordPress 5.0.3, bbpress 2.5.14. If i click on the Forum page in the admin panel it keeps loading forever. i tried reinstalling but still the same.If i try to create a new forum it keep loading for about 3 mins and then show this error:
â Create New Forum
“class=âhelp-tab-contentâ> Publish â You can set the terms of publishing your forum in the Publish box. For Status, Visibility, and Publish (immediately), click on the Edit link to reveal more options. Visibility includes options for password-protecting a forum or making it stay at the top of your blog indefinitely (sticky). Publish (immediately) allows you to set a future or past date and time, so you can schedule a forum to be published in the future or backdate a forum.
Any idea what is causing this error?
WordPress v5.0.3
bbPress v2.5.14
Im using the function bbp_user_favorites_link() on my homepage post content to show a favorite link icon in the upper righthand corner of the post image.
When you click it, it goes to the single topic page. The “like” gets liked or unliked but I want to remain on the homepage. i dont want to go to the single topic page when clicking that icon from the homepage.
https://forum.thecritterdepot.com/
Note: You cannot “like” when youre not logged in. But I made a dummy icon that tells you you need to log in when clicked.
I tried looking through all the bbpress “favorites” functions but couldnt figure out how to remove this behavior.
Thanks!
@Gregg: thanks a lot for your problem and solution description. I think I have the same issue (phpBB 3.1, current WordPress/bbpress)
WordPress-Datenbank-Fehler: [Unknown column 'users.user_website' in 'field list']
SELECT convert(users.user_id USING "utf8mb4") AS user_id,convert(users.user_password USING "utf8mb4") AS user_password,convert(users.user_form_salt USING "utf8mb4") AS user_form_salt,convert(users.username USING "utf8mb4") AS username,convert(users.user_email USING "utf8mb4") AS user_email,convert(users.user_website USING "utf8mb4") AS user_website,convert(users.user_regdate USING "utf8mb4") AS user_regdate,convert(users.user_aim USING "utf8mb4") AS user_aim,convert(users.user_yim USING "utf8mb4") AS user_yim,convert(users.user_icq USING "utf8mb4") AS user_icq,convert(users.user_msnm USING "utf8mb4") AS user_msnm,convert(users.user_jabber USING "utf8mb4") AS user_jabber,convert(users.user_occ USING "utf8mb4") AS user_occ,convert(users.user_interests USING "utf8mb4") AS user_interests,convert(users.user_sig USING "utf8mb4") AS user_sig,convert(users.user_from USING "utf8mb4") AS user_from,convert(users.user_avatar USING "utf8mb4") AS user_avatar FROM phpbb_users AS users LIMIT 0, 100
If you say you exported the phpBB Database, do you mean simply with phpmyamdin? But then what do I have to do, simply create a new one in phpMyAdmin and import this database? this I would understand, but how do I tell bbpress to use this database?
Thanks for your help!!
Best
Maxime
Hello,
I have a BBpress forum and a topic with question and answer. Users subscribe to notification topic when they answer or ask a question. Now, i would like to delete olds subcriptions to prevent user mark as spam notification (user who don’t use link in mail) and don’t use so many transactionals mails. How can i do that easily ?
Thanks
Hi, I know this is an old topic. Those days When I faced this problem and I wrote a plugin to solve this problem. Hope it will help someone else has the same problem.
bbpress dofollow
I have both events manager and bbpress installed
I tried to give participants any capabilities in events manager but it’s not getting saved. Any bbp_role doesn’t allow me to edit their events manager capabilities, but it works fine with other roles I create using Ultimate Member or User Role Editor, and the bbpress roles don’t show up in the Role Editor so I can’t fix that manually from there.
Any advice?
The post editor of bbpress is not fully displayed on mobile devices. WordPress version is 5.0 and bbpress version is 2.5.14.
I’ve tried different mobile devices and the problem remains. This is a recent problem, which has been normal before.

WP : 5.0.2
bbPress : 2.5.14
Theme : Custom (built with _S)
Hi everyone,
Im trying to build a custom tinyMCE menubar in my forums.
I disabled the text editor and get to a pretty nice ending, but I don’t know why, I just can’t display the “media” and the “emoticons” button.
Here is my code :
function bbp_enable_visual_editor( $buttons = array() ) {
$buttons[‘quicktags’] = false;
$buttons[‘tinymce’] = array(
‘toolbar1′ =>’bold, italic, underline, strikethrough, blockquote, bullist, numlist, link, unlink, cleanup, media, image, emoticons’);
return $buttons;
}
add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );
Other ones are working fine … Any idea ? Im also trying to build a custom spoiler button, without plugins, but I don’t know where to start either …
Cheers,
Champy.
I am trying to allow users to embed videos by using links such as Youtube. When I do so the videos appears but is cut off because the box is to small to fit the iframe that is added to the site when wordpress adds the embed code. You can see an example here: http://b67.3d8.myftpupload.com/no-shift/topic/messed-up-divorce/
I did some searching and found some CSS that doesn’t work either. Basically it adjusts the width but breaks on the height.
.bbp-reply-content {
overflow:hidden;
padding-bottom:56.25% !important;
position:relative;
height:0;
}
.bbp-reply-content iframe{
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}
Is there a way to make the WordPress auto embed code responsive in BBPress?
The admin bar at the top of the site…there are links to forums and information about the bbPress plugin.
I’m not sure what you mean by ‘remove the bbPress menu from the toolbar’ – whereabouts are you seeing this and what ‘menu’ are you seeing ?
Hi
i am new to bbpress in forum bbpress roles moderator has capability to edit forums but in my site i have moderator role but does not have access to edit forum i have even used advanced capabilties plugin no use, somebody help me please
Hi all, very new to this!
I have setup a bbPress forum and my front page has two separate search boxes (one on the top and one to the right)
Both of these searchboxes return search results for non-members (although they cannot click the search results once they appear) is there a way to remove search results for users who have not signed in/managed to find a way to our forum?
For those of us who don’t want to remove the admin bar, please can you tell us how to remove the bbPress menu from it?
Looking for the right solution…
We would like to create a social community site like facebook where members have profile pages and can post videos, pictures and such. Create and join groups and get push notifications for chosen content.
1ST PAGE – ENROLLMENT & INTRO VIDEO
1. Three minute intro video
2. MEMBERSHIP ENROLLMENT BUTTON:
Most important this will be a paid membership site with a pay to enter button. Emails provided in this sign up should integrate with mailchimp
2ND PAGE- POST ENROLMENT
Once they’ve entered we would like a landing page that has
1. A embedded live stream video player
2. A randomized video playlist player
3. A grid avatar list of our core contributors below these two players
4. Tabs up top to navigate to members profiles, groups and more
we welcome your suggestions. Thank you all so much in advance
1. Which version of WordPress are you running? WordPress 5.0.2
2. Did you install WordPress as a directory or subdomain install? Directory installation
3. If a directory install, is it in root or in a subdirectory? Root
4. Did you upgrade from a previous version of WordPress? If so, from which version? No Fresh Install 2 days ago
5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting. N/A
6. Which version of BP are you running? 4.1.0
7. Did you upgraded from a previous version of BP? If so, from which version? NO
8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones? BuddyPress, Google Analytics for WordPress by MonsterInsights, Jetpack by WordPress.com, OptinMonster API, WPForms Lite
9. Are you using a standard WordPress theme or customized theme? Tonic
10. Which theme do you use ? Tonic
11. Have you modified the core files in any way? NO
12. Do you have any custom functions in bp-custom.php? NO
13. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? NO
14. Please provide a list of any errors in your serverâs log files. https://codex.wordpress.org/Debugging_in_WordPress
15. Which company provides your hosting? Bluehost
16. Is your server running Windows, or if Linux; Apache, nginx or something else? Apache
17. Which BP Theme are you using? Tonic
18. Have you overloaded any BuddyPress template files. NO
19. Any other site customisations that might have a bearing on the issue? NO
Hello, please help
why i can upload 2.9mb photo and cannot upload 1.9 jpeg?
i get The image could not be uploaded. Please check that it is a valid JPEG, PNG, or GIF file and that the file size is not too large.
i was able to upload it in media library like admin, but on forum not.
bbpress 2.5.13
Hello.
I am have successfully setup bbpress using the “second” method.
My site is multi-language (en/he/ru) so I have a different page for each “forum” page so it has a different language. For example
site.com/en/forum <- English version.
site.com/he/forum <- Hebrew version.
Each of this pages has the “[bbp-forum-index]” tag, bbpress appears on the correct page language and I can see the translation is working.
The problem is that as soon as I click any link inside the bbpress, the language immediately switches to English.
How can I configure bbpress to maintain the language ?
I am using Polylang as the translation plugin. (WPML compatible)
Thank you.