On reddit ))))) Are these rumors?
Okay, what’s the best way integrate bbpress with Guttenberg’ blocks today?
Only shortcodes or some other method…
I’m inserting a tracker shortcode into the main page.
However, I read that shortcodes are already outdated and work quite slowly.
What is the shortcodes alternative ?
Is there a more modern way to paste Guttenberg blocks?
and indeed on my profile on this site as
xvcxvczvzc
Is there any update on this thread, looking to achieve exactly the same by adding a Locked / Closed tag (icon) when a topic is closed ?
I have already used the code to ensure text does not turn Grey, so just looking to add some form of symbol so forum users can see topic thread has been closed
Thanks
BTW – for reference for others, code to stop Closed Topics text changing to Grey is …
#bbpress-forums .status-closed,
#bbpress-forums .status-closed a {
color: #000 !important;
}
Hello everyone! I have a problem with one topic and I don’t know what to do. That specific topic have 3 replies(2 from admin and 1 from the user that post it). If I enter in admin I can see those replies, if I enter in db I also cand see them, but on the frontend is empty. Firstly I thought all the replies are hidden but they are not render on the frontend. I watched on other topics and everything works fine. What can it be? Thank you!
If I put
`
$a = array(
‘post_type’ => ‘reply’,
‘post_parent’ => bbp_get_topic_id()
);
$b = get_posts($a);
var_dump($b);
`
On others topics I can see the replies but on that one is an empty array
2nd issue – put this in your custom css
.archive-description {
display : none ;
}
3rd issue
bbp style pack
Apologies, I’ve been tied up in a paid project, and this had slipped from my memory.
The actual code that does the work is a few lines, but it needs wrapping in lots of checks and stuff that limits, but I’m back looking at it now š
which has a set of templates (or you can easily create your own)
if you create a template and call it ‘bbpress.php’ then this will be used by bbpress.
see
Step by step guide to setting up a bbPress forum – Part 1
section 8
Hi all,
I am using Thrive Theme Builder, which has a set of templates (or you can easily create your own) that you can apply to different pages, etc. One nice feature is that they are “smart” in that you can set your theme colors and then if you change them, they’ll change on all of the pages in your site that use the smart templates.
It’s easy to specify which Thrive Theme Builder template to use for pages that show up in the wp Pages list. However, BBpress forum pages seem to be generated on demand. Right now, if I click on a forum, it us using a random (but probably the first alphabetical) template (the default “Audio post”). Which needless to say, is not what I want and is ugly to boot.
Is there a way to specify which Thrive Theme Builder template to use for these pages? I am not a coder (at all) and I’m highly leery of poking around with php files and so on, especially as they might get overwritten or broken by wp or Thrive or BBpress updates down the line. So what I really want is a setting that says, “choose this Theme Builder template for the forum pages.”
Thanks!
If these are the widget and shortcode warnings, then if you have read these tabs, you will know what to do.
If thus still puts you off, then sorry not much more I can do.
No worries I took 5 years of night classes in Web Development, HTML 5, CSS and PHP. I don’t remember much so that’s why I asked. I’ll have to pull out my books and see if I can remember anything. š I’ll also need to get a code checker plugin as I know how frustrating it can be if the code is not written and or spaced correctly.
Users are asking for total post views. I have no idea why but thought Iād ask if its a setting. If not were do I go to ask for code writing help.
š The problem is that I’d have to work out how to do it first !! so lots of code searching.
So a bit like you wanting some hints on how to solve a crossword clue – until I’ve solved it, I can’t help you and then I might as well give you the answer š
I’d suspect it is to do with resetting globals
best offer I can have is download the bbp_style_pack plugin, and navigate to /includes/shortcodes.php
the bsp-display-topic-index does topics within a page, and line 34 is a link to the query which filters these to the settings.
so if you copied that function and all it’s sub functions, renamed them all to prevent conflict, and then if you used the guts of bbp_get_user_topic_subscriptions to replace the query, that might get you close.
Once done for topics, then you could re-write for forums.
Best I can do
I’m not necessarily looking for someone to write out the code for me. I’m just looking for some general direction on how to get it done. Any links to other resources would be super valuable.
thanks, sorry I don’t always get enough brain time to go back through a topic.
hmmm…code would take a while to work out, beyond free help from me, sorry.
I actually don’t have much written as it wasn’t doing squat at the time! Lol. And it’s not a true Gutenberg block, it’s just an ACF block that pulls in some PHP. Really what I tried most was using
<?php if ( bbp_get_user_forum_subscriptions() ) : ?>
<?php bbp_get_template_part( 'loop', 'forums' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'feedback', 'no-forums' ); ?>
<?php endif; ?>
However, when displaying that content within any standard page and passing the current user ID into bbp_get_user_forum_subscriptions()
, it only outputs a single forum subscription.
can you give us the code for your custom block please
Hi,
I’m receiving this error 1-2 times per day like clockwork:
Current plugin: bbPress (version 2.6.9)
PHP version 8.1.6
Error Details
=============
An error of type E_ERROR was caused in line 33 of the file /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php. Error message: Uncaught TypeError: register_shutdown_function(): Argument #1 ($callback) must be a valid callback, class BBP_Converter_DB does not have a method "__destruct" in /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php:33
Stack trace:
#0 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-db.php(33): register_shutdown_function(Array)
#1 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-base.php(150): BBP_Converter_DB->__construct('site_db', '&9Ah58fa', 'site_db', 'localhost')
#2 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/classes/class-bbp-converter-base.php(104): BBP_Converter_Base->init()
#3 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/converters/phpBB.php(24): BBP_Converter_Base->__construct()
#4 /home/site/public_html/wp-content/plugins/bbpress/includes/admin/tools/converter.php(94): phpBB->__construct()
#5 /home/site/public_html/wp-content/plugins/bbpress/includes/users/functions.php(982): bbp_new_converter('phpBB')
#6 /home/site/public_html/wp-includes/class-wp-hook.php(307): bbp_user_maybe_convert_pass('')
#7 /home/site/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#8 /home/site/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#9 /home/site/public_html/wp-content/plugins/bbpress/includes/core/sub-actions.php(265): do_action('bbp_login_form_...')
#10 /home/site/public_html/wp-includes/class-wp-hook.php(307): bbp_login_form_login('')
#11 /home/site/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#12 /home/site/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#13 /home/site/public_html/wp-login.php(518): do_action('login_form_logi...')
#14
thrown
Hi
I am now using the [BBP-STATS] shortcode and am trying to adjust the below code so that instead of ‘Forum Members’ being position higher than the $stats[‘user_count’] value presented, I am looking for code adjustment that will place $stats[‘user_count’] to the Right and inline with ‘Forum Members’
Currently;
Forum Members
xxxx
Looking to achieve;
Forum Members xxxx
Code currently is …
—-
<dt><?php esc_html_e( ‘č·Æ Forum Members’, ‘bbpress’); ?></dt>
<dd>
<?php echo esc_html( $stats[‘user_count’] ); ?>
</dd>
—-
Any guidance most welcomed
something (not bbpress) is using a filter to call this function.
so you’d be looking for a hook that looks kinda like this
add_filter( ‘bp_notifications_get_notifications_for_user’, ‘xxxxxxxx’, 10, 5 );
or some code directly calling ‘bp_notifications_get_notifications_for_user’
Both of those should pass 8 arguments, but are only passing 5 – hence the issue.
it is not bbp-private-groups
if you really want to track it down, then use FTP to transfer the wp-content directory of your site to your PC.
then download and install notepad++ and use the search/find in files option to find bp_notifications_get_notifications_for_user
in wp-content
that should get you to options where it is called
Hi, the error codes were found in my files in the back end/ftp. The error email is only sent to me while bbpress is activated. It has been hard to find out what is causing this. I tried deactivating youzify as well as buddypress. So far no more error emails have been received but I’m at a loss as to where it’s coming from exactly and how to correct it. My site needs these 3 plugins to function as well as the bbpress private groups plugin I have. My only theory is that the privacy function is conflicting with the notifications for some reason but like I said, it’s hard to pinpoint. My host is unsure and said to try asking bbpress. Maybe someone has a similar issue? I’ll keep researching and if I find an answer, I’ll post it here.
thanks, I had read your original question as ‘new topic’ not ‘unread post’ – sorry
yes there is a bug, but this will only add a ‘mark as read’ button in any case. I’ll fix the bug shortly.
There is no ‘new posts’ button, I simply inherited the code for this functionality, and I don’t plan to work further on it.
Further info update:
Hi, after doing further testing, I’m still getting an error. I deactivated youzify. Then, I deactivated bbpress and buddypress but still getting an error. I am not too familiar with the files and coding but I opened the files where the errors are indicatd in the above error message I posted. If anyone is familiar and sees an error, I would really appreciate the heads up. Probably a long shot but thought I’d try. Thanks!
First file:
An error of type E_ERROR was caused in line 62 of the file /home/advance1/public_html/wp-content/plugins/bbpress/includes/extend/buddypress/notifications.php. Error message: Uncaught ArgumentCountError: Too few arguments to function bbp_format_buddypress_notifications(), 5
this is the code showing in the above file currently:
Line 62-6 :
function bbp_format_buddypress_notifications( $content, $item_id, $secondary_item_id, $action_item_count, $format, $component_action_name, $component_name, $id ) {
// Bail if not the notification action we are looking for
if ( 0 !== strpos( $component_action_name, ‘bbp_new_reply’ ) ) {
return $content;
}
_______________
The code found in this file: passed in /home/advance1/public_html/wp-includes/class-wp-hook.php on line 307:
line 303: // Avoid the array_slice() if possible.
if ( 0 == $the_[‘accepted_args’] ) {
$value = call_user_func( $the_[‘function’] );
} elseif ( $the_[‘accepted_args’] >= $num_args ) {
line 307–> $value = call_user_func_array( $the_[‘function’], $args );
} else {
$value = call_user_func_array( $the_[‘function’], array_slice( $args, 0, (int) $the_[‘accepted_args’] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
________________
Last error file:passed in /home/advance1/public_html/wp-includes/class-wp-hook.php on line 307
@jimmyt53 – thanks
I’ll try and work up some code in the next couple of days