BuddyDev

Search

facebook like activity stream

  • Participant
    Level: Initiated
    Posts: 11
    David on #18054

    Hi,

    What I am looking for is to have a friend and group activity stream that each user gets directed to after login. Does this plugin allow me to change the all site activity stream to the stream that only includes user friends and groups activity? or does it only change the user’s profile activity stream? Any help would be appreciated.

    Thanks!

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #18060

    Hi David ,
    Thank you for asking.

    The current version allows you to select which activities you want to convert into stream.

    – You can use sitewide activity directory as the friends/groups/users stream
    – You can add extra tab on profile for stream.

    Both are optional and you can chose any on or both.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    David on #18063

    Thanks for your reply,

    1) Just to confirm, the sitewide activity stream then become specific to the logged in user and their friends/groups stream right?

    2) How can I redirect to the sitewide activity directory and/or profile stream after an user logs in?

    Thanks,

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #18067

    Hi David,

    1. Yes. You will need to enable it in the settings of the plugin though.
    2. Please use the following code.

    
    
    /**
     * Redirect user on login.
     *
     * @param string  $redirect_to_calculated the page where user is about to be redirected.
     * @param string  $redirect_url_specified actual specified redirect.
     * @param WP_User $user user.
     *
     * @return string
     */
    function buddydev_redirect_on_login( $redirect_to_calculated, $redirect_url_specified, $user ) {
    
    	if ( ! $user || is_wp_error( $user ) ) {
    		return $redirect_to_calculated;
    	}
    
    	// If the redirect is not specified, assume it to be dashboard.
    	if ( empty( $redirect_to_calculated ) ) {
    		$redirect_to_calculated = admin_url();
    	}
    
    	// Where do you want to redirect.
    	//  You can change it to anything.
    	$redirect_to = bp_core_get_user_domain( $user->ID );
    	
    	// for example, to redirect to user's group page, you will use
    	// $redirect_to = bp_core_get_user_domain( $user->ID ) . 'groups/';
    
    	return $redirect_to;
    }
    
    add_filter( 'login_redirect', 'buddydev_redirect_on_login', 101, 3 );
    
    

    The above code redirects to profile. You can change $redirect_to to point to anywhere.
    For example, To redirect to member directory, you can change it to.

    
    $redirect_to = bp_get_activity_directory_permalink();
    
    

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    David on #18159

    Hi Brajesh,

    I bought the plugin. Unfortunately the all members activity stream did not change and remains the all sitewide activity. I currently have a redirect to mysite/activity and nothing changed after I activated the facebook like plugin and enabled the sitewide activity directory and profile stream. The profile stream seems to work as it should on first look. Do you know why the sitewide activity does not change? is the URL not mysite/activity?

    I have buddypress 3.1

    Thanks.

  • Participant
    Level: Initiated
    Posts: 11
    David on #18163

    Hi Brajesh,

    Also, the code that you gave to redirect to the profile and the activity stream. Can you tell me where I would add that?

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #18164

    Hi David,
    Thank you for purchasing the plugin.

    1. For the code, Pleas put it in your child theme(or theme)’s functions.php. If you want, you can put it in the bp-custom.php(bp-custom.php is a special file that we can create in our wp-content/plugins directory and keep the functionalities idepent of theme here).

    2. The directory:- Please allow me to check it today. A few questions:- Are you using any other plugin/code to filter out activities? Are you using a custom theme? If yes, which one? Is there anything special about the install that you may want to let me know?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    David on #18171

    Hi Brajesh,

    No filter activities plugin or code.
    Aardvark theme from ghostpool
    I don’t think there’s anything else special. Currently i have the theme redirecting to sitewide activity.

    Thanks!

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #18175

    Hi David,
    Thank you for the details.

    I am looking at it now. Will have an update for you a bit late in day today.

    Regards
    Brajsh

  • Participant
    Level: Initiated
    Posts: 11
    David on #18259

    Hi Brajesh,

    Just wanted to see if you had any updates on why the sitewide activity stream did not work.

    Thanks!

You must be logged in to reply to this topic.

This topic is: not resolved