Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Replies Created & Subscribed Forums

@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(); ?>
Skip to toolbar