Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Remove Sitewide Activity (16 posts)

Started 1 year, 7 months ago by: bojanski

  • Profile picture of bojanski bojanski said 1 year, 7 months ago:

    What’s the easiest way to completely remove the Sitewide Activity tab!? Which php file should be modified for that!?

    Thanks

  • Profile picture of paulhastings0 paulhastings0 said 1 year, 7 months ago:

    Here’s what you’re looking for: http://shabushabu.eu/reordering-buddypress-group-tabs/

  • Profile picture of bojanski bojanski said 1 year, 7 months ago:

    Hi,

    thanks, nice article! But this is not really what I’m looking for…
    I just need to remove the Sitewide Activity (all members activity) under the main Activity page!

    Any ideas!?
    Thanks
    Bojan

  • Profile picture of bojanski bojanski said 1 year, 7 months ago:

    I figure it out by myself:
    Modify the line #116 within bp-activity-classes.php
    Change “a.hide_sitewide = 0″ to “a.hide_sitewide = 1″

  • Profile picture of tom_taylor_85 tom_taylor_85 said 1 year, 7 months ago:

    I would change that back. That doesn’t disable it, that is just telling your BP to show 0 recent activities. The easiest ever is to go to your wp-admin!

    http://i56.tinypic.com/n4tgjo.png

    Look at the pic, change the first option to disabled!

  • Profile picture of Roger Coathup Roger Coathup said 1 year, 7 months ago:

    @bojanski

    hide_sitewide is a boolean, and in this line is being used to test whether an activity item has been marked as hidden or not – (it’s not a count @tom_taylor_85)

    You should NOT be modifying the code there – that’s a core file, and you’ll run into problems when you upgrade if you’ve modified them. You’ve also changed the logic to say: if an item is marked as hidden get it to display – which is not what you want.

    @bojanski – can you be clearer about what you mean by “remove sitewide activity tab” – do you mean you want to remove the main Activity page from the main nav bar?

    If the latter – edit it out in header.php in your child theme.

  • Profile picture of tom_taylor_85 tom_taylor_85 said 1 year, 7 months ago:

    Oh, sorry, i misread his post. I did not realize that it was a core file, using arrays and all that. I saw it was a count the first time :P

    Like I said, remove the site wide activity on your wp-admin. When you disable it, it takes off the activity tab, and it disables updates being posted to an activity stream. http://i56.tinypic.com/n4tgjo.png

  • Profile picture of Roger Coathup Roger Coathup said 1 year, 7 months ago:

    @tom_taylor_85 -

    your solution (using the admin panel setting) turns off all activity stream posting.

    The original poster only wants to remove the Sitewide Activity tab, and I assume wants to keep activity streams within profiles, etc.

    The best solution is just to remove this tab from the main nav bar, is to edit the header.php file appropriately

  • Profile picture of bojanski bojanski said 1 year, 7 months ago:

    Hi guys!
    Thank you all for your feedbacks.

    No. I just want to disable the “Site-Wide” or “All Members” activity tab (the first one) from the Activity Page itself.
    But I want to keep the rest, for example: the Group Activity, Friends Activity….

    Thanks
    Bojan

  • Profile picture of Roger Coathup Roger Coathup said 1 year, 7 months ago:

    In your child theme (assuming it follows a similar structure to bp-default):

    Edit your /activity/index.php file to remove the tab

  • Profile picture of Boone Gorges Boone Gorges said 1 year, 7 months ago:

    As @rogercoathup suggested, you should open up header.php in your child theme, find the code that creates the Activity tab, and delete it.

    If you don’t yet have header.php in your child theme, you’ll have to copy it here. More on BP child themes: http://codex.buddypress.org/extending-buddypress/building-a-buddypress-child-theme/

  • Profile picture of bojanski bojanski said 1 year, 7 months ago:

    Thank you all! I’m going to try that…

  • Profile picture of thelandman thelandman said 1 year, 7 months ago:

    @bojanski,

    Here is the code you are looking for, you’ll find it under /wp-content/themes/yourtheme/activity/index.php around line 22. This is presuming you have created a child theme based on the default BP theme.

    <li class="selected" id="activity-all"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ) ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_site_member_count() ) ?></a></li>

    Remove that code and you should be good to go.

  • Profile picture of homework17 homework17 said 10 months ago:

    Unfortunately, the sitewide activity stream is yet loaded everytime anyone clicks on Activity tab. How to make it load only my activities, for example?

  • Profile picture of helpingbud helpingbud said 6 months, 3 weeks ago:

    Go to these files: buddypress/bp-themes/bp-default/activity/index.php

    Line 39 thru 41 comment out like so:

    <!-- //-->

    That will solve your problem.