BuddyDev

Show BuddyPress community(sitewide) activity on User Profile

Hi All,

It has been more than a week since I lasted posted a new plugin. Well, I am back again with a simple plugin. Thanks to Greg for the Idea.

The plugin, BP Community Activity on profile shows all the community activity on user profile. It adds a sub nav in User activity with name "All Activity". A logged in user can click on it to see what is happening across the network.

Features:-

  • Show sitewide activity on user profile itself
  • what more?

Screenshot:-

This plugin will help you to stream line your network on the lines of the popular social networks like facebook etc.

Hope it will help a few of you.

Download & Installation:-

https://buddydev.com/plugins/bp-community-activity-on-profile/

Customization:-
In case you want to show the post form on the All activity page, please open your theme

 

and change it to

 

That will show the post form on the Community activity page.

Please let me know your suggestions for the improvement or anything you want to know.

74 Responses to Show BuddyPress community(sitewide) activity on User Profile

  • Hi Brajesh,

    I could not translate the "All Activity" in menu to norwegian.. I have not looked into the file yet, most probably i can fix it, but just want to let you know.

  • Thanks, you are the best 🙂

    • Jepp, that made it.. Thanks 🙂

      • Hi Rune,
        Thanks for confirming. I think, It was the same translation issue with the FB plugin too. Time to fix that. Highly appreciate your support on reporting the issues 🙂

  • awesome Brajesh! Thank you!

  • Brajesh, how would I set this as the default landing component when a logged-in user visits their profile page? (when they visit another member's page, it should show that user's activity)

    • Hi Greg,
      Bp makes it really difficult to change the default subnav. Anyway, here is a hack, which will work if you are using apache. I am not sure about other servers though.
      Here is a hack to do that.
      https://gist.github.com/1027903

      please put above code in bp-custom.php and It should work.

  • Awesome Brajesh thanks! Can you tell me what file I am looking for to make the post form mod work? I can't seem to find it, I checked activity-loop.php and the index.php inside my themes activity folder.

    • Hi Reboot,
      Thanks for the comment. The file is members/single/activity.php
      hope that helps.

      • What if you're not using bp-default? I'm using the Frisco theme (http://friscotheme.com/) and I don't see that. I only see /activity/index.php and the exact code you ask us to find isn't in the file (https://github.com/davidtcarson/frisco/blob/master/activity/index.php). I tried replacing what was there, but the form never appeared.

        A feature request: An admin back-end enable/disable for the form.

        Thanks! 🙂

        PS: This plugin still doesn't add "All Activity" under Activity in the Admin Bar/Buddy Bar, which would be good if it did!

  • Thanks Brajesh! Works perfect!

  • Hi Brajesh,

    I could not find anything about the post form to mod in members/single/activity.php of the BP-mag theme?

    Thanks
    Rune

  • thank you, great plug in !!!
    how about if i want to use that to show only the user and his friends activities ? is there a way?

    thank you

    • Hi Eyal,
      sorry could not reply earlier. agreed that will be much more useful, will check and let you know in next few days.

  • hi Brajesh,

    great addition!
    since we have this in profile, could you help please re how to hide main BP site wide activity page?

    thank you.

    • Hi James,
      Thanks for the comment.
      The only way I see it currently is editing the header.php of your theme.
      hope that helps.

  • Hello, I am using cosmic buddy theme and recently upgraded to 3.2.1. I can no longer add widgets or edit exisiting widgets. I switched to Twenty Eleven theme and then back to cosmic buddy and a bunch of widget content has disappeared (rss feeds, youtube embed, etc.)

    Any help appreciated.
    Steve

  • Hello, i have got another way to redirect user to show all activity

    1) Install BP-PROFILE-AS-HOMEPAGE plugin

    2) INSTALL PLUGIN

    3) in admin dashboard where list of plugin is listed you will find BP PROFILE AS HOMEPAGE PLUGIN, under it THERE IS TWO OPTION deactivate & edit

    4) click on EDIT

    5) Replace following line

    wp_redirect( $bp->loggedin_user->domain );

    WITH THIS

    wp_redirect( bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BPCOM_ACTIVITY_SLUG );

    6) You are Surely done. It works 100 Percent. i have also used help from this forum i am thank ful about it.

    Anyone facing problem mail me on jigesh.raval@gmail.com

    • Hi Jignesh,
      Nice workaround.
      That could be useful for those who want to redirect users on login to their stream.

  • Hi brajesh,

    Thanks for your appreciation, can you help in small CSS issue with my website?

    my website is http://www.spoword.com

    if i am installing some content on left side right side goes down and down…i know its a tag problem but which i am not able to find out..thanks…

  • on my above tutorial there might be some slightly mistake in SPACES or something i am not able to find out but it shows error…so i have another way to remove that error…

    1) please make sure you have installed both plugins BUDDYPRESS PROFILE AS HOMEPAGE & BUDDPRESS COMMUNITY ACTIVITY ON HOMEPAGE (THIS SECOND WILL ADD ALL ACTIVITY TAB)

    2)now in your backend yoururl/wp-admin/ in plugin list you will see bp profile as your homepage below that two option deactivate & edit ( if it is activate)

    3)click edit and replace wp_redirect( $bp->loggedin_user->domain );

    with

    wp_redirect( bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BPCOM_ACTIVITY_SLUG );

    4) if you are finding any error then do one trial and error with this line

    wp_redirect( bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG );

    This will show friends activity on profile page…and it works well every time i have tested…

    5) now, only replace last BP_FRIENDS_SLUG with BPCOM_ACTIVITY_SLUG

    This is 100 % work…

    if it is showing error then send me mail on jigesh.raval@gmail.com i will solve your problem.

    Thank you.

  • Pingback:12 New All-Purpose BuddyPress Plugins For Customizing Your Social Network

  • Just installed the updated version for BP 1.5, and the URL for the Profile > Activity > All Activity tab is:
    example.com/members/admin/activate/all-activity/

    But when I click on it, it redirects me to:
    example.com/members/admin/activate/all-activity/

    Also, this should place "All Activity" under My Name > Activity in the Buddy Bar, but it doesn't.

    • Hi Mike,
      I am sorry, It was my typo in activity slug. Thank you for reporting. Fixed it now.
      Please download the v 1.0.3 or the current trunk from here https://github.com/sbrajesh/bp-community-activity-on-profile

      It will work as expected. Sorry for the trouble and appreciate your help in reporting the issue 🙂

      • Thanks, it works great now. Just need "All Activity" under "Activity" in the Admin/Buddy Bar. And check out my comment above, about not being able to find the correct code to replace in my theme.

  • Thanks for this great plugin.. I'm trying to translate the "All activity" menu item using codestyling plugin, but it doesn't work.. there is however a notice that says:
    Loading Issue: Author is using load_textdomain instead of load_plugin_textdomain function. This may break behavior of WordPress, because some filters and actions won't be executed anymore. Please contact the Author about that.

  • Kim #

    This looks like a great plugin thanks! I'm just having one problem. After activating and going to my profile it shows the tab "Testing Activity" instead of "All activity". I don't see anywhere in the admin to change the tab name….

    • Kim #

      Sorry I should add I'm using BP 1.5.

      • Please delete the mo file from languages directory. I was testing and left that translation. sorry about that.

        • Hi Brajesh,

          Just downloaded the plugin and that mo file still there.

    • Hi Miguel,
      Please re download. I had missed to update that. It is updated now. I haven't changed the vcersion as there are no changes in the plugin except the po file.

  • HI,
    Maybe a bit off-topic, but does anybody have an idea how can I deactivate the site-wide activity completely?
    For me this very option makes little to no sense, I need (as the vast majority of social networks out there small or big) to have users only see the updates posted by their friends.

    I have hours and hours of googling & forums searching behind me, still I did not find a solution to this yet!

    If anyone here has an idea how to deactivate that site-wide activity stream would be sooooo great!

    Thanks!

  • Hi,

    how could I insert a post form editor to the all-activity tab? I think, it would be useful, if users could write instantly.

    • sorry… I see, I have to change the theme

  • Hi Brajesh,

    I have installed this plugin on my site but the tab created under the activity is named Testing Activity but i want to change the tab's name into All Activity. Please let me know……..

    Thanks in advance
    Jatinder

    • Hi Jatinder,
      Please delete the mo file in the languages directory of this theme.

  • Can confirm the alternative method by Jigesh Raval works well for me. Thanks

  • Anyone know how to add a submit form on other users pages so people can leave a public message on their profile – similar to how it is done on Facebook?

    Thanks

    • HI Elliot,
      you may want to check the BuddyPress activity as wire tutorial.

      • Thanks Brajesh, I'll take a look – and also thanks for your contribution to the BP community – been using your site as a reference a lot recently. Much appreciated.

        • Thank you for the kind words. These words motivate me to do better. highly appreciate it 🙂

  • Is there a way to have the "all activity" show as the default screen on a user's profile, rather than them having to click the link?

  • My apologies, everything is working as it should, privacy is being respected.

  • Thank you for the comment Tim. I am glad it is working 🙂

  • Where can I find the code that has to be changed, please?

  • Customization:-
    In case you want to show the post form on the All activity page, please open your theme

    • sorry missed that. That file is members/single/activity.php around line 64-65

  • Hi Brajesh

    Nice plugin. Its working fine for me. But after integrating the plugin and the php code you have suggested to place on functions.php, only the all activity is coming. When i click on personal activity, its redirecting to teh same All community activity.

    Kindly help me in solving the issue. I need by default it will redirect the user to teh site wide activity when the user logs in and when the user will click on personal activity, it will show him the logged in user's personal activity

    Thanks
    Waiting for a reply

  • Hi, One of the nice plugin.. But i want to know which parameters should be added if i want to filter some types of activities like new user registration or if i want to show groups updates which are limited to only my joined (subscribed) groups… How to and where to add that parameter.. Please just give me a one line code and exact location where to add it if you can give me..

  • Where am I adding or changing the code to add the post form on all activity? I did a search though my Boss theme and though buddypress plugin and it cant find that string of coding you provided above. Is there anyway we can add it though bp-custom.php?

    • THANK GOD, I FINALLY GOT IT!!!

      I'm going to share what I did with the community so they dont have to go through the crap I went though.

      Since my theme did not have a activity.php I had to change out the file located in buddypress plugin …. /plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/activity.php

      inside that file go to line 48 should be something like this

      if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) )

      ALL I CHANGED WAS THAT LINE OF CODE ABOVE TO THIS

      if ( is_user_logged_in() && bp_is_my_profile() && ( " == bp_current_action() || 'just-me' == bp_current_action()||BPCOM_ACTIVITY_SLUG == bp_current_action() ) )

      IF YOU USE ANY OF THE CODE ABOVE WITH ALL THE <?PHP BREAKS. IT WILL NOT WORK.

      NOTE: For some reason when I tried to add this file to my theme folder, it broke my Activity stream, I didnt design the theme so I have no clue why it would be doing that. So if you add this to the plugin you will have to replace that file everytime you update buddypress.

      HOPE THIS HELPS, THIS TOOK ME A BETTER PART OF A DAY TO MAKE THIS WORK ON THE BOSS THEME. I HOPE IT HELPS THE COMMUNITY NOT HAVE FRUSTRATIONS. PLEASE SHOW ME SOME LOVE AND SHARE MY WEBSITE ON YOUR BLOG OR COMMENT ON MY SITE. http://www.modeltmedia.com

  • I am trying to include the whats-new-form in 'Sitewide Activity' according to whether a user is logged in, but this does not work for me.

    • Hi jack,
      I am sorry for the trouble. Please change the code and make sure you replace 'locate_template' by 'bp_locate_template'.

      I have also updated the code in the post to reflect this change.

      Does that work for you?

      • jo #

        Hi Brajesh, I am also struggling to get the post form on my members all activity page. I would also like members to be directed to 'all activity' on their personal profile page any idiot proof tips for me 🙂

  • joy #

    Hi Brajesh, I've tried to use the code for the default profile tab to set to Activity, but it's not working. Is the code still correct? I see that it was from 2012.

    //fix the nav default
    function bpcom_fix_nav(){
    global $bp;
    if(!bp_is_my_profile())
    return;
    if ( $bp->current_component == BP_ACTIVITY_SLUG && $bp->current_action=="just-me" ) {

    $action=bpcom_get_current_actual_action();

    if($action==BP_ACTIVITY_SLUG||$action== bp_get_loggedin_user_username()){

    //unset the default settings
    remove_action( 'wp', 'bp_activity_screen_my_activity', 3 );
    add_action( 'wp', 'bp_community_activity_screen', 3 );
    $bp->current_action = BPCOM_ACTIVITY_SLUG;

    }
    }

    }
    add_action("init","bpcom_fix_nav");

    function bpcom_get_current_actual_action(){
    $request_uri=$_SERVER['REQUEST_URI'];
    $uri_components= explode("/", $request_uri);
    if(empty($uri_components))
    return false;//just to prevent infinite loop

    while(!($current_action= array_pop($uri_components)))
    ;
    return $current_action;//first non empty string

    }

  • Hello Brajesh Singh,
    Thank you for the wonderfull plugin, although I have some issues with filtering posts. For example when i click to show only posts it shows updates aswell

    • Hi Spiros,
      Please allow me to look into it tomorrow and get back to you.

      Thank you
      Brajesh