Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,251 through 4,275 (of 32,518 total)
  • Author
    Search Results
  • #193921
    jonasgeschke
    Participant

    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,
    Jonas

    #193919
    Robin W
    Moderator

    ok, the best I can suggest is that you create a test site where you can try a different theme to eliminate

    Creating a Test Site

    #193918
    hislordshipuk
    Participant

    Ok I removed the added code as detailed above. It made no difference. All buttons and free text are no operable in the ‘Add new’ of Forums.

    #193917
    quigley05
    Participant

    Hi Robin,

    The ‘Replies Created’ template is replacing the one originally within the buddypress profile section.
    (https://obeii.com/discussions-replies-created/) (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 also contains ‘Subscribed Topics’ using similar code and that sections works as expected.
    (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(); ?>
    #193916
    hislordshipuk
    Participant

    I have gone through the plug-in checks and still found all buttons are disabled. As for changing themes, I don’t wish to do this as when I revert back to my current theme the formatting will be completely messed up which will take hours of work to put right.

    One thought – I did add a piece of code to the theme to have the forum response placed in a sensible order. Could this be the culprit? It was added the Themes funcion.php.

    function my_custom_display_topic_index_query () {
    $args[‘orderby’] = ‘date’;
    $args[‘order’] = ‘DESC’;

    return $args;
    }
    add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query’ );

    #193912
    quigley05
    Participant

    Hi Robin,

    I’ve placed the following code into my page template:

    <?php add_filter ('bbp_before_has_replies_parse_args' , 'rew_filter_for_user' ) ; ?>
        <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
        <?php bbp_get_template_part( 'loop', 'replies' ); ?>
        <?php bbp_get_template_part( 'pagination', 'replies' ); ?>

    I also placed the revised code into my theme functions:

    function rew_filter_for_user ($args) {
     //not sure if the next two lines are needed, so have commented out
     //global $current_user;
     //get_currentuserinfo();
     $uid = bbp_get_current_user_id();
     $args[‘author’] = $uid ;
     return $args ;
    }

    However, doing this results in a blank page for the user.

    #193910
    Robin W
    Moderator

    ok, quick debug of the function, so this won’t error (and will hopefully work!)

    function rew_filter_for_user ($args) {
     //not sure if the next two lines are needed, so have commented out
     //global $current_user;
     //get_currentuserinfo();
     $uid = bbp_get_current_user_id();
     $args[‘author’] = $uid ;
     return $args ;
    }
    
    #193903
    Robin W
    Moderator

    untested but try

    <?php add_filter ('bbp_before_has_replies_parse_args' , 'rew_filter_for_user' ) ; ?>
        <?php bbp_get_template_part( 'pagination', 'replies' ); ?>
        <?php bbp_get_template_part( 'loop', 'replies' ); ?>
        <?php bbp_get_template_part( 'pagination', 'replies' ); ?>

    and in your functions file put

    function rew_filter_for_user ($args) {
    //not sure if the next two lines are needed, so have commented out
    //global $current_user;
    //get_currentuserinfo();
    $uid = bbp_get_current_user_id();
    $args[‘author’] => $uid ;
    return $args

    }

    loop-replies from memory has the ‘no relies’ part in it, so you shouldn’t need the ‘if’ statement
    I’m really pushed at the moment hence no time to test, but if it doesn’t work come back, and if I get time I’ll load it to my test site and debug

    #193900
    quigley05
    Participant

    Any ideas? I keep scratching my head on this one. The code couldn’t be more clear to pull all data from the current user but it seems to ignore it..

    Any help at all would be greatly appreciated. Thanks!

    #193881
    Robin W
    Moderator

    add this to your functions file

    add_filter ('bbp_before_has_forums_parse_args', 'rew_number_of_forums') ;
    
    function rew_number_of_forums ($args) {
    	$args['posts_per_page'] = 50 ;
    return $args ;
    }

    I’ll add it to my style pack plugin shortly if you don’t know how to do that

    #193873
    codenameita
    Participant

    I have solved the problem.
    This line of code resets the post_parent entry of the array args to the current forum id.
    $r['post_parent'] = bbp_get_forum_id( $r['post_parent'] );
    Creating a new function with that line commented solved the problem.

    #193872
    codenameita
    Participant

    Hi 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.

    #193853
    quigley05
    Participant

    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; ?>
    #193841
    Colin Poole
    Participant

    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.

    Register

    Wordpress Version: 4.9.7
    BBPress Version: 2.5.14

    Thanks in advance for any advice!

    #193836
    go-systems
    Participant

    Hi,

    I’m trying to find out if its possible to have shortcode on a page that pulls keyword related posts from bbpress?

    I’m wanting related posted from forums on a page.

    Is this possible?

    #193831
    jisas666
    Participant

    Hello and installed BBpress, and everything is ok. But when I use the Statistics shortcode. I get a column, annoying. Could someone tell me, what php file I can modify. To show me the data horizontally. And not vertical? … It would only be to change that code and for me it would be great.

    My website is: https://www.libreriaurano.com/blog/

    Robin W
    Moderator

    I tried enabling the “Alternate Forum template 1” in bbp style plugin.. but didn’t work.

    That is possibly because your theme is overriding my templates.

    Have you been to

    dashboard>settings>bbp style pack>Topic/Not Working?

    TheBeliever
    Participant

    Hello,

    How do I make sections in main Index forum page? I want to divide forums in multiple sections as mentioned below. I tried enabling the “Alternate Forum template 1” in bbp style plugin.. but didn’t work.

    Example forum – https://mk3focusrs.club/forum/

    I know we must insert a shortcode by creating different page for each forum section… but ain’t understanding how to… can someone help?

    TheBeliever
    Participant

    Thanks for the reply… I enabled the visual editor by adding some code and it worked 🙂

    The bbp style pack plugin looks good.. will try installing it. Thank you 🙂

    #193794
    Robin W
    Moderator

    this will depend on what code the ‘paid forum’ platform has written.

    Most forum platforms have importers, so check what is possible.

    By the way this question is a bit like asking a Ford garage how to buy a Chrysler 🙂

    #193783

    In reply to: detail of Style.css ?

    Robin W
    Moderator

    easiest solution is this plugin, which lets you set all that

    bbp style pack

    or

    bbPress Styling Crib

    #193777
    Robin W
    Moderator

    Shortcodes

    and to customise and style bbpress try

    bbp style pack

    #193776
    Yin Jin
    Participant

    i want to show forums on my own theme but i don’t know how. does bbpress provide shortcodes?

    quigley05
    Participant

    Hi Robin, Oddly enough the Subscribed forums is the only chunk that has issues with this setup. It ignores the current user with the below code. See result at https://obeii.com/discussions-subscriptions/

    	<?php do_action( 'bbp_template_before_user_subscriptions' ); ?>
    
    	<?php if ( bbp_is_subscriptions_active() ) : ?>
    
    		<?php if ( bbp_is_user_home() || current_user_can( 'edit_users' ) ) : ?>
    
    			<div id="bbp-user-subscriptions" class="bbp-user-subscriptions">
    				<h2 class="entry-title"><?php _e( 'Subscribed Forums', 'bbpress' ); ?></h2>
    				<div class="bbp-user-section">
    					
    <?php $user_id = get_current_user_id() ; ?>
    
    					<?php if ( bbp_get_user_forum_subscriptions($user_id) ) : ?>
    
    						<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    					<?php else : ?>
    
    						<p><?php bbp_is_user_home() ? _e( 'You are not currently subscribed to any forums.', 'bbpress' ) : _e( 'This user is not currently subscribed to any forums.', 'bbpress' ); ?></p>
    
    					<?php endif; ?>
    
    				</div>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_user_subscriptions' ); ?>
    Robin W
    Moderator

    untested, but try

    <?php do_action( 'bbp_template_before_user_topics_created' ); ?>
    
    	<div id="bbp-user-topics-started" class="bbp-user-topics-started">
    		<div class="bbp-user-section">
    
    <?php $user_id = get_current_user_id() ; ?>
    
    			<?php if ( bbp_get_user_topics_started($user_id ) ) : ?>
    
    				<?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 bbp_is_user_home() ? _e( 'You have not started any topics.', 'bbpress' ) : _e( 'This user has not started any topics.', 'bbpress' ); ?></p>
    
    			<?php endif; ?>
    
    		</div>
    	</div><!-- #bbp-user-topics-started -->
    
    <?php do_action( 'bbp_template_after_user_topics_created' ); ?>

    This sets the user up as current user

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