ok, so we’re back to setting the default template that bbpress uses, but this time to one with a sidebar
Step by step guide to setting up a bbPress forum – Part 1
possibly a conflict
Plugins
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.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
you could try adding the following to your functions file
add_filter( 'd4p_is_bbpress', '__return_true' );
or seeing if your theme or other plugins are affecting
Plugins
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.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
Can you just eliminate theem or plugin issues, this should show descriptions (content) on the category pages.
Plugins
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.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
ok, quick and messy way (based on some code I did elsewhere)
create a directory in your theme root called bbpress
wp-content/themes/%your-theme-name%/bbpress
copy
wp-content/plugins/bbpress/templates/default/bbpress
loop-replies.php
and
loop-single-reply.php
into this directory
bbpress will now use these files instead
in loop-replies change from line 40 to
<li class="bbp-body">
<?php if ( bbp_thread_replies() ) : ?>
<?php bbp_list_replies(); ?>
<?php else : ?>
<?php global $countr ;
$countr=0 ; ?>
<?php while ( bbp_replies() ) : bbp_the_reply(); ?>
<?php
$countr ++ ;
<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
<?php endwhile; ?>
This is basically just putting a count into this, so that we can see that the topic is count 0
then in loop-single-reply change line 45 to read
<?php if ($countr !=0) bbp_reply_author_link( array( ‘sep’ => ‘<br />’, ‘show_role’ => true ) ); ?>
I’ve not tested this, but you should be able to get it to work.
Nice one – thanks for that. If I set it the template to default, that should work?
I’m having ‘fun’ with my child-theme setup at the moment, so can’t experiment at the mo.
A slightly different question to the last one about visibility. I’d like to make the one private forum’s TITLE and TOPIC COUNT visibile to everyone. If they try and click on it, they’re taken to a page which tells them it’s members only (that part I’ve got covered).
I thought when I first installed bbpress this was actually the default setting but when I log out I don’t see the forum title. Have I inadvertently changed a setting whilst piddling around with plugins, or did I just imagine it? Is this at all possible?
I haven’t taken a detailed look at your problem but you could try adding this to you functions file
//This function adds descriptions to the sub forums
function custom_list_forums( $args = '' ) {
// Define used variables
$output = $sub_forums = $topic_count = $reply_count = $counts = '';
$i = 0;
$count = array();
// Parse arguments against default values
$r = bbp_parse_args( $args, array(
'before' => '<ul class="bbp-forums-list">',
'after' => '</ul>',
'link_before' => '<li class="bbp-forum">',
'link_after' => '</li>',
'count_before' => ' (',
'count_after' => ')',
'count_sep' => ', ',
'separator' => ', ',
'forum_id' => '',
'show_topic_count' => true,
'show_reply_count' => true,
), 'list_forums' );
// Loop through forums and create a list
$sub_forums = bbp_forum_get_subforums( $r['forum_id'] );
if ( !empty( $sub_forums ) ) {
// Total count (for separator)
$total_subs = count( $sub_forums );
foreach ( $sub_forums as $sub_forum ) {
$i++; // Separator count
// Get forum details
$count = array();
$show_sep = $total_subs > $i ? $r['separator'] : '';
$permalink = bbp_get_forum_permalink( $sub_forum->ID );
$title = bbp_get_forum_title( $sub_forum->ID );
$content = bbp_get_forum_content($sub_forum->ID) ;
// Show topic count
if ( !empty( $r['show_topic_count'] ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
$count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID );
}
// Show reply count
if ( !empty( $r['show_reply_count'] ) && !bbp_is_forum_category( $sub_forum->ID ) ) {
$count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID );
}
// Counts to show
if ( !empty( $count ) ) {
$counts = $r['count_before'] . implode( $r['count_sep'], $count ) . $r['count_after'];
}
// Build this sub forums link
$output .= $r['before'].$r['link_before'] . '<a href="' . esc_url( $permalink ) . '" class="bbp-forum-link">' . $title . $counts . '</a>' . $show_sep . $r['link_after'].'<div class="bbp-forum-content">'.$content.'</div>'.$r['after'];
}
// Output the list
return $output ;
}
}
add_filter('bbp_list_forums', 'custom_list_forums' );
A category can have multiple forums, a forum can not have multiple categories.
Forums can have sub-forums, so the hierarchy goes like this:
Category : transportation
Forum : Trains
Subforum : My favorite train
Category : transportation
Forum : cars
Subforum : Who Likes Mini’s anyway?
You could create a menu in “appearances => menus”
Add your category to the menu, save and use “manage locations” to add your new menu instead of the default menu.
That menu link should bring you on a page showing a list of your forums!
If you want to land directly on a forum’s page you add a forum link (instead of category) to your menu and repeat previous steps.
That is how I create my current theme http://www.cultivators-forum.com
good luck
P.H.
ok, you could just call each by their url
or if you know the username you could call the form from within a page using the ‘insert php’ plugin
https://wordpress.org/plugins/insert-php/
then
[insert_php]
$user_id = whatever you used to get the user-id
$filelocation=”wp-content/plugins/bbpress/templates/default/bbpress/form-user-edit.php”;
include($_server[‘DOCUMENT_ROOT’].$filelocation);
[/insert_php]
Hello from Japan!
bbpress is great!
Well, I’m in trouble.
so I would appreciate if you help me.
1.
By default, an anchor tag is given to texts of “freshness“. like…
<a>2hours, 1minute ago</a>
To remove the anchor tag from freshness texts, which files should I modify ?
Could you please tell me a path to get to the file?
2.
By default, a comma is used in display of “freshness”. like..
2hours,(←here!) 1minute ago
I want to also remove the comma.
In this case, a file to be modified will be the same as the file described above?
Thanks for reading,
and I’m looking forward to your reply…
WordPress: ver3.9.1
bbPress: ver2.5.3
ok, the simplest way would be as follows
In you theme create a directory called bbpress
ie wp-content/your-theme-name/bbpress
The copy the following file into this
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
so you end up with a file
wp-content/your-theme-name/bbpress/loop-single-forum.php
bbpress will now sue this file instead of the default one, so then edit this file to change line 68 from
<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
to
<span class="bbp-topic-freshness-author"><?php //bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 14 ) ); ?></span>
If your theme is a child theme, then that will be fine. If it is a main theme, then just keep a note of this change, as you may have to repeat it on a theme update.
Hi,
i have the challenge to show the latest topics for the role members in the topic index view. I’m new to bbpress so i’ve to learn a lot.
I’m using buddypress with sidewide and group forums. Each group has one forum.
When I’m using a site and shortcode [bbp-topic-index] only all topics from the sidewide forums are shown. What I’ve learned is that this is a default behavior – i hope i’m not wrong 🙂
Now I want to show all latest topics / posts for all members belonging to their group / group forum – optimal on the latest topic page. The users are members (bbpress) and abonnents (WordPress).
How do i accomplish that ?
Hi Christian,
The code I ended up using was not my original idea. I didn’t hook into a new user creation. What this does is inverts the subscribe list. It turns it into an unsubscribe list. So any user should be subscribed to any new forum by default. Let me know if something is not working for you, and I’ll see what I can do!
– Nathan
Something odd about those “replies to replies”. I had assumed they would be there by default, but couldn’t see them…
I’ve added some ‘replies to replies’ to my test WPS forum before converting it… In bbPress, in the backend they are not displayed in the list of replies, although I do see ‘hidden’ replies in the count that I cannot access to. In the frontend, the forum topic does not show those replies, nor do the counters. However!! When dumping wp_posts table WHERE post_type = ‘reply’, they are there, so they were converted ok, it’s just that they don’t show. I did set bbPress threated replies 2 levels deep before conversion. Any advice…?
As far as groups forum topics, I would add ‘AND symposium_topics.topic_group = 0 ‘ to the ‘from_expression’ of both the topic ID and Reply ID sections to get rid of those posts. Cleaner until v2.
I think you need to eliminate conflicts for instance maybe the access plugin is conflicting
try
Plugins
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.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
Just taken a good look at form_reply_move.php and that calls a function that uses the bbp_has_topics with a ‘post__not_in’ parameter. My function uses a ‘post__in’ parameter, and wp-Query can’t handle both in one query, hense why it falls over.
I’m already in trouble with my wife for still typing this, but try copying
wp-content/bbpress/templates/default/bbpress/form_reply_move.php to a folder called bbpress within the root of your theme – ie wp-content/your-theme-name/bbpress/form_reply_move.php
this will create a copy that is used instead of the default
try
changing
line 45
<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ), 'post__not_in' => array( bbp_get_reply_topic_id( bbp_get_reply_id() ) ) ) ) ) : ?>
to
<?php //if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_reply_forum_id( bbp_get_reply_id() ), 'post__not_in' => array( bbp_get_reply_topic_id( bbp_get_reply_id() ) ) ) ) ) : ?>
and line 63
from
<?php endif; ?>
to
<?php //endif; ?>
This just takes that argument out and see how it runs then
If that works, then I can play with what is needed – think I know, but am out of the door….now !!!
It is not a bug, we removed the default behaviour to have both editors enabled by default in 2.3.1, switching between editor types would more often than not change the content of the users topics or replies.
Now that TinyMCE v4 has shipped with WordPress v3.9.x once we have a few more architectural fixes in bbPress we can take another look, it is far from a small bug, quite complex to be honest.
Hey guys. So Ive been wondering this for a long time, and I just dont understand. Why is bbPress’ editor so bad? Everything uses lame tags and is very primitive. WordPress already has color and bold and italic and linking and everything integrated, so why doesn’t bbPress add this?
No one can actually tell me that bbPress is meant to be this way? Is there something stopping the devs from just importing the full editor over…?
Very curious…
I have added this code to my functions.php file
function mycustom_breadcrumb_options() {
// Home - default = true
$args['include_home'] = false;
// Forum root - default = true
$args['include_root'] = true;
// Current - default = true
$args['include_current'] = false;
return $args;
}
add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options' );
… but that last argument only works for the original post, which returns something like this:
Forums › Assignment Submissions ›
On the replies underneath it includes the current location, something like this:
Forums › Assignment Submissions › Assignment 24: 1st 24 hours in Crown Point, Tobago
You can see this in action here.
How do I remove that last part in the replies?
It could be a theme or plugin issue
Plugins
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.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
Using this code I have made it to where only updates and rtmedia posts show up on my activity stream
/**
* Activity Stream Default Updates
*/
function make_swa_show_notice_only( $retval ) {
if ( bp_is_page( 'activity' ) ) {
$retval['action'] = 'activity_update, rtmedia_update';
}
return $retval;
}
add_filter( 'bp_after_has_activities_parse_args', 'make_swa_show_notice_only' );
I would like bbpress forum posts to show up on my wall as well. What would i put next to
‘activity_update, rtmedia_update’
in my code to make that happen? Thanks!
probably a conflict
Plugins
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.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
function custom_bbp_has_replies() {
$args[‘order’] = ‘DESC’; // ‘ASC’ (Ascending, Default), ‘DESC’ (Descending)
return $args;
}
add_filter(‘bbp_before_has_replies_parse_args’, ‘custom_bbp_has_replies’ );
Thank you for the great solution, @netweb!
However, as I changed the query, the post IDs got messed up (this appears when I click on the ID starting with “#” in the top right corner of the post). Also, after submitting a new post, bbPress jumps to the last page in that topic, despite the fact that the order has already been changed and the latest reply is on the first page (this could be a result of the messed ID’s, I think).