Hi,
I’m trying to find out if its possible to have shortcode on a page that pulls keyword related posts from bbpress?
I’m wanting related posted from forums on a page.
Is this possible?
Hello and installed BBpress, and everything is ok. But when I use the Statistics shortcode. I get a column, annoying. Could someone tell me, what php file I can modify. To show me the data horizontally. And not vertical? … It would only be to change that code and for me it would be great.
My website is: https://www.libreriaurano.com/blog/
I tried enabling the “Alternate Forum template 1” in bbp style plugin.. but didn’t work.
That is possibly because your theme is overriding my templates.
Have you been to
dashboard>settings>bbp style pack>Topic/Not Working?
Hello,
How do I make sections in main Index forum page? I want to divide forums in multiple sections as mentioned below. I tried enabling the “Alternate Forum template 1” in bbp style plugin.. but didn’t work.
Example forum – https://mk3focusrs.club/forum/
I know we must insert a shortcode by creating different page for each forum section… but ain’t understanding how to… can someone help?
Thanks for the reply… I enabled the visual editor by adding some code and it worked 🙂
The bbp style pack plugin looks good.. will try installing it. Thank you 🙂
this will depend on what code the ‘paid forum’ platform has written.
Most forum platforms have importers, so check what is possible.
By the way this question is a bit like asking a Ford garage how to buy a Chrysler 🙂
easiest solution is this plugin, which lets you set all that
bbp style pack
or
bbPress Styling Crib
Shortcodes
and to customise and style bbpress try
bbp style pack
i want to show forums on my own theme but i don’t know how. does bbpress provide shortcodes?
Hi Robin, Oddly enough the Subscribed forums is the only chunk that has issues with this setup. It ignores the current user with the below code. See result at https://obeii.com/discussions-subscriptions/
<?php do_action( 'bbp_template_before_user_subscriptions' ); ?>
<?php if ( bbp_is_subscriptions_active() ) : ?>
<?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
<div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
<h2 class="entry-title"><?php _e( 'Subscribed Forums', 'bbpress' ); ?></h2>
<div class="bbp-user-section">
<?php $user_id = get_current_user_id() ; ?>
<?php if ( bbp_get_user_forum_subscriptions($user_id) ) : ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php else : ?>
<p><?php bbp_is_user_home() ? _e( 'You are not currently subscribed to any forums.', 'bbpress' ) : _e( 'This user is not currently subscribed to any forums.', 'bbpress' ); ?></p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_user_subscriptions' ); ?>
untested, but try
<?php do_action( 'bbp_template_before_user_topics_created' ); ?>
<div id="bbp-user-topics-started" class="bbp-user-topics-started">
<div class="bbp-user-section">
<?php $user_id = get_current_user_id() ; ?>
<?php if ( bbp_get_user_topics_started($user_id ) ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<p><?php bbp_is_user_home() ? _e( 'You have not started any topics.', 'bbpress' ) : _e( 'This user has not started any topics.', 'bbpress' ); ?></p>
<?php endif; ?>
</div>
</div><!-- #bbp-user-topics-started -->
<?php do_action( 'bbp_template_after_user_topics_created' ); ?>
This sets the user up as current user
I’m customizing my buddypress/bbpress user pages to be taken out of their traditional framework and placing that data on indvidual pages. However, when I do this the code has issues recognizing the current user and automatically ignores the logged in user. Does anyone know how to resolve this issue?
URL: http://obeii.com/discussions-topics-started/
CODE: (topics started)
<?php do_action( 'bbp_template_before_user_topics_created' ); ?>
<div id="bbp-user-topics-started" class="bbp-user-topics-started">
<div class="bbp-user-section">
<?php if ( bbp_get_user_topics_started() ) : ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php bbp_get_template_part( 'loop', 'topics' ); ?>
<?php bbp_get_template_part( 'pagination', 'topics' ); ?>
<?php else : ?>
<p><?php bbp_is_user_home() ? _e( 'You have not started any topics.', 'bbpress' ) : _e( 'This user has not started any topics.', 'bbpress' ); ?></p>
<?php endif; ?>
</div>
</div><!-- #bbp-user-topics-started -->
<?php do_action( 'bbp_template_after_user_topics_created' ); ?>
that code alters the names, but doesn’t help me in the ‘status legend’ – how is that legend created ?
Hello @robin-w, this is the code
add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
function ntwb_bbpress_custom_role_names() {
return array(
// Keymaster
bbp_get_keymaster_role() => array(
'name' => 'Amministratore',
'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
),
// Moderator
bbp_get_moderator_role() => array(
'name' => 'Moderatore',
'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
),
// Participant
bbp_get_participant_role() => array(
'name' => 'Utente',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
),
// Spectator
bbp_get_spectator_role() => array(
'name' => 'Visitatore',
'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
),
// Blocked
bbp_get_blocked_role() => array(
'name' => 'Bannato',
'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
)
);
}
you will need to post the code you put in your functions file that does the status legend
it is not good practise to amend bbpress (or any plugin) files.
The code should go in the custom css area of your there if it has one, or via a plugin such as https://en-gb.wordpress.org/plugins/simple-custom-css/
for the threads are, the simplest would be to use my style pack plugin
bbp style pack
and change the roles in
dashboard>settings>bbp style pack>forum roles
for your specific area, we would need the code you added in your functions file, but that should be able to then use the plugin settings above
Hello BBPRESS community,
I really want to change color of my usergroups in my forum made by bbpress.
I have the standard role (keymaster, moderator, blocked ecc) but with names modified by editing the file functions.php in my theme folder.
Now I would like to change the color in the status bar and in the topic/threads, example Administrator in the red, moderators in blue ecc.
I tried a insert this code in bbpress/templates/default/css/bbpress.css:
.bbp-author-role-keymaster {
background:blue;
color:white;
padding:0 5px;
}
but it does not change anything, why?
I want to change color here
View post on imgur.com
and in threads/topic discussion.
How I do?
Thank you very much.
Got an error when the user no longer exists.
Edited your code, this one doesn’t give an error and hides the PM link:
function ntwb_bbp_bp_pm() {
if(function_exists('bp_send_private_message_link') && is_user_logged_in() ) {
global $bp;
if ($bp->loggedin_user->id !== bbp_get_reply_author_id()){
$user = get_userdata( bbp_get_reply_author_id() );
if ( !empty( $user->user_nicename ) ) {
$user_nicename = $user->user_nicename;
$compose = bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user_nicename;
?>
<div class="forum-pm"><a href="<?php echo $compose ?>" title="Private Message">Private Message</a></div>
<?php
}
}
}
}
add_action( 'bbp_theme_after_reply_author_details', 'ntwb_bbp_bp_pm' );
Thank you very much for your code shpitzyl.
Hey, this is a bit of a unique situation, so I’m not sure how much you’ll be able to help. We had a bbPress forum which we closed in 2015. The “topics” we migrated to a custom post type so that we could keep them published, but without the forum framework.
Recently, we’ve decided to re-open the forums on a new site. I exported the Forums, the Topics (which I switched back to the “topic” custom post type), and the Replies. We’re having two issues:
1) The topics are not longer associated with their respective forums. Same for the replies with their topics. I know we can manually re-associate them, but there are hundreds of topics and replies. I’ve tried the Repair tool under the Tools menu, but it didn’t fix anything. Are there any other options?
2) Additionally, the replies are not appearing in admin at all. I can see that there are 300+ published replies but where the list should be, I instead get this fatal error:
Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4096 bytes) in <b>xxxxxx\wp-includes\class-wp-hook.php</b> on line <b>279</b>
Any help on either of these would be much appreciated. Thanks!
Hi @pauldlb
Try this… Paste the follow code into function.php (Appearance – Editor – Functions.php)
/* Remove SideBar From bbPress Profiles and Topics*/
function disable_all_widgets( $sidebars_widgets ) {
if ( function_exists('is_bbpress') ) {
if (is_bbpress()) {
$sidebars_widgets = array(false);
remove_all_actions('bp_register_widgets');
unregister_sidebar( 'bp_core_widgets' );
}
}
return $sidebars_widgets;
}
add_filter('sidebars_widgets', 'disable_all_widgets', 1, 1);
Checkout the phpBB converter, it’s one of the best example implementations.
Use _bbp_old_topic_id to grab your old topic id:
https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/phpBB.php#L183
p.s. The above phpBB converter uses bbPress 2.6 alpha which has many new refinements for the importer over bbPress 2.5, I’d suggest you use bbPress 2.6 alpha for any imports due to those improvements, it can be found here https://bbpress.org/download (bbPress.org and wordpress.org both use bbPress 2.6)
I get the error message “Oh bother! No topics were found here!”. I have installed bbpress and working on a divi theme. My shortcode for forum works but not my topics or index short code and I get this error. https://motionspecificrelease.ca/msr-community/
tools.php
function bbp_admin_repair_user_favorites() {
643 $values[] = "('{$user->user_id}', '{$key}, '{$favorites_joined}')";
Should be
function bbp_admin_repair_user_favorites() {
643 $values[] = "('{$user->user_id}', '{$key}','{$favorites_joined}')";
You can put a default IP for all registered activity:
add_filter( 'bbp_current_author_ip', function() {
return '127.0.0.1';
} );
127.0.0.1 is the default ip in this case.