I wonder if i could add a function that displays a topic starter label for any topic author in a topic.
It would be cool so that say 5 pages in a topic, you could always know who started the topic if they kept the conversation going.
I know the function would most likely be put in a theme functions.php but i wonder if it could go into loop-single-reply.php
I feel like the function would use the topic started by function, mainly get_topic_author
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>
IT would be a nice feature to have
any help??
Thank you, Robin.
OK, I would like to customize the line for PHP 5.2.
Where should I add this line?
Sorry, I have no knowledge of PHP code 🙁
could be done with code, but suspect not sufficient demand that anyone has coded it !
ok, php version use different code see
https://codex.wordpress.org/Widgets_API
The widget can then be registered using the widgets_init hook:
PHP 5.3+ only:
add_action( 'widgets_init', function(){
register_widget( 'My_Widget' );
});
PHP 5.2+:
add_action('widgets_init',
create_function('', 'return register_widget("My_Widget");')
);
I’m using code for 5.3 + – so if your site is using earlier, you would need to amend the line.
“Still working on the forums page and ultimately would like more control over the breadcrumb, like changing the Home URL, or removing Home alltogether, in which I’ve used another plugin to turn it into a dash.”
Layout and functionality – Examples you can use
on the forum display, still think given that it says “continue reading” I suspect that your theme is treating this as a post, and just giving what it thinks is an ‘excerpt’.
Try creating a file in the root of your theme called bbpress.php and putting the following code into it
<?php
/**
* bbPress wrapper template.
*/
get_header(); ?>
<?php while( have_posts() ): the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php get_footer(); ?>
put the following in your functions file
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == 'Forum' ) {
$translated_text = 'Tournaments' ;
}
return $translated_text;
}
add_filter( 'gettext', 'change_translate_text', 20 );
You would need to cut some code, but basically you would be looking at
using some code from the widget to find the latest topic
then maybe using the shotcodes
[bbp-single-topic id=$topic_id] – Display a single topic. eg. [bbp-single-topic id=4096]
and if it has a reply
[bbp-single-reply id=$reply_id] – Display a single reply eg. [bbp-single-reply id=32768]
using the do-shortcode function https://codex.wordpress.org/Function_Reference/do_shortcode
If you do this, please post the result here for the benefit of others !
That is a little disappointing 🙁
If you look at the HybridCore 1.5.5 included with the Spine 2.0 theme there is full support for bbPress built into HybridCore and for whatever reason Spine is not taking advantage of that functionality.
I just downloaded Spine and tweaked the index.php and bbpress.php files so bbPress will work with your theme, I haven’t the time to fully test if ‘everything’ works but it looks like it does. Both files go in and replace any files of the same name in the root of your theme folder e.g. /wp-content/themes/spine.
https://gist.github.com/ntwb/1d884eb7bb889906285d
You could also create a WordPress child theme to put them in which would be a little cleaner and save any pain during theme upgrades. I would expect themehybrid.com to have some tutorials on this so you can get some value for your $29 investment 😉
(Ignore some of the oddities you see in these pics,


I’ll try to take a look at this this week, there are a couple of ‘gotchas’ when running bbPress in WordPress Multisite. I’ll try to document said findings on the codex and create/update any tickets on Trac.
Just paid $29 to become a member there, hopefully their coders can resolve this soon. Thanks again guys.
‘It should work’ on a clean installation, I use a translation for approx half the sites I develop bbPress and it works perfectly. I just tested Slovak and is working as expected 🙂
I found the issue… You need to name the files bbpress-sk_SK.mo and bbpress-sk_SK.po using the _ underscore character not the - hyphen.

I have never tried the ‘Polylang’ plugin and I had a quick look in their support forums but couldn’t find any information if they support bbPress or not, maybe posting a question in their support forums may get an answer from others who have tried and had success or not, at least that way you can find out if Polylang is compatible with bbPress.
update: this was undesirable because the link to the reply was going to the reply itself, which is just a single post of the ‘reply’ custom post type. I have created this dodgy hack of the above code so the permalink for the replies is still the topic permalink. I’m sure there are a million better ways to do this, but it does the job for me so i thought i’d share the updated version.
function jag_add_last_reply() { {
$jag_last_reply_id = bbp_get_forum_last_reply_id();
$jag_last_topic_id = bbp_get_forum_last_topic_id();
$new_args = array(
'post_type'=> 'reply',
'p' => $jag_last_reply_id
);
$post_title_args = array(
'post_type'=> 'topic',
'p' => $jag_last_topic_id
);
$other_args = array(
'post_type'=> 'topic',
'p' => $jag_last_topic_id
);
$jag_query = new WP_Query( $post_title_args );
$nest_query = new WP_Query( $new_args );
$another_nest_query = new WP_Query( $other_args );
if ( $jag_query->have_posts() ) : while ( $jag_query->have_posts() ) : $jag_query->the_post();
$this_post_id=$post->ID;
$this_post_permalink= get_permalink(); ?>
<a href="<?php echo $this_post_permalink; ?>">
<?php endwhile;
endif; wp_reset_query();
if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post();
$this_post_id=$post->ID;
$this_post_title= get_the_title();
$this_post_content= get_the_excerpt(); ?>
<h1><?php echo $this_post_title; ?></h1></a>
<div class="the_content"><?php echo $this_post_content; ?></div>
<?php endwhile;
elseif ( $another_nest_query->have_posts() ) : while ( $another_nest_query->have_posts() ) : $another_nest_query->the_post();
$this_post_id=$post->ID;
$this_post_title= get_the_title();
$this_post_content= get_the_excerpt(); ?>
<h1><?php echo $this_post_title; ?></h1></a>
<div class="the_content"><?php echo $this_post_content; ?></div>
<?php endwhile;
endif;
}}
// Hook into action
add_action('bbp_theme_after_forum_description','jag_add_last_reply');
I spent so long trawling google for an answer to this question, so i am sharing what i came up with. It might not be beautiful code (i patched it together from a number of sources), but it works for me.
Basically, i have a list of forums on my forum home page. I just wanted to show the latest post within each forum as a teaser below the forum description – not just the title, but the excerpt, too. I can’t believe there’s nothing out there explaining how to do this. It seems like a pretty obvious format for the forum index.
The following snippet will output the latest reply, with post title and post link below the forum description. If there are no replies, it will output the latest topic instead.
function jag_add_last_reply() { {
$jag_last_reply_id = bbp_get_forum_last_reply_id();
$jag_last_topic_id = bbp_get_forum_last_topic_id();
$new_args = array(
'post_type'=> 'reply',
'p' => $jag_last_reply_id
);
$other_args = array(
'post_type'=> 'topic',
'p' => $jag_last_topic_id
);
$nest_query = new WP_Query( $new_args );
$another_nest_query = new WP_Query( $other_args );
if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post();
$this_post_id=$post->ID;
$this_post_title= get_the_title();
$this_post_content= get_the_excerpt();
$this_post_permalink= get_permalink(); ?>
<a href="<?php echo $this_post_permalink; ?>"><h1><?php echo $this_post_title; ?></h1></a>
<div class="the_content"><?php echo $this_post_content; ?></div>
<?php endwhile;
elseif ( $another_nest_query->have_posts() ) : while ( $another_nest_query->have_posts() ) : $another_nest_query->the_post();
$this_post_id=$post->ID;
$this_post_title= get_the_title();
$this_post_content= get_the_content();
$this_post_permalink= get_permalink(); ?>
<a href="<?php echo $this_post_permalink; ?>"><h1><?php echo $this_post_title; ?></h1></a>
<div class="the_content"><?php echo $this_post_content; ?></div>
<?php endwhile;
endif;
}}
// Hook into action
add_action('bbp_theme_after_forum_description','jag_add_last_reply');
Just put this in your theme’s functions.php and it should do the trick. Haven’t figured out how to spit out multiple posts and replies for each forum yet, but this is all i needed. Good luck.
ok, can you look at
Codex
getting started part 1, and see if anything in there helps
Come back
Anonymous User 7823331Inactive
Hello. I do not want to bother you with basics, however I tied Slovak and French translation and non of them worked.
I did everything according http://codex.bbpress.org/bbpress-in-your-language/ and no translation appears.
I downloaded translation files (po and mo) from http://translate.wordpress.org/projects/bbpress/2.5.x (bbpress-2.5.x-sk.mo, bbpress-2.5.x-sk.po), I moved the files to /wp-content/languages/bbpress/ and rename it to bbpress-sk-SK.mo and bbpress-sk-SK.po (I also tried names bbpress-sk.mo and bbpress-sk.po).
What I did wrong?
I use WP 3.5.1. with bbpress 2.5.3. I use also polylang module. All translation Slovak, France … works just the translation of bbpress do not.
Just to identify the problem I tried to install your module to WP 3.8 clear installation (with out polyalang) and same result, that translation do not appears.
I believe that it works, since you jut few people ha problem wit translation (http://bbpress.org/forums/search/translation/) but I did everything according manual and it does not work for me.
Thank you.
Dear Stephen great work! 😉
I think the last “basic” information for this great converter is “User status”
we can find it in a snitz table named FORUM_MEMBERS => M_STATUS
M_STATUS field have’s two value: 1=unlocked | 0=locked
NB: also when a user was removed / delete, will stay in the DB, with this two condition:
M_STATUS => 0
M_NAME => n/a
Hey Guys!
I am new to using BBpress. I have been learning a little bit each day and you guys rock!
My theme is DIVI from elegant themes.
Here is the start of my open forum:
http://blankstageproductions.com/forums/forum/bsp/
When I went to see how the forum looked on my smartphone it looked odd. All the words are bunched up on the RIGHT side of the screen making it difficult to read. Is there a plugin or some CSS coded I can drop in? I have done several searches but may not be looking in the right place for this.
For CSS I have learned to drop in code using the ePanel in the theme. I found a thread here with code, copied it in and the code took pretty well. I still have so much to learn in terms of CSS and how to change it but figure as long as the ePanel works I should be good.
dear Stephen don’t be angry …english is not my language
Do not worry about that, I understand you fine 🙂
Edit: Your MySQL is Excellent 😉
Forums and Topic status = Done (F_TOPICS & F_COUNT)
Forum Topics and Replies Counts = Done (T_REPLIES)
Last Reply Date = Done (T_LAST_POST)
Due to limitations with the importer configuration we can’t include the FORUM_TOTALS or FORUM_CATEGORY tables. You will need to manually reassign your your forum categories after importing, usually there is only a small number of these so this shouldn’t be much of an issue. The ‘Total’ Counts’ are also not actually needed, we do this slightly different and are recalculated by bbPress after the import has finished with the ‘Repair Tools’.
Edit: After the import has finished we actually recount all the ‘counts’ so these are not very important to the import, they kind of just help a few things on the way.
To know which Forum or Topic are open and permit to receive new Topic reply, we need this fields
Forum area
FORUM_FORUM => F_STATUS 1=open | 0=close
Single Topic
FORUM_TOPICS => T_STATUS 1=open | 0=close
===========
To know the categories we need to query the table FORUM_CATEGORYwhere we have
CAT_ID Unique ID used to join in FORUM_FORUM => CAT_ID table
CAT_NAME as is …the name
CAT_STATUS need a mention this field, Category locked = 0 | Category Open = 1
Ex of query select for all category and related forum
SELECT FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.CAT_NAME, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_SUBJECT
FROM FORUM_CATEGORY LEFT OUTER JOIN
FORUM_FORUM ON FORUM_CATEGORY.CAT_ID = FORUM_FORUM.CAT_ID
GROUP BY FORUM_CATEGORY.CAT_ID, FORUM_CATEGORY.CAT_NAME, FORUM_FORUM.FORUM_ID, FORUM_FORUM.F_SUBJECT
===========
dear Stephen don’t be angry …english is not my language 😛
..however…
FORUM_FORUM => F_TOPICS
This information is refer to all topics (Only Topic) in specific forum ex: “Forum_name => Total Number of topic”
FORUM_FORUM => F_COUNT
This information is refer of all replies (Only Reply) in specific forum ex: “Forum_name => Total Number of replis”
I think a sum of this two information give us a total like here, ex: “Troubleshooting => 30,051”
================
In this Table FORUM_TOTALS, Snitz save information of whole BB, a sum of all replies and all topics
FORUM_TOTALS => T_COUNT whole topic
FORUM_TOTALS => P_COUNT whole replies
================
About FORUM_TOPICS => T_REPLIES
is this field Snitz save number of replies relate to single topic ex this one:
“Documented import from snitz access database” > “18 replies”
================
with minor importance, also stored in this table FORUM_TOPICS we have
T_LAST_POST_AUTHOR ID value of last member have posted reply
ex: Last reply from: Stephen Edgar
T_LAST_POST data value of last reply added (same format yyyymmddhhmmss)
ex: Last activity: 5 hours, 57 minutes ago
T_LAST_POST_REPLY_ID ID value of last reply added actually used for link in email (?)
ex: Post Link: https://bbpress.org/forums/topic/documented-import-from-snitz-access-database/#post-146492
no plugin, but this page shows how to add them using code
(I haven’t quite finished it, but it should work!)
Custom Capabilities
OK, try this instead, put this code in the bbpress.php file instead:
<?php
/**
* bbPress wrapper template.
*/
get_header(); ?>
<?php while( have_posts() ): the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php get_footer(); ?>
Ah…. I know why, apologies for saying not cool 😉
Make a copy of your page.php file and save it as bbpress.php in your themes folder (you can use page-sidebar.php if you prefer) and then bbPress will ‘wrap’ all of it’s pages in that template for you.
There are actually a couple more fields that can be added that I just realized are not in the Example.php file (which I will add)
Forum type – Is this a forum or category?
// Forum type (Category = 0 or Forum = 1, Stored in postmeta)
$this->field_map[] = array(
'from_tablename' => 'forums_table',
'from_fieldname' => 'the_forum_type',
'to_type' => 'forum',
'to_fieldname' => '_bbp_forum_type',
'callback_method' => 'callback_forum_type'
);
Forum status, can new topics be created in the forum?
// Forum status (Unlocked = 0 or Locked = 1, Stored in postmeta)
$this->field_map[] = array(
'from_tablename' => 'forums_table',
'from_fieldname' => 'the_forum_status',
'to_type' => 'forum',
'to_fieldname' => '_bbp_status',
'callback_method' => 'callback_forum_status'
);
Topic status – Can new replies be created for this topic?
// Topic status (Open or Closed)
$this->field_map[] = array(
'from_tablename' => 'topics_table',
'from_fieldname' => 'the_topic_status',
'to_type' => 'topic',
'to_fieldname' => 'post_status',
'callback_method' => 'callback_topic_status'
);