Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: Custom background #14544

    Hi Jill,
    Please use the following code

    
    
    // disable the custom profile background generated css.
    add_filter( 'bppg_iwilldo_it_myself', '__return_true' );//do not generate css for us
    
    //Our own css
    function buddydev_custom_inject_css() {
    	if ( ! function_exists( 'bppg_get_image' ) ) {
    		return ;// no trouble when the plugin is disabled
    	}
    
    	$image_url = bppg_get_image();
    
    	if ( empty( $image_url ) ) {
    		return;
    	}
    
    	$repeat_type = bp_get_user_meta( bp_displayed_user_id(), 'profile_bg_repeat', true );
    
    	if ( ! $repeat_type ) {
    		$repeat_type = 'repeat';
    	}
    	?>
    	<style type="text/css">
    		body.is-user-profile #buddypress div#item-body{
    			background: url(<?php echo $image_url; ?>);
    			background-repeat: <?php echo $repeat_type; ?>;
    		}
    
    	</style>
    	<?php
    }
    add_action( 'wp_head', 'buddydev_custom_inject_css', 200 );
    

    You may experiemnet with the css selector to aplly the image to various other parts.

    Best Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Sujee,
    You are correct about the default tab. It applies to all or none.

    if you can tell me about your member types and provide the slugs for applying to these types, I can help with code.

    You will have to remove the default selection for the tab from the profile tabs plugin in that case.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Thank you. Will certainly do. The focus will be on import after 2.0

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: [Resolved] Activity Updates #14540

    Hi Keith,
    BuddyPress Activities can have only 2 privacy either visible to all or only visible to the poster(It may change if the Core developers decide to add ebtetr privacy in future).

    For MediaPress, if an item is accessible to all(including non logged), Its activity is set public otherwise it is set as private.

    What you are seeing is the correct listing for a logged in users only gallery.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: Buddypress Activity spam link #14539

    Hi Tosin,
    I won’t be able to look into it and assist as we have a moderation plugin coming this week and I am investing my time on that. Once the plugin is available and you still feel you need to use this code, Please feel free to post back and I or one of our team members will help.

    At the moment, I am just trying to avoid any duplicate effort.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Please use the following code to hide the button

    
    
    /**
     * @param array $args button args.
     * @param int   $leader_id leader to be followed.
     * @param int   $follower_id follower id.
     *
     * @return mixed
     */
    function buddydev_hide_unfollow_button_for_users( $args, $leader_id, $follower_id ) {
    
    	if ( 'following' !== $args['id'] ) {
    		return $args;
    	}
    
    	// user ids who can not be unfollowed.
    	$special_user_ids = array( 1,2,3,67 );
    
    	if ( in_array( $leader_id, $special_user_ids ) ) {
    		$args['id'] = '';
    	}
    
    	return $args;
    
    }
    add_filter( 'bp_follow_get_add_follow_button', 'buddydev_hide_unfollow_button_for_users', 10, 3 );
    

    It only hides the button but does not do anything else to stop unfollowing.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: [Resolved] "Links xprofile" & NEW PLUGIN #14533

    Hi Julia,
    That was expected. Specially on the edit page. BuddyPress doe snot give any specific error on the profile edit page. That’s why I asked you to put a message in the description.

    The better and accessible way will need too much code for a simple task like this.

    2. sure, You can use any of the available javascript plugins to do that. I don’t have enough time to find a library and post the code. I will leave it upto you to find and use it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    You are welcome.