BuddyDev

Search

Profile User tab in the Buddyboss theme problem

  • Participant
    Level: Initiated
    Posts: 8
    Steffen Metzka on #37192

    Hey there i want to add via a shortcode a form in a new profile user tab.

    everything works great but when i click in the edit profile menu on my new custom nav tab the menu on the left side disappears and the form is fully shown.

    it is kind of strange cause i tried it the same way in the account settings menu and everything is working great. the menu on the left side is still shown with my form.

    it is kind of hard to explain. i do have some screenshots to clarify the problem.
    But i canĀ“t upload images here.

    hope you can help out.
    cheers

  • Keymaster
    (BuddyDev Team)
    Posts: 18306
    Brajesh Singh on #37207

    Hi Steffen,
    Thank you for using the plugin.

    The plugin uses the default layout from theme and BuddyBoss is most probably not detecting the new tab as part of edit flow.

    Please allow us to test the same and get back to you within next 24 hours.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 18306
    Brajesh Singh on #37315

    Hi Steffen,
    Thank you for the patience.

    The BuddyBoss theme has following code which limits the left sidebar to edit profile/avatar change/cover change page only.

    
    	<?php
    	if( bp_is_user_profile_edit() || bp_is_user_change_avatar() || bp_is_user_change_cover_image() ) {
    		bp_get_template_part( 'members/single/parts/item-subnav' );
    	}
    	?>
    

    If you are comfortable modifying the template files, we can change it to include our sub tabs too.

    Please let me know and I will assist.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    Steffen Metzka on #37360

    Hey Brajesh,

    Thanks for your help. Yes i am comfortable with modifying the template. You can tell me what to do? At the same time i am in contact with the buddyboss support. (Nothing heard from them till now)

    Maybe they are also interested in fixing this in future updates.
    Therefore i am looking to hear from you.
    Cheers

  • Keymaster
    (BuddyDev Team)
    Posts: 18306
    Brajesh Singh on #37395

    Hi Steffen,
    Thank you for the reply.

    we can change that to the following

    
    	<?php
    	if ( ( ! bp_is_user_profile() || ! bp_is_current_action( 'public' ) ) ) {
    		bp_get_template_part( 'members/single/parts/item-subnav' );
    	}
    	?>
    
    

    This makes sure that the 2 column layout is used on all profile sub pages except the view.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    Steffen Metzka on #37396

    Hey there,

    Thanks for your reply. Could you tell me where i can find the right place to add/ change this?

  • Keymaster
    (BuddyDev Team)
    Posts: 18306
    Brajesh Singh on #37397

    Hi Steffen,
    Please copy the code from the following page
    https://pastebin.com/raw/fBqZzDfQ

    and put it into buddyboss-theme-child/buddypress/members/single/profile.php

    It contains our changes and it will override the parent theme’s template.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 8
    Steffen Metzka on #37399

    hey Brajesh,

    thanks for your help. the sidebar is showing. but it does not use the same layout.
    the content of the original tabs are showing with no profile section and a button (view profile) in the upper right corner.

    the content of custom tabs with your plugin is shown with the profile header section and no button in the upper right corner.

    when you check the account settings page and add a custom nav from your plugin everything looks great. this is the behavior i was looking for.
    this is the code from the settings.php
    maybe this helps you finding the problem:

    <div class="bp-settings-container">
    	<?php if ( bp_core_can_edit_settings() ) : ?>
    		<?php bp_get_template_part( 'members/single/parts/item-subnav' ); ?>
    	<?php endif; ?>
    
    	<div class="bb-bp-settings-content">
    		<?php
    		switch ( bp_current_action() ) :
    			case 'notifications':
    				bp_get_template_part( 'members/single/settings/notifications' );
    				break;
    			case 'capabilities':
    				bp_get_template_part( 'members/single/settings/capabilities' );
    				break;
    			case 'delete-account':
    				bp_get_template_part( 'members/single/settings/delete-account' );
    				break;
    			case 'general':
    				bp_get_template_part( 'members/single/settings/general' );
    				break;
    			case 'profile':
    				bp_get_template_part( 'members/single/settings/profile' );
    				break;
    			case 'invites':
    				bp_get_template_part( 'members/single/settings/group-invites' );
    				break;
    			case 'export':
    				bp_get_template_part( 'members/single/settings/export-data' );
    				break;
    			case 'reported-content':
    			case 'blocked-members':
    				bp_get_template_part( 'members/single/settings/moderation' );
    				break;
    			default:
    				bp_get_template_part( 'members/single/plugins' );
    				break;
    		endswitch;
    		?>
    	</div>
    </div>
    
  • Participant
    Level: Initiated
    Posts: 8
    Steffen Metzka on #37402

    Hey Brajesh,

    i found the problem with the missing button. it is the same problem:

    <?php if( bp_is_user_profile_edit() || bp_is_user_change_avatar() || bp_is_user_change_cover_image() ) { ?>
    	<header class="profile-header flex align-items-center">
    		<h1 class="entry-title bb-profile-title"><?php esc_attr_e( 'Edit Profile', 'buddyboss-theme' ); ?></h1>
    		<a href="<?php echo $profile_link; ?>" class="push-right button outline small"><i class="bb-icon-user-small"></i> <?php esc_attr_e( 'View My Profile', 'buddyboss-theme' ); ?></a>
    	</header>
    <?php } ?>

    when i change this <?php if( bp_is_user_profile_edit() || bp_is_user_change_avatar() || bp_is_user_change_cover_image() ) { ?>
    to this
    <?php if( ! bp_is_current_action( 'public' ) ) { ?>
    the button is shown.
    But the profile section above is still shown. i have no clue why it is showing the profile section above only on custom tab with your plugin?

    cheers

  • Keymaster
    (BuddyDev Team)
    Posts: 18306
    Brajesh Singh on #37403

    Hi Steffen,
    Thank you.

    I can see the issue. The problem is BuddyBoss theme has too much hard coded conditions and very that limits us without template override.

    The header issue is due to member-header.php and cover-image-header.php. These have the following code

    
    <?php if ( ! bp_is_user_messages() && ! bp_is_user_settings() && ! bp_is_user_notifications() && ! bp_is_user_profile_edit() && ! bp_is_user_change_avatar() && ! bp_is_user_change_cover_image() ) : ?>
    
    

    That is a for showing header/hiding. I can suggest a change here in these two files but it will be better if BuddyBoss team can provide a simple filter to turn these on/off.

    Can you please contact them for the same.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved
Subscribe