Search Results for 'code'
-
Search Results
-
Topic: Odd slow-query
Hello,
Been optimizing my bbPress install, have managed to make it blazing fast with switching to MariaDB and configuring indexes.
Now i got rid of the usual slow-queries from my slow-query.log now something appeared that i haven’t seen before.
Is this a core bbPress query?
SELECT wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND wp_posts.post_parent IN (LONG LIST OF IDs) AND ( ( wp_postmeta.meta_key = '_bbp_forum_id' AND CAST(wp_postmeta.meta_value AS SIGNED) NOT IN ('11212874','22','1778309','2273738') ) ) AND wp_posts.post_type = 'reply' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC, wp_posts.ID DESC LIMIT 0, 1;Hello there!
Is it possible to migrate from IPB 4 to bbpress? From the importer i see only the option IPB 3 and doesn´t work as the IPB 4 database is different.
I saw also one thread https://codex.bbpress.org/getting-started/importing-data/import-forums/invision/ but not for the IPB 4x version. Can somebody help me please?
Thanks in advance
Topic: Display of forum path
Hi,
in order to better use the single-forum shortcode, is it possible not to display the forum path (“Login => Forums =>”)?
Thanks for your help and best regards,
JonasHi there,
I’m trying to write some advanced search functions for BBpress. One of these should let people search only in the forum or subforum they currenty are in. I followed several examples posted on the net and tried to refine them myself.
Unfortunately, I am experiencing a problem with the bbp_forum_get_subforums fuction.
The fuction I am writing should be able to get the list of subforums present in a category type forum when the search is fired from a category type forum.
The code is as follows://If the forum is a category, then search in all the subforums if( bbp_is_forum_category($forum_id)){ $sub_forums = bbp_forum_get_subforums($forum_id); $subforum_id = array_column($sub_forums,'ID'); $min_subforums = min($subforum_id); $max_subforums = max($subforum_id); $r['meta_query'] = array( array( 'key' => '_bbp_forum_id', 'value' => array($min_subforums,$max_subforums), 'compare' => 'BETWEEN', ) ); }Unfortunately, bbp_forum_get_subforums($forum_id) gives a false result.
Strangely enough, if I try to put the same code in a fuction and add it with “add_action” to a forum page, it gives me the corret list of subforums if the current forum is a category.
Can someone please help me addressing this problem? I am using the latest version of WP and BBpress.I am having issues placing a current user’s ‘Replies Created’ and ‘Subscribed Forums’ within their unique templates. See below.
‘Replies Created’ (login testuser / test1234)
https://obeii.com/discussions-replies-created/
Code seems to just want to display all replies instead of the specific users. How can this be corrected to be filtered to that specific user?<?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_replies_created( $uid ) ) : ?> <?php bbp_get_template_part( 'pagination', 'replies' ); ?> <?php bbp_get_template_part( 'loop', 'replies' ); ?> <?php bbp_get_template_part( 'pagination', 'replies' ); ?> <?php else : ?> <p><?php _e( 'You have not replied to any topics.', 'bbpress' ); ?></p> <?php endif; ?>‘Subscribed Forums’ (login testuser / test1234)
https://obeii.com/discussions-subscriptions/
It works fine for ‘Subscribed Topics’ below the item, however ‘Subscribed Forums’ comes up empty with no results. Any clue on why that is?<h2>Subscribed Forums</h2> <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?> <?php if ( bbp_get_user_forum_subscriptions( $uid ) ) : ?> <?php bbp_get_template_part( 'pagination', 'forums' ); ?> <?php bbp_get_template_part( 'loop', 'forums' ); ?> <?php bbp_get_template_part( 'pagination', 'forums' ); ?> <?php else : ?> <p><?php _e( 'You are not currently subscribed to any forums.', 'bbpress' ); ?></p> <?php endif; ?>Hey all,
So I have a WordPress page called Register which uses the shortcode [bbp-register] to call up the registration form. I have linked the page below. The problem right now is that the “register” button isn’t doing anything. It does not appear to be clickable so when I enter an e-mail and password you can’t go any further. Not sure what would happen to prevent the button from working, hoping someone can notice if I’m missing anything.
Wordpress Version: 4.9.7
BBPress Version: 2.5.14Thanks in advance for any advice!