Thank you so much. This code added the space between replies.
Can this also be done with css? If yes, how?
Thank you so much. This code added the space between replies but pushed the border below.
ok,
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress
where %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-replies.php
Make a copy of this file to your pc
The edit this file to add this line after line 50
<div class='rew-spacer'> <p/> </div>
so you end up with
<?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
<div class='rew-spacer'> <p/> </div>
Then put this in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-replies.php
You may need to do some styling to get it how you want it, but I would need to see your site to help on that
As Robin pointed out (thank you), “My SQL Workbench” is likely the tool or at least a starting tool. I’ve tried its “Migration Wizard” going from a MS SQL database, but unfortunately the wizard errors out on MS ntext fields that contain 4 byte unicode characters (the error is “Inserting Data: Incorrect string value:” on the MySql side) despite both src and dst database fields having utf8mb4 as the character set, and even ensuring all of MySQL database connections are utf8mb as per here.
Since it is not too practical to try and filter out the offending 4 byte unicode chars, so as an alternative now I’m trying saving the src data to CSV and importing CSV on the MySQL side – but apparently the CVS libraries disagree on encoding/decoding – the dst table ends up with more records than the source, not sure who is a fault.
bbp_[get]_reply_post_date( bbp_get_topic_id() );
Really the bbp_reply_post_date() function doesn’t analyze post_type so you can give it anything you want, not only with type “reply”.
P.S. Topics (and everything) is bbPress is a post (class WP_Post), and every post has post_date (https://codex.wordpress.org/images/2/25/WP4.4.2-ERD.png).
I think this way is the most elegant and straightforward.
Can a custom (forum) import, import from “any SQL” database or does it have to be an “MySQL” database?
The high level custom import documentation here states “to setup an import from any SQL database”.
And the deeper link here state “to setup an import from any MySQL database.”
you can put the code in your child theme functions file or put it in a plugin like this which is probably easier
Code Snippets
Hy RobinW
nice plugin π
additional, iam interessted in where i build in your code?
Armin
function custom_bbp_sub_forum_list() {
$args['separator'] = ';' ;
return $args;
}
add_filter('bbp_after_list_forums_parse_args', 'custom_bbp_sub_forum_list' );
or use
bbp style pack
to get the lists vertical
We’ve been told that our forum may be causing an issue with Google’s thin content algorithm, so I’m looking to find a way to noised some of the pages with little content.
I’ve already managed to noindex all the views, replies, users, and topics with replies (see the code below, if anyone’s interested).
I would also like to noindex any forum topic that has total content of less than X words/characters. Is there any way to do that in functions.php? Thanks in advance!
Here’s what I have so far:
add_action( 'wp_head', 'topic_add_noindex' );
function topic_add_noindex()
{
if (bbp_is_single_user())
{
wp_no_robots();
}
if ( bbp_is_single_topic() && bbp_get_topic_reply_count()==0)
{
wp_no_robots();
}
if (bbp_is_single_view())
{
wp_no_robots();
}
if (bbp_is_single_reply())
{
wp_no_robots();
}
}
Import Forums
although the best that offers is from version 1.1
Hi,
I think that “custom post meta boxes” is more complicated than I need, it creates a new menu on the dashboard and I have to include what I want there, as I will use unique labels on each new topic I think it goes too far. I can see the fields I want with the code above on the front end ‘new topic’, I just want the code to show up in the backend “create new topic” if there is no way to include them in the backend ‘New Topic’ I will accept that.
I then need to include these fields at the end of the content before posting both in the topic and the replies — content = content + bbp_extra_field1 + bbp_extra_field2 do you know where I can get at the content before it is written to the table.
Thanks
I found these instructions from Buddypress and followed the steps in “C. Set Up Group Forums Only” but it still doesn’t work. I still get taken to a non-group page when I click on sub-forums.
Installing Group and Sitewide Forums
I have a forum under a buddypress group with the permalink structure /groups/group-name/forum/
I’ve created a sub-forum but when I click on it the permalink structure changes to /forums/forum/parent-forum-name/sub-forum-name/
Which means that I’m now taken out of the groups page and in a separate forums page instead.
Is it possible to change it so that all sub-categories and sub-forums stay within the group?
I’m not great with code so I’m hoping there’s a really simple solution!
Custom Capabilities
and add
delete replies to participants
I would like to enable my users more power with their replies – i.e. if they wish to delete one they have posted. Where do I need to change the code?
so 303 should read
$sticky_query['perm'] = $r['perm'];
yes ?
Here is the incorrect piece of code that is currently there:
// Lean on the 'perm' query var value of 'readable' to provide statuses
} else {
$sticky_query['post_status'] = $r['perm'];
}
And here is how the code should read:
// Lean on the 'perm' query var value of 'readable' to provide statuses
} else {
$sticky_query['perm'] = $r['perm'];
}
try this filter
//make sure scheduled stickies don't show - pending fix by bbpress
add_filter ('bbp_get_stickies', 'rew_get_stickies' , 10 , 2) ;
function rew_get_stickies ($stickies, $forum_id ) {
$return = array () ;
//check if any are future
foreach ($stickies as $sticky) {
if (get_post_status( $sticky ) !='future')
array_push ($return, $sticky) ;
}
return $return ;
}
your site is using the bbpress.min.css file
you should copy the bbpress.css file to your childtheme as per
Theme Compatibility
and amend it there
I don’t know of any plugins that do this, and it si not settings, so you would need someone to write code to do this
You will also under most countries data protection laws need the approval of users to their email address being published to other users.
Hi I push this topic cause I have the same problem.
I set up a topic on a specific page with shortcode [bbp-single-topic id=$topic_id] on this page https://www.lebanquetdesaintleu.fr/evenement/du-bruit-et-de-fureur-chronique-rap/2018-11-15/
But when there are too many answers it creates a second page. And when I click I get a 404. But if I try to go to the forum with the direct URL it works. https://www.lebanquetdesaintleu.fr/forums/topic/forum-de-bruit-et-de-fureur-chronique-rap/
I’m using Avada theme and Buddypress.
How can I fix it ? Is there a way to show all the exchange on the same page ??
Thanks,
ClΓ©ment
you need to alter ‘post’ to topic and reply eg (untested)
function adding_custom_meta_boxes( $post_type, $post ) {
add_meta_box(
'my-meta-box',
__( 'My Meta Box' ),
'render_my_meta_box',
'topic',
'normal',
'default'
);
add_meta_box(
'my-meta-box2',
__( 'My Meta Box 2' ),
'render_my_meta_box',
'reply',
'normal',
'default'
);
}
add_action( 'add_meta_boxes', 'adding_custom_meta_boxes', 10, 2 );
Greetings,
I am looking for the pro version of the plugin: https://wordpress.org/plugins/bbp-user-ranks-lite/ which allows the ability for me to have role based badges below certain members on my forums however both the author’s website and the codecanyon posts of this plugin have been disabled so I am unable to get this plugin, if anyone has a copy they can send me or somewhere I can buy it I will be greatful.
I can’t immediately think of any existing code.
Option 1 is the quick answer, but more manual.
It could be coded, a simple way would be to stop replies on the front end if a reply didn’t exist unless an admin.
you would need to amend form-reply.php – do you
1. have a child theme and
2. know how to ftp files to and from your PC?
If so contact me via my website
http://www.rewweb.co.uk