I tried the code on a test site and it appeared to work.
I updated the Track ticket.
Hi@dimitri333
Take a look at:
identify user with @
Regarding the (unofficial) code:
bbp Mentions Suggest
However, I think that you would have to add BuddyPress to your site to get this working. So it might not help you. I don’t think there’s anything you can do with bbPress alone.
I only use bbpress and no buddypress, is there a code or plugin for bbpress? TY❤️🔥
register_activation_hook(FILE, ‘bbpress_topic_scheduler’);
add_action(‘bbpress_daily_event’, ‘bbpress_close_old_topics’);
function bbpress_topic_scheduler() {
wp_schedule_event(time(), ‘daily’, ‘bbpress_daily_event’);
}
function bbpress_close_old_topics() {
// Auto close old topics
$topics_query = array(
‘author’ => 0,
‘show_stickies’ => false,
‘parent_forum’ => ‘any’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1
);
if ( bbp_has_topics( $topics_query ) )
while( bbp_topics() ) {
bbp_the_topic();
$topic_id = bbp_get_topic_id();
$topic_date = strtotime( get_post( $topic_id, ‘post_date’, true ) );
$forum_id = bbp_get_topic_forum_id($topic_id);
if ($topic_date < strtotime( ‘-5 hours’) && $forum_id == 9547 )
bbp_close_topic( $topic_id );
}
}
Ps: code add to functions.php
the code above should still be fine, I presume you have changed the
&& $forum_id == 1276
to the correct forum number?
In the BuddyPress profile bbPress subscriptions are listed. With each subscription there a little icon that looks something like [x]. It *appears* that this is intended to be used to cancel a subscription, but when you click on it nothing happens.
I’m a bit confused about where these bbP subscriptions in the BP profile come from. In otherwords I don’t know if they come from BP or bbP. I assumed it was BP but the BuddyPress people don’t seem to know what I’m talking about.
The [x] icon appears to take you to a path that looks like this:
https://mikeandtina.org/members/mike/forums/subscriptions/?action=bbp_unsubscribe&object_id=357&object_type=post&redirect_to=https%3A%2F%2Fmikeandtina.org%2Fmembers%2Fmike%2Fforums%2Fsubscriptions%2F&_wpnonce=37ad0686dc
So now I’m wondering of bbPress puts info about subscription on the BuddyPress profile, or if something else entirely is going on. If anyone can shed any light on this I’d appreciate it.
Mike
I have not tried it in cron, but a call to the function below should work
bbp_admin_repair_forum_reply_count()
and/or
bbp_admin_repair_topic_reply_count()
Sorry, all of bbpress works on topics belonging to forums.
you can have just one forum, and then have your ‘forum’ page with a shortcode of topics using
[bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]
Hi,
I would like to show in a page forum, my forums, members, subjects, answers… I can not arrive to see a shortcode
I have the last version of bbPress and WP members
Thanks for your help,
Best regards
Actually, in my case, the issue was that I was overriding the theme files and had removed this span. <span class="bbp-row-actions">
. bbPress must try ajax first, and if it fails, just redirect the page — and the JavaScript logic must look for that class name? Adding the span back, made the page behave as desired.
Hi
wordpress 6..0.2
bbpress 2.6.9
i want to let users edit their avatar with the Basic User Avatars plugin
i want to be edited in the profile edit page
forums/user/name/edit/
i tried to write this:
<?php echo do_shortcode(“[basic-user-avatars]”); ?>
in TEMPLATES/DEFAULT/EXTRAS/SINGLE-USER-EDIT.PHP
dont work
how can i do then
thanks
regards
wordpress 6..0.2
bbpress 2.6.9
Topic de prueba en CONSULTA DE REGLAS
Theme Avada
Hi
In replies, does not show any bbcodes toolbar as i thought it did.
Installed gdtools and gd attackment
How can i offer a toolbar for users?
for bbcodes or format and embeds
thanks
Regards
Hello,
I have just installed the latest version of bbPress, but on the forums page, I am seeing the following errors. The ‘Registered Users’ and ‘Forums’ part seems fine but the rest are not.
Here is the code from that section of the file:
<dt><?php esc_html_e( 'Forums', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['forum_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Topics', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['topic_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Replies', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['reply_count'] ); ?></strong>
</dd>
<dt><?php esc_html_e( 'Topic Tags', 'bbpress' ); ?></dt>
<dd>
<strong><?php echo esc_html( $stats['topic_tag_count'] ); ?></strong>
</dd>
Hi there,
i’ve got a Problem with my bbpress forum.
When I want to view a topic in the Frontend, then i stare at a blank page
After creating a new WordPress site and using the shortcode “[bbp-single-topic id=$topic_id]” it works.
So I can only view the Topic after creating a WordPress page for it.
Is there a Way WordPress creates automatic a Page for a new Topic, with the necessary Shortcode?
Maybe there is another solution for my problem.
I look forward to your replies and thank you in advance 🙂
Aloha. Somehow my installation of bbpress is mucked up big time. There are two of us who are WP administrators, but neither one is a ‘keymaster’, so we can’t do much. Right now we have no data / forums we wish to preserve, so a complete delete and reinstall would hopefully be the quickest and easiest way to move forward.
I’ve found this article on how to delete bbpress, but step two is: Go to Tools > Forums > Reset Forums. When I go to ‘Tools’ there is no link to Forums, so I can’t do this step. I’m guessing this is related to the fact that neither one of us is a keymaster and I have no idea how to restore keymaster permissions
Any help would be greatly appreciated.
Mahalo,
Harry Z
Wow that code is a lot more involved than I thought it would be. I’ll probably end up just using your plugin. Thanks as always! Do I need to send as text/html if I just want the correct line spacing or is there a way to fix that for plain text emails? Right now by default all the carriage returns get stripped by default, that’s really all I’m trying to fix. If I need to send HTML that’s fine but I have a hard time believing the default bbpress notifications should look like this
Hi, I’m having an issue where my forum notifications are not being formatted correctly. None of the spacing that exists in the default notification message exists in the resulting email, and I have confirmed that the message is being sent using the ‘text/html’ content type header. I added a <br>
tag to the notification email as a test as well, but it was sent in plain text and not rendered as a line break. Anything I should try?
only show if user is logged out
function bbp_goto_login_page() {
if (!is_user_logged_in ()) {
echo '<p><a href="/login"><div class="gotologin">You must be logged in</div></a></p>' ;
}
}
But you should be seeing the login automatically – what theme and other plugins are you using?
Hi, for some reason the login does not work on bbpress topic page.
I have this code in my functions.php file.
add_action ('bbp_theme_after_reply_form_content' , 'bbp_goto_login_page' ) ;
function bbp_goto_login_page() {
echo '<p><a href="/login"><div class="gotologin">You must be logged in</div></a></p>' ;
}
This is working, but not the way I want. I would like it to only show if user is logged out and it should be visible on the topic page where there is normally the login form.
Is there something like bbp_theme_after_topic_content?
Tried googling, but could not find anything similar.
for the furst two, add this to your theme custom css
.forum h1.page-title, .forum div.page-description p {
display : none ;
}
for the last, install this additional plugin
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Breadcrumbs
ok, I’ve found the problem, and this filter fixes
add_filter ('bbp_after_has_search_results_parse_args', 'rew_search') ;
function rew_search ($args) {
/*mods and above get permissions to see all from line 50 of \bbpress\includes\search/template.php which sets a list of $default['post_status']
//participants/spectators get $default['perm'] = 'readable' set instead of $default['post_status'].
'perm' is a wordpress wp_query setting, and wordpress does not have 'hidden' status, so allows hidden forums to show
//so if $default['perm'] is set, we add a 'post_status' as well to restrict to statuses user is allowed
*/
if (!empty($args['perm'])) {
$post_statuses = array(bbp_get_public_status_id()) ;
// Add support for private status
if ( current_user_can( 'read_private_topics' ) || current_user_can( 'read_private_forums' ) )
$post_statuses[] = bbp_get_private_status_id();
}
// Add support for hidden status
if ( current_user_can( 'read_hidden_forums' )) {
$post_statuses[] = bbp_get_hidden_status_id();
}
// Join post statuses together
$args['post_status'] = $post_statuses;
}
return $args ;
}
if you are using
bbp style pack
then this is included in version 5.0.8 just released
Otherwise put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
I’ll update the bbpress trac ticket shortly
It’s a pleasure to have people like you,@robin-w, around to get things fixed and get the job done. I’m still playing with the above CSS code and it is producing positive results. Thanks a bunch.
A lot of mobile changes depend on the theme being used.
These are the css changes that this site uses for smaller devices
/* Do not fix #header for non-desktops */
@media screen and ( max-width: 782px ) {
#header {
top: 0;
z-index: 99999;
position: absolute;
}
#wpadminbar {
z-index: 88888;
height: 56px !important;
position: absolute;
}
#wp-toolbar {
width: 100%;
}
#main {
margin: 100px 10px 40px 10px;
}
body:not(.trac):not(.home-page) #main {
margin-top: 140px;
}
#footer {
padding: 10px;
margin: 10px;
}
#footer div.links,
#footer div.details {
float: none;
margin: 10px 0;
}
#bb-menu-icon,
#mobile-menu-button {
display: block;
position: absolute;
right: 0;
padding: 33px 20px 33px 33px;
text-decoration: none;
}
#header #nav,
#wporg-header #wporg-header-menu {
margin: 0;
float: right;
overflow: visible;
}
#header #bb-nav,
#wporg-header #wporg-header-menu {
position: absolute;
width: 100%;
right: 0;
top: 81px;
border-bottom: 1px solid #aaa;
}
#header #bb-nav li,
#wporg-header #wporg-header-menu li {
width: 100%;
text-align: center;
margin: 0;
padding: 0;
}
#header #nav #bb-nav li a,
#wporg-header #wporg-header-menu li :link,
#wporg-header #wporg-header-menu li :visited {
display: block;
margin: 0;
padding: 20px;
color: #000;
text-shadow: none;
border-radius: 0;
}
#header #nav #bb-nav li.current a,
#header #nav #bb-nav li a:hover {
color: #fff;
}
#header #bb-nav,
#bbpress-forums .bbp-pagination-count,
.bbp-topic-meta,
#wporg-header #wporg-header-menu {
display: none;
}
#header #nav:hover #bb-nav,
#header #nav:focus #bb-nav,
#wporg-header #wporg-header-menu.toggled {
background-color: #eee;
display: block !important;
}
#wporg-header #wporg-header-menu.toggled {
background: #eee;
}
#header #nav:hover #bb-menu-icon:before,
#header #nav:focus #bb-menu-icon:before,
#wporg-header #mobile-menu-button[aria-expanded="true"]:before {
color: #fff;
}
#wp-admin-bar-my-account img.avatar {
height: 38px !important;
width: 38px !important;
}
}
/* Mobile */
@media only screen and (max-width: 480px) {
#bbpress-forums div.bbp-topic-author img.avatar,
#bbpress-forums div.bbp-reply-author img.avatar {
width: 72px;
height: 72px;
margin: -5px 0 0 -5px;
transform: rotate(-5deg);
}
#bbpress-forums .bbp-author-role {
border: none;
background: transparent;
padding: 0;
margin: 0;
}
#bbpress-forums p.bbp-topic-post-date,
#bbpress-forums p.bbp-reply-post-date {
position: absolute;
right: -13px;
top: -17px;
font-size: 10px;
margin: 0;
}
#bbpress-forums div.bbp-topic-author .bbp-author-avatar + br,
#bbpress-forums div.bbp-reply-author .bbp-author-avatar + br,
#bbpress-forums div.bbp-topic-ip,
#bbpress-forums div.bbp-reply-ip {
display: none;
}
#bbpress-forums li.bbp-body div.type-topic span.bbp-admin-links,
#bbpress-forums li.bbp-body div.type-reply span.bbp-admin-links {
display: block !important;
border-top: 1px dotted #ddd;
margin: 10px 10px 0 10px;
padding: 5px 0;
position: relative !important;
top: 0;
left: 0;
}
}
You can play with them to get your site looking nicer
either add them to the custom css part of your theme, or use
Code Snippets
Hi
First, thanks for all the help so far with functions and filters! The forum is done, but there is one feature I missed from the old forum and that’s having the editor autoresize with the content. I think this may be out of scope for this plugin, but perhaps someone knows something.
I looked around and it seems WordPress TinyMCE have this feature, but it’s not enabled. I did some terrible attempt (you’re allowed to laugh) to add it. Not only did it break my toolbar 1, but it didn’t work either
function bbp_enable_visual_editor( $args = array() ) {
$args['quicktags'] = false;
$args['teeny'] = false;
$args['tinymce'] = array(
'tinymce' => array(
'toolbar1' => 'formatselect, bold, italic, underline, strikethrough, blockquote, link, forecolor, bullist, numlist, alignleft, aligncenter, alignright, outdent, indent, undo, redo',
'autoresize_min_height' => 100,
'wp_autoresize_on' => true,
'plugins' => 'wpautoresize',
),
);
return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );