BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #40270

    BTW, I realise I posted this in the wrong forum but I can’t edit my post. If you could move it to Troubleshooting I would be grateful, thank you.

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #26348

    Gotcha, thanks for that, Brajesh.

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #26327

    Hi Brajesh, thanks for confirming that. A couple of other things I’m unclear on. Is this only role based or can I manually assign badges to individuals? And where is the interface for doing this? Is it done under Users in the back-end? I couldn’t work this out from your screen shots.

    Thanks.

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #26309

    Ooops – that was supposed to have been posted in the badges support forum.

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #25977

    Hi Brajesh,

    We’re almost there. The link you provided worked (for some reason I had to put it in my functions file, not bp-custom, to make it work), but only when the Profiles tab is displaying because it jumps from the Settings tab to the Profile tab to bring up the image upload window. However I want to hide the Profiles tab altogether with this code:

    function vap_remove_buddypress_profile_tabs() {
    	global $bp;
           // to remove main menu like friends.
            bp_core_remove_nav_item('profile' );
           // to remove sub nav favorites under activity.
           bp_core_remove_subnav_item('activity', 'favorites');
    }
    add_action( 'bp_setup_nav', 'vap_remove_buddypress_profile_tabs', 999 );

    When I remove the Profiles tab Buddypress doesn’t know where to go after clicking ‘change photos’ when in the Settings tab.

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #25968

    OK, I copied some code from the web which created an activity link in the Activity tab. I’ve changed what I can so the submenu appears in the Settings tab instead, but I need to change the ‘screen function’ and the ‘link’ part to point to the Change Image page. Any pointers?

    function bpfr_custom_profile_sub_nav() {
    	global $bp;
    	$parent_slug = 'settings';
    		
    	//Add subnav item 	 
    	bp_core_new_subnav_item( array( 
    	'name'            => __( 'Change Photo' ), 
    	'slug'            => $parent_slug, 
    	'parent_url'      => $bp->loggedin_user->domain . $parent_slug.'/', 
    	'parent_slug'     => $parent_slug, 
    	'screen_function' => 'bp_activity_screen_my_activity',
    	'position'        => 60,
    	'link'            => bp_get_activity_directory_permalink(),
    	) );
    }
    add_action( 'bp_setup_nav', 'bpfr_custom_profile_sub_nav' );
  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #25967

    An alternative would be to add a submenu to the ‘settings’ page. I’m looking into this (sorry, couldn’t edit my OP).

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #25965

    OK, thanks for that.

  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #25950

    Hi Ravi. Is this any different from my post the other day about adding custom links to the BuddyPress menu (https://buddydev.com/support/forums/topic/add-new-link-to-the-buddypress-member-profile-page/)?

    Or are you suggesting echoing the content of the account page by changing the echo here to page id?

     * Display content on tab.
     */
    function buddydev_custom_screen_content() {
    	echo 'hello BuddyDev';
    } 
  • Participant
    Level: Initiated
    Posts: 10
    demonboy on #25924

    Hey Ravi, thanks for getting back to me. That’s exactly what I was looking for! Thank you.