Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add different scope to site wide activity vs profile/activity


  • dmccuiston
    Participant

    @dmccuiston

    Hello!
    I am trying to add a specific scope (Friends) to the site wide activity, while keeping the activity stream on individual member profile pages to only their activity.

    I adjusted the activity-loop.php with the following:
    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ).'&scope=friends&action=activity_update' ) ) : ?>

    This gives me only posts from my friends, as it is supposed to, but also affects the activity stream on the profile page. I would like that activity stream to only show that user’s activities.

    Any idea how to do this?

    Also, bonus question, as I can’t seem to get this right – where would I add discussion = threaded to add comments to the above filtered stream?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

  • modemlooper
    Moderator

    @modemlooper

    Put a php variable instead of a string and then create a function that tests if you are on a profile or main activity and then return the appropriate response

    Threaded is on by default


    dmccuiston
    Participant

    @dmccuiston

    Thanks for the reply! Great idea.


    dmccuiston
    Participant

    @dmccuiston

    Sorry for the late late response here and the lack of ability here- could you give me an example of this function?

    I was thinking –
    <?php if( is_page(‘activity’) && bp_has_activities( bp_ajax_querystring( ‘activity’ ).’&object=groups,status’ ) ) : ?>

    But I wasn’t sure where to put the else in there or where to put the variable that you mentioned. Any help would be greatly appreciated!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add different scope to site wide activity vs profile/activity’ is closed to new replies.
Skip to toolbar