Group Mods

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

”Show Updates” as default in activity? (8 posts)

Started 1 year, 1 month ago by: Brooker

  • Profile picture of Brooker Brooker said 1 year, 1 month ago:

    Hello,

    how can I have “Show Updates” as default in the activity stream instead of the “no filter” one? I tried moving the “Show Updates” as first on the UL but that doesnt do it…

    I also tried having the filter to do_action activity_updates but doesnt seem to work well.. some of the updates dont show.. sometime you need to update twice for one to show…

    Help!

  • Profile picture of Brooker Brooker said 1 year, 1 month ago:

    anyone?

  • Profile picture of Brooker Brooker said 1 year ago:

    bomp

  • Profile picture of Nahum Nahum said 1 year ago:

    I know i’ve seen this topic before…I just did a search http://buddypress.org/search/?f=default+activity

  • Profile picture of Brooker Brooker said 1 year ago:

    i read the other topics.. no solution there…

  • Profile picture of nit3watch nit3watch said 1 year ago:

    You can thank Boone for the answer below. Replace scope=groups with what ever filter you’d like to apply.

    Changing the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.

    Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.

    function bbg_my_groups_activity_default( $qs ) {
    	if ( empty( $qs ) && empty( $_POST['scope'] ) ) {
    		$qs = 'scope=groups';
    	}
    
    	return $qs;
    }
    add_filter( 'bp_ajax_querystring', 'bbg_my_groups_activity_default', 999 );
  • Profile picture of Brooker Brooker said 1 year ago:

    I actually got this work with the following modifications
    function bbg_my_groups_activity_default( $qs ) {
    if ( empty( $qs ) && empty( $_POST['action'] ) ) {
    $qs = ‘action=activity_update’;
    }

    return $qs;
    }
    add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );

    the only problem is that when you click the “read more” button at the bottom of the activity stream it loads all the crap… “new memebers, friendship, etc…” any idea on how to stop that from happening when someone clicks the “read more” ?

  • Profile picture of dains dains said 1 year ago:

    Oh this is very close to answering a big need (setting the default view to the “My”s on every view). Does anyone know of a place where I can look up all of the action= arguments or the scope=arguments?

    Edit: I’m assuming that’s what is being passed to bp_ajax_querystring – is it page slug? my-groups does not work for scope :( Alternatively, if someone knows where I can find some reference for bp_ajax_querystring, that’d be great too. The lack of documentation is killing me on this project :(