Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,226 through 4,250 (of 32,518 total)
  • Author
    Search Results
  • #194460
    Milan Petrovic
    Participant

    You can do it with some custom code to expand list of supported tags and attributes.

    Here is the example of how to do it: https://bbhelp.club/answer/editing/how-can-i-expand-allowed-html-tags-and-attributes/220/

    puniler
    Participant

    Hi all,

    I’m trying to integrate the BuddyPress favorite (aka like system) system with BBPress.

    But I can not implement ajax and the page will be reloaded.

    How do I write it?

    ▼【functions.php】

    function my_bp_activity_is_favorite($activity_id) { 
      global $bp, $activities_template;  
      return apply_filters( 'bp_get_activity_is_favorite', in_array( $activity_id, (array)$activities_template->my_favs ) );  
    }  
    function my_bp_activity_favorite_link($activity_id) {  
      global $activities_template;  
      echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/favorite/' . $activity_id . '/' ), 'mark_favorite' ) );  
    }  
    function my_bp_activity_unfavorite_link($activity_id) { 
      global $activities_template;  
      echo apply_filters( 'bp_get_activity_unfavorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/unfavorite/' . $activity_id . '/' ), 'unmark_favorite' ) );  
    }  

    ▼【bbPress/templates/default/bbpress/loop-single.php】

    <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    
      <!--omission-->
    
        <div class="favorite-wrap">
            <?php $activity_id = get_post_meta( bbp_get_reply_id( $reply_id ), '_bbp_activity_id', true ); ?>  
            <?php if ( is_user_logged_in() ) : ?>  
                <?php bp_has_activities(); ?>   
                <?php if ( !my_bp_activity_is_favorite($activity_id) ) : ?>  
                    <a href="<?php my_bp_activity_favorite_link($activity_id) ?>" 
                    class="button fav bp-secondary-action bp-tooltip" data-bp-tooltip="add" aria-pressed="false">
                    <span class="bp-screen-reader-text">add</span>
                    </a> 
                <?php else : ?>  
                    <a href="<?php my_bp_activity_unfavorite_link($activity_id) ?>" 
                    class="button unfav bp-secondary-action bp-tooltip" data-bp-tooltip="remove" aria-pressed="false">
                    <span class="bp-screen-reader-text">remove</span>
                    </a>
                <?php endif; ?>  
            <?php endif;?>  
        </div>
    
      <!--omission-->
    
    </div><!-- #post-<?php bbp_reply_id(); ?> -->

    Help for figuring this one out is appreciated.
    Best regards

    #194427
    eitan1112
    Participant

    Hello everyone.
    Website: Link
    WordPress version: 4.9.8
    bbPress version: 2.5.14

    Despite reading many threads about this, I still couldn’t figure out a way to change the language of the forum to hebrew. I will work you through what I did:

    1. Download bbPress.

    2. Add all the pages (login, register etc.) to the menu. (since the website is in hebrew, you can the pages find it under the second last menu item).

    3. Download the hebrew .po and .mo files and put them in the directory /wp-content/languages/bbpress with the proper name (bbpress-he_IL.po and bbpress-he_IL.mo)

    4. Check the websites register and login pages, still in english.

    5. Edit “wp-config.php” file and added “define(‘BBLANG’, ‘bbpress_he_IL’);”.

    6. Check the websites register and login pages, still in english.

    Also things I have tried:
    – Putting the .po and .mo files under /wp-content/languages/plugins/.

    – Made sure I don’t have a translation update under “Dashboard -> Updates” in wordpress.

    Important Note:
    The hebrew is not 100% finished, but from this guide I understood that it doesn’t matter as long as I manually override it.

    So the bottom line is – I really need help figuring that out. What am I missing?
    Thanks for everyone who read and help,
    Eitan.

    #194423
    Shaktimaan
    Participant

    I am using Image Upload for BBPress on my forum. This plugin allows users to insert images in posts.

    I, forum admin as well as moderators can align images but normal users can’t.

    I think there are permission issues.

    How can i whitelist these tags class="alignright", class="alignnone", class="aligncenter", class="alignleft" for normal user?

    ginmo
    Participant

    Hi,

    I am now looking for the solution of “changing the freshness time format in Japanese”.

    I have already check the plugin “bbp tool kit” and it says on the checkbox “Shorten the display of the freshness”, it is only available in English”.

    I have also tried set the code on function.php (10. Shorten freshness wording), obviously it is only available in English too.

    It might be diffcult to understand why the freshness time format cannot change with different languages, still though, I am looking for the way to solve this matter.

    At this moment, the Freshness time format in Japanese is like…,

    A) 1 week, 9 hours ago or B) 3weeks, 4days ago

    What I would like to do is…,

    A) 7 days ago or B) 25 days ago

    simply showing the “days”. I do not need “month, week or hours”.

    Please let me know if there is a way to change the format with other languages.

    Thank you so much for your help in advance.

    #194326
    LNAngel
    Participant

    Thanks, Robin. I took a look at that plugin but didn’t see how that would impact emails. I saw “Forum Roles” and blocked users..but what do I check and where to make sure they don’t get notifications?

    I’ll check out the code as well, but plug and play is preferred.

    Thanks very much!

    #194324
    zcoin
    Participant

    Hello,

    I would like to use AdRotate Banner Manager on my bbPress site and I tried to follow the basic tutorial from here: AdRotate tutorial

    As a summary, I created a dummy page with my image and embedded link advert – so its working. However, inserting the same code into a new advert inside AdRotate Banner Manager has no effect on my page.

    I save the advert for a group and from the group setting, I selected page injection into some of the site pages. It doesn’t appear on none.

    Maybe there is a visibility issue? Or the theme DiBusiness does not support AdBanner? I disabled any add block on my site.

    Thank you for any help.

    #194323
    Robin W
    Moderator

    Thanks, I took a second look at this and I put a filter into my style pack plugin a while ago to stop blocked users getting emails as bbpress does not do this.

    If you want to do this directly, add this to your functions file

    
    function rew_fltr_get_forum_subscribers( $user_ids ) {
            if (!empty( $user_ids ) ) {
                    $new_user_ids = array();
                    foreach ($user_ids as $uid) {
                            if (bbp_get_user_role($uid) != 'bbp_blocked') {
                                    $new_user_ids[] = $uid;
                            }
                    }
                    return $new_user_ids;
            } else {
                    return $user_ids;
            } 
    }; 
    // add the filter
    
    if(!function_exists('bbptoolkit_fltr_get_forum_subscribers')){
    add_filter( 'bbp_forum_subscription_user_ids', 'rew_fltr_get_forum_subscribers', 10, 1 );
    }
    #194303
    Robin W
    Moderator
    #194264
    daron4ever
    Participant

    Hi,

    If the post is edited, the original post will be gone.
    How to keep the original post?

    For example,
    This reply was modified 1 second ago by bbpress. click to see original.

    Anyone knows the custom code for it?

    #194261

    In reply to: TinyMCE Error

    Robin W
    Moderator

    that error suggests that your theme Stockholm and file js/plugins.js is the problem.

    So it initially looks like enabling tinymce within bbpress is calling the tinymce or other code within your theme – the bbpress code you are using just turns on the wordpress function.

    to prove, try switching as a test to a default theme, such as twentyseventeen and see if the error goes away

    #194197
    Robin W
    Moderator

    you can do it by amending a template if you know how to do ftp

    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/content-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-single-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

    so amend this template to read

    
    <?php
    
    /**
     * Single Forum Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    
    <div id="bbpress-forums">
    
    	<div id="forum-intro">
    	
    	<?php if (bbp_get_forum_title() == 'technical' ) echo 'this is some content' ; ?>
    	
    	<?php if (bbp_get_forum_title() == 'leisure' ) 	echo 'this is some different content' ; ?>
    	
    	</div>
    
    	<?php bbp_breadcrumb(); ?>
    
    	<?php bbp_forum_subscription_link(); ?>
    
    	<?php do_action( 'bbp_template_before_single_forum' ); ?>
    
    	<?php if ( post_password_required() ) : ?>
    
    		<?php bbp_get_template_part( 'form', 'protected' ); ?>
    
    	<?php else : ?>
    
    		<?php bbp_single_forum_description(); ?>
    
    		<?php if ( bbp_has_forums() ) : ?>
    
    			<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    		<?php endif; ?>
    
    		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>

    You will see I have added lines to change the content per forum

    so the line

    <?php if (bbp_get_forum_title() == 'technical' ) echo 'this is some content' ; ?>

    says that if the forum is called ‘technical’ then write ‘this is some content’ so you simply need to change the forum name and what you want that forum content to be.

    You can add additional lines for each forum, my example has two forums ‘technical’ and ‘leisure’

    #194191
    robineero
    Participant

    I am thinking of soving this idea by creating new page for every forum page with shortcodes and by using redirection plugin to redirect original forum link to customised one.

    Does it make sense?

    #194176

    Topic: TinyMCE Error

    in forum Troubleshooting
    ross445
    Participant

    I’m trying to enable Visual Editor for my forum.
    I’m using this code – https://codex.bbpress.org/enable-visual-editor/

    However, it doesn’t work for me and i see this errors:

    jquery.js?ver=1.12.4:2 Uncaught Error: no such method 'instance' for autocomplete widget instance
    ...
    tinymce.min.js?ver=4711-20180425:2 Uncaught TypeError: Cannot read property 'refreshContentEditable' of undefined

    My bbPress version is 2.5.14
    Wordpress – 4.9.7

    Tried to disable all plugins, didn’t help..

    #194074
    Robin W
    Moderator

    I have a page with my topics on and the slug is ‘discussion.

    are you using a shortcode on this page?

    #194057
    Robin W
    Moderator

    ok, so this works on my test site

    in discussions-replies

    
    <?php add_filter ('bbp_before_has_replies_parse_args' , 'rew_filter_for_user' ) ?>
    <?php if ( bbp_get_user_replies_created( $user_id = bp_loggedin_user_id() ) ) : ?>
        <?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; ?>	

    and in functions

    function rew_filter_for_user ($args) {
     $uid = bbp_get_current_user_id();
     $args['author'] = $uid ;
     return $args ;
    }

    let me know if it works on yours

    #194055
    quigley05
    Participant

    1. I created a new template file titled discussions-replies and discussions-subscriptions under my WordPress child theme.

    2. I placed within discussions-replies the following code:

    <?php
    /*
    Template Name: Discussions Replies Created
    */
    get_header();
    
    // Page options
    $header = ghostpool_option( 'page_header' ) == 'default' ? ghostpool_option( 'page_page_header' ) : ghostpool_option( 'page_header' );
    $height = ghostpool_option( 'page_header_height', 'padding-bottom' ) != '' ? ghostpool_option( 'page_header_height', 'padding-bottom' ) : ghostpool_option( 'page_page_header_height', 'height' );
    $format = ghostpool_option( 'blog_format' );
    $style = ghostpool_option( 'blog_style' );
    $alignment = ghostpool_option( 'blog_alignment' );
    $cats = ghostpool_option( 'blog_cats' ) ? implode( ',', ghostpool_option( 'blog_cats' ) ) : '';
    $post_types = ghostpool_option( 'blog_post_types' ) ? implode( ',', ghostpool_option( 'blog_post_types' ) ) : ghostpool_option( 'blog_post_types' );
    $orderby = ghostpool_option( 'blog_orderby' );
    $per_page = ghostpool_option( 'blog_per_page' );
    $offset = ghostpool_option( 'blog_offset' );
    $image_size = ghostpool_option( 'blog_image_size' );
    $content_display = ghostpool_option( 'blog_content_display' );	
    $excerpt_length = ghostpool_option( 'blog_excerpt_length' );
    $meta_author = ghostpool_option( 'blog_meta', 'author' );
    $meta_date = ghostpool_option( 'blog_meta', 'date' );
    $meta_comment_count = ghostpool_option( 'blog_meta', 'comment_count' );
    $meta_views = ghostpool_option( 'blog_meta', 'views' );
    $meta_likes = ghostpool_option( 'blog_meta', 'likes' );
    $meta_cats = ghostpool_option( 'blog_meta', 'cats' );
    $meta_tags = ghostpool_option( 'blog_meta', 'tags' );
    $read_more_link = ghostpool_option( 'blog_read_more_link' );
    $pagination = 'page-numbers';
    
    ?>
    
    <div class="sub-nav-container">
    	<div class="sub-nav-pagetitle">
    		<h1><?php the_title(); ?></h1>
    	</div>
    	<div class="sub-nav-about-menu">
    		<?php wp_nav_menu( array( 'theme_location' => 'sub-nav-discuss-menu', 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'sub-nav-discuss-menu', 'fallback_cb' => 'null', 'walker' => new Ghostpool_Custom_Menu ) ); ?>
    	</div>
    	<div class="sub-nav-extramenu">
    	</div>
    </div>
    
    <div id="gp-content-wrapper" class="gp-container">
    
    	<?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
    			
    	<div id="gp-inner-container">
    		
    		<div id="gp-content">
    
    			<div class="gp-entry-content">
    				
    				
    <div id="bbpress-forums">
    	<?php do_action( 'bbp_template_before_user_replies' ); ?>
    
    	<div id="bbp-user-replies-created" class="bbp-user-replies-created">
    		<div class="bbp-user-section">
    
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_replies_created( $user_id = bp_loggedin_user_id() ) ) : ?>
        <?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; ?>	
    
    		</div>
    	</div>
    </div>				
    				
    			</div>
    			
    		</div>
    			
    		<?php get_sidebar( 'left' ); ?>
    
    		<?php get_sidebar( 'right' ); ?>
    
    	</div>
    	
    	<?php do_action( 'ghostpool_end_content_wrapper' ); ?>
    				
    	<div class="gp-clear"></div>
    	
    </div>
    
    <?php get_footer(); ?>

    In discussions-subscriptions template I inserted the following code:

    <?php
    /*
    Template Name: Discussions Subscriptions
    */
    get_header();
    
    // Page options
    $header = ghostpool_option( 'page_header' ) == 'default' ? ghostpool_option( 'page_page_header' ) : ghostpool_option( 'page_header' );
    $height = ghostpool_option( 'page_header_height', 'padding-bottom' ) != '' ? ghostpool_option( 'page_header_height', 'padding-bottom' ) : ghostpool_option( 'page_page_header_height', 'height' );
    $format = ghostpool_option( 'blog_format' );
    $style = ghostpool_option( 'blog_style' );
    $alignment = ghostpool_option( 'blog_alignment' );
    $cats = ghostpool_option( 'blog_cats' ) ? implode( ',', ghostpool_option( 'blog_cats' ) ) : '';
    $post_types = ghostpool_option( 'blog_post_types' ) ? implode( ',', ghostpool_option( 'blog_post_types' ) ) : ghostpool_option( 'blog_post_types' );
    $orderby = ghostpool_option( 'blog_orderby' );
    $per_page = ghostpool_option( 'blog_per_page' );
    $offset = ghostpool_option( 'blog_offset' );
    $image_size = ghostpool_option( 'blog_image_size' );
    $content_display = ghostpool_option( 'blog_content_display' );	
    $excerpt_length = ghostpool_option( 'blog_excerpt_length' );
    $meta_author = ghostpool_option( 'blog_meta', 'author' );
    $meta_date = ghostpool_option( 'blog_meta', 'date' );
    $meta_comment_count = ghostpool_option( 'blog_meta', 'comment_count' );
    $meta_views = ghostpool_option( 'blog_meta', 'views' );
    $meta_likes = ghostpool_option( 'blog_meta', 'likes' );
    $meta_cats = ghostpool_option( 'blog_meta', 'cats' );
    $meta_tags = ghostpool_option( 'blog_meta', 'tags' );
    $read_more_link = ghostpool_option( 'blog_read_more_link' );
    $pagination = 'page-numbers';
    
    ?>
    
    <div class="sub-nav-container">
    	<div class="sub-nav-pagetitle">
    		<h1><?php the_title(); ?></h1>
    	</div>
    	<div class="sub-nav-about-menu">
    		<?php wp_nav_menu( array( 'theme_location' => 'sub-nav-discuss-menu', 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'sub-nav-discuss-menu', 'fallback_cb' => 'null', 'walker' => new Ghostpool_Custom_Menu ) ); ?>
    	</div>
    	<div class="sub-nav-extramenu">
    	</div>
    </div>
    
    <div id="gp-content-wrapper" class="gp-container">
    
    	<?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
    			
    	<div id="gp-inner-container">
    		
    		<div id="gp-content">
    
    			<div class="gp-entry-content">
    				
    <div id="bbpress-forums">				
    <div id="bbp-user-subscriptions" class="bbp-user-subscriptions">				
    				
    <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; ?>
    				
    <br><br>	
    				
    <h2>Subscribed Topics</h2>				
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_topic_subscriptions( $uid ) ) : ?>
        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
        <?php bbp_get_template_part( 'loop', 'topics' ); ?>
        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    <?php else : ?>
        <p><?php _e( 'You are not currently subscribed to any topics.', 'bbpress' ); ?></p>
    <?php endif; ?>
    
    </div>
    </div>				
    				
    				
    				
    			</div>
    			
    		</div>
    			
    		<?php get_sidebar( 'left' ); ?>
    
    		<?php get_sidebar( 'right' ); ?>
    
    	</div>
    	
    	<?php do_action( 'ghostpool_end_content_wrapper' ); ?>
    				
    	<div class="gp-clear"></div>
    	
    </div>
    
    <?php get_footer(); ?>

    3. I then created two new pages with WordPress under their parent named “Discussions”, one page titled Replies and the other Subscriptions. I then assigned each page to their proper template that I just had created.

    4. Now when I load the pages, the code is asking for a current user, however it ignores and shows on Replies all replies made by all users; on Subscriptions it shows that the user has made NO subscriptions, even though they have.

    #194053
    quigley05
    Participant

    Hi Robin,

    Not quite sure I understand the question. The template names are mentioned within the code I provided and they are located in a page I’ve created in the WordPress backend, not one that is already provided within Buddypress or BBpress.

    Would it be at all helpful to receive access to my backend? Hope this was helpful.

    #194051
    quigley05
    Participant

    Hi Robin,

    I’m pasting what I’ve wrote in earlier messages as the issue hasn’t changed. Feel free to access these pages through the login as I think that will help clarify things.

    The ‘Replies Created’ template is replacing the one originally within the buddypress profile section. It currently displays a list of all global replies within the forum, versus just the current user’s replies.
    (https://obeii.com/discussions/replies/) (testuser / test1234)

    <?php
    /*
    Template Name: Discussions Replies Created
    */
    get_header();
    ?>
    
    <div class="sub-nav-container">
    	<div class="sub-nav-pagetitle">
    		<h1><?php the_title(); ?></h1>
    	</div>
    	<div class="sub-nav-about-menu">
    		<?php wp_nav_menu( array( 'theme_location' => 'sub-nav-discuss-menu', 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'sub-nav-discuss-menu', 'fallback_cb' => 'null', 'walker' => new Ghostpool_Custom_Menu ) ); ?>
    	</div>
    	<div class="sub-nav-extramenu">
    	</div>
    </div>
    
    <div id="gp-content-wrapper" class="gp-container">
    
    	<?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
    			
    	<div id="gp-inner-container">
    		
    		<div id="gp-content">
    
    			<div class="gp-entry-content">
    				
    				
    <div id="bbpress-forums">
    	<?php do_action( 'bbp_template_before_user_replies' ); ?>
    
    	<div id="bbp-user-replies-created" class="bbp-user-replies-created">
    		<div class="bbp-user-section">
    
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_replies_created( $user_id = bp_loggedin_user_id() ) ) : ?>
        <?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; ?>	
    
    		</div>
    	</div>
    </div>				
    				
    			</div>
    			
    		</div>
    			
    		<?php get_sidebar( 'left' ); ?>
    
    		<?php get_sidebar( 'right' ); ?>
    
    	</div>
    	
    	<?php do_action( 'ghostpool_end_content_wrapper' ); ?>
    				
    	<div class="gp-clear"></div>
    	
    </div>
    
    <?php get_footer(); ?>

    The ‘Subscribed Forums’ template is also replacing the one originally within the Buddypress profile section. It currently ignores the current user and claims they have no content even though they do. The page also contains ‘Subscribed Topics’ using similar code, which that sections works as expected with no known issues.
    (https://obeii.com/discussions/subscriptions/) (testuser / test1234)

    <?php
    /*
    Template Name: Discussions Subscriptions
    */
    get_header();
    ?>
    
    <div class="sub-nav-container">
    	<div class="sub-nav-pagetitle">
    		<h1><?php the_title(); ?></h1>
    	</div>
    	<div class="sub-nav-about-menu">
    		<?php wp_nav_menu( array( 'theme_location' => 'sub-nav-discuss-menu', 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'sub-nav-discuss-menu', 'fallback_cb' => 'null', 'walker' => new Ghostpool_Custom_Menu ) ); ?>
    	</div>
    	<div class="sub-nav-extramenu">
    	</div>
    </div>
    
    <div id="gp-content-wrapper" class="gp-container">
    
    	<?php do_action( 'ghostpool_begin_content_wrapper' ); ?>
    			
    	<div id="gp-inner-container">
    		
    		<div id="gp-content">
    
    			<div class="gp-entry-content">
    				
    <div id="bbpress-forums">				
    <div id="bbp-user-subscriptions" class="bbp-user-subscriptions">				
    				
    <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; ?>
    				
    <br><br>	
    				
    <h2>Subscribed Topics</h2>				
    <?php global $current_user; get_currentuserinfo(); $uid = bbp_get_current_user_id(); ?>
    <?php if ( bbp_get_user_topic_subscriptions( $uid ) ) : ?>
        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
        <?php bbp_get_template_part( 'loop', 'topics' ); ?>
        <?php bbp_get_template_part( 'pagination', 'topics' ); ?>
    <?php else : ?>
        <p><?php _e( 'You are not currently subscribed to any topics.', 'bbpress' ); ?></p>
    <?php endif; ?>
    
    </div>
    </div>				
    				
    				
    				
    			</div>
    			
    		</div>
    			
    		<?php get_sidebar( 'left' ); ?>
    
    		<?php get_sidebar( 'right' ); ?>
    
    	</div>
    	
    	<?php do_action( 'ghostpool_end_content_wrapper' ); ?>
    				
    	<div class="gp-clear"></div>
    	
    </div>
    
    <?php get_footer(); ?>
    #194020
    Robin W
    Moderator

    If you know how to use ftp, then

    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

    Then on your pc create a text file called content-single-forum.php and put the following contents into it

    <?php
    
    /**
     * Single Forum Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    
    <div id="bbpress-forums">
    
    	<?php bbp_breadcrumb(); ?>
    
    	<?php bbp_forum_subscription_link(); ?>
    
    	<?php do_action( 'bbp_template_before_single_forum' ); ?>
    
    	<?php if ( post_password_required() ) : ?>
    
    		<?php bbp_get_template_part( 'form', 'protected' ); ?>
    
    	<?php else : ?>
    
    		
    		<?php if ( bbp_has_forums() ) : ?>
    
    			<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    		<?php endif; ?>
    
    		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    			
    			<?php bbp_single_forum_description(); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    			<?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    		<?php endif; ?>
    		
    	
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>

    FTP this file to the directory you created above, so you end up with

    wp-content/themes/%your-theme-name%/bbpress/content-single-forum.php

    bbpress will then use this file.

    #194011
    Indrekkor
    Participant

    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.

    https://pastebin.com/rhUz90gf

    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;
    #193998
    quigley05
    Participant

    Thanks @nashraf. What exactly in the code did you change? It seems to cross check the same and deliver the same results unfortunately..

    Thanks again Robin and @nashraf for all the support on this.

    #193994
    dinsl
    Participant

    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

    #193974

    In reply to: New Topic Button ?

    Robin W
    Moderator

    sorry, best I can do – you could always crack the plugin open and work out where the code is that does this

    #193966
    jameshogan03
    Participant

    Autosuggest has never worked in my buddypress/bbpress group forums. Anyone with tips could really help me out. There is an old bit of code floating around which doesn’t seem to work anymore. Help appreciated!

Viewing 25 results - 4,226 through 4,250 (of 32,518 total)
Skip to toolbar