That was some brilliant code. Thank you so much.
add this to your custom css
#bbpress-forums .entry {
width: 100%;
}
I am a newbie on BBPress and just installed it and I’m in the process of setting it up. The problem is that the body columns are not aligning with the topic headings.
I did some testing and this is the default layout which is not aligning.
Forum: Imagination Room
However if I create a new Page and insert the shortcode the alignment is perfect, so I’m not sure what’s happening, but I don’t want to create several dozen pages and insert shortcodes, so I’d like to figure out why it’s not aligning.
test
I’ve tried messing with some of the css but I couldn’t figure it out. Any help would be greatly appreciated.
answers from my perspective – I’m just a bbpress user who helps out here, and has written some plugins including style pack
1. it was bbpress authors’ choice to change freshness to last post – it does the same thing, and you can change what it says to what you want either using code or style pack. I don’t think there is any change in philosophy, apart from that what most other forums call that column.
2. I logged 3297 which is incorporated in 3356, which is as far as I know the fix. It is awaiting bbpress authors to look at it.
3. Given that bbpress authors have lots to look at, and that the freshness problem was not in 2.5.x code, I simply added a re-run of the 2.5.x code into my plugin and made it an option, which seems to fix the issue for many people. Given I am designer, author, tester, and everything else for my style pack plugin, I can simply do this. I do not have the problem that my code will affect 300,000 sites, or is run by several people who have busy lives and need to agree who will do what.
function bbp_subscriptions_handler always have $action = ''…
I`m fix this:
if (!$action && $_GET['action']) {
$action = htmlspecialchars($_GET['action']);
}
Check this… I think is bug…
#main-content {
background-image: linear-gradient(180deg, rgb(45, 55, 86) 0%, rgb(33, 37, 41) 100%) ;
}
i want it as main background like this
#main-content {
background-color: #000;
}
That worked fine, but not with:
#main-content {
linear-gradient(180deg, rgb(45, 55, 86) 0%, rgb(33, 37, 41) 100%)
}
Thx for that link. But im a complete noob and have no idea how to put in the code in my theme css area.
i tried with:
#main-content {
linear-gradient(180deg, rgb(45, 55, 86) 0%, rgb(33, 37, 41) 100%)
}
But get error there!
hey if it works, then it’s good code !!
servers are so fast nowadays, that a few cycles extra will make no difference to what is downloaded !
well done on cracking it, it’s always a good feeling when it works !
Working with your original solution, your subsequent advice, playing with code segments from relevant template files, and a bit of dumb luck, the following augmented version of your function seems to work:
function rew_breadcrumb_search ($crumbs) {
//create a new array
$new_crumbs = array() ;
$first_pass = true;
$augment_breadcrumbs = true;
//find the forum from the first item in results
if ( bbp_has_search_results()) {
while ( bbp_search_results() ) : bbp_the_search_result();
$type = get_post_type() ;
if ($type == 'topic' ) $forum_id = bbp_get_topic_forum_id() ;
if ($type == 'reply' ) $forum_id = bbp_get_reply_forum_id() ;
if ( $first_pass ) {
$first_pass = false;
$last_forum_id = $forum_id;
} elseif ( $forum_id !== $last_forum_id ) {
$augment_breadcrumbs = false;
}
// if (!empty ($forum_id)) break ;
endwhile ;
}
//cycle through the crumbs until we find search
foreach ($crumbs as $crumb=>$data) {
//shouldn't really need to do this inside the loop, but the alternatives crashed
if ( $augment_breadcrumbs ) {
if (strpos($data, 'search') !== false) {
//If the forum ID exits, add the breadcrumb
if ( $forum_id && is_numeric( $forum_id ) ){
//Use the Forum ID we found in the search result
$new_crumbs[] = '<a href="' . esc_url( bbp_get_forum_permalink( $forum_id ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $forum_id ) . '</a>';
} else {
//The search result was empty, so we need to get the Forum ID from the search request(?)
$forum_id = sanitize_title_for_query( $_GET['bbp_search_forum_id'] );
if ( $forum_id && is_numeric( $forum_id ) ){
$new_crumbs[] = '<a href="' . esc_url( bbp_get_forum_permalink( $forum_id ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $forum_id) . '</a>';
}
}
}
}
$new_crumbs[] = $data ;
}
return $new_crumbs ;
}
add_filter ('bbp_breadcrumbs' , 'rew_breadcrumb_search' ) ;
It does seem a little complicated, but all my attempts to cut out bits that don’t immediately look necessary breaks things, so I have what I have—but it does produce the desired outcome.
Thanks for your help. It was very much appreciated.
That worked so, just for the record, the code to be inserted in the loop-search-reply.php template file is:
<div class="bbp-topic-title-meta">
<?php if ( function_exists( 'bbp_is_forum_group_forum' ) && bbp_is_forum_group_forum( bbp_get_topic_forum_id() ) ) : ?>
<?php esc_html_e( 'in group forum ', 'bbpress' ); ?>
<?php else : ?>
<?php esc_html_e( 'in forum ', 'bbpress' ); ?>
<?php endif; ?>
<a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_topic_forum_title( bbp_get_topic_forum_id() ); ?></a>
</div><!-- .bbp-topic-title-meta -->
<?php do_action( 'bbp_theme_after_topic_title' ); ?>
OK, it did it again. There’s something else I don’t understand… how text that is inserted in ‘code’ tags are interpreted. Let’s try this one more time… The relevant function call to be inserted in the above code segment is:
<a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_topic_forum_title( bbp_get_topic_forum_id() ); ?></a>
OK, so I totally misunderstood what was going on there… The ‘bbpress’ text has nothing to do with the display of the forum name.
The result I was after is acheived quite simply by using the function bbp_topic_forum_title in place of bop_forum_title in the above code segment (which still needs to be added to the loop-search-reply.php template—and that modified template file placed in the relevant <theme>/bbpress folder—as noted above):
"><?php bbp_topic_forum_title( bbp_get_topic_forum_id() ); ?>
Now, as I retype that code segment, I notice that something has gone wrong with the code segment I pasted into the original post. I’m not sure if that was me or not, but the line to be replaced with the above, should have been as follows:
"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?>
I hope that makes sense to anyone who’s interested.
Hi – I have a WordPress site that has been operational for 5 years.
I wanted to add a Discussion Forum using bbPress, and I have been successful in installing the bbPress plug-in.
Using the bbPress Shortcode Codex, I wanted to create a requirement for people to log into my new Discussion Forum using
[bbp-register] – Display the register screen.
[bbp-lost-pass] – Display the lost password screen.
However, when I test these two options, it appears that these two options actually create a new WordPress account – with no connection to my existing WordPress site at all. When I test the Register facility, a new page opens with the WordPress create account box (create username and password).
What is wrong with the Shortcode usage, please?
WordPress 5.4.1 running Enterprise theme.
Who and What I Find – About this site
bbPress Version 2.6.5
Codex updated. Thanks for pointing that out.
MySQL 8 removing support for zero dates is the problem.
WordPress is incompatible with NO_ZERO_DATE mode, but it being dropped entirely means these errors are going to pop up.
See: https://bbpress.trac.wordpress.org/ticket/3354
Going to patch and fix for 2.6.6, likely for a release next week.
I am experiencing a similar problem.
I get the exact same error message, although the forum does render (ie. no blank page).
As far as I understand, it appears to be because bbp_remove_adjacent_posts does not get called, and it tries to fetch adjacent posts with a default post_date of 0.
sorry this is a bbpress forum – this should get you started with bbpress
Step by step guide to setting up a bbPress forum – Part 1
I know nothing of buddypress, just directing you to their site
Its what ive found in my wor2975_usermeta table for my admin user.
212 5 wor2975_capabilities a:2:{s:13:"administrator";b:1;s:13:"bbp_moderator";b:1;}
213 5 wor2975_user_level 10
This allows any length title
add_filter( 'bbp_is_title_too_long', 'rew_dont_bother', 10 , 4 ) ;
function rew_dont_bother ($result, $title, $max, $len ){
return false ;
}
and this reduces content
//code to limit number of characters in topic contents to 500 characters
add_filter( 'bbp_new_topic_pre_content', 'rew_limit_topic_content' );
add_filter( 'bbp_edit_topic_pre_content', 'rew_limit_topic_content' );
function rew_limit_topic_content( $topic_content )
{
/* Check for number of characters in topic contents */
if (strlen($topic_content) > 500) {
$revised_content = substr($topic_content, 0, 500);
}
else {
$revised_content = $topic_content ;
}
return $revised_content ;
}
Put this in your child theme’s function file – or use
Code Snippets
Just had a chance to dig further into this – bbpress will only let a keymaster set another keymaster, so if you’re not a keymaster yourself then by default you can’t do this.
However this code should allow any admin to set a keymaster
add_filter( 'bbp_is_user_keymaster', 'rew_allow_keymaster', 10 , 3 );
function rew_allow_keymaster ($retval, $_user_id, $user_id) {
if (current_user_can( 'manage_options' )) $retval = true ;
return $retval ;
}
Put this in your child theme’s function file – or use
Code Snippets
BUT THEN TAKE IT OUT AFTER you have set up another – as it makes all admins in effect keymasters.
With the code above I am able to post but every post appears from “anonymous” 🙁
yes it is buddypress
you can change the text as per below
//This function changes the text wherever it is quoted
function change_translate_text( $translated_text ) {
if ( $translated_text == 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.
' ) {
$translated_text = 'new text';
}
return $translated_text;
}
add_filter( 'gettext', 'change_translate_text', 20 );
so just put what you want in place of ‘new text’
Put this in your child theme’s function file – or use
Code Snippets
slow down comes from a flood check function.
The flood time is set is
dashboard>settings>forums>flooding.
for this specific issue, I’d try setting that to a longer period and see if it makes a difference
Then you can disable this function using
add_filter( 'bbp_bypass_check_for_flood', 'rew_bypass_flood' ) ;
function rew_bypass_flood () {
return true ;
}
Put this in your child theme’s function file – or use
Code Snippets