Skip to:
Content
Pages
Categories
Search
Top
Bottom

“Show Updates” as default in activity?

  • @brooker

    Member

    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!

Viewing 9 replies - 1 through 9 (of 9 total)
  • @brooker

    Member

    anyone?

    @brooker

    Member

    bomp

    @nahummadrid

    Participant

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

    @brooker

    Member

    i read the other topics.. no solution there…

    @nit3watch

    Participant

    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 ) ) {
    $qs = ‘scope=groups’;
    }

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

    @brooker

    Member

    I actually got this work with the following modifications
    function bbg_my_groups_activity_default( $qs ) {
    if ( empty( $qs ) && empty( $_POST ) ) {
    $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” ?

    @dains

    Participant

    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 :(

    @josephfrio13yahoocom

    Participant

    Hi, I was looking to do the same thing. Replace the default ‘Show Everything’ to ‘Show Updates.’ Anyone ever get this working 100%??

    @2bsimone

    Participant

    hi,
    maybe you can find a solution here

    Activity Loop

    i had this
    <?php if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) ) ) : ?>
    in …/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/activity-loop.php

    i changed this way
    <?php if ( bp_has_activities( bp_ajax_querystring( ‘object=status’ ) ) ) : ?>

    it works!

    sorry for my bad english

    bye

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘“Show Updates” as default in activity?’ is closed to new replies.
Skip to toolbar