Skip to:

the bp_has_activities() loop filtering

  • Federico Altuna


    hello all.

    i’m trying to filter my stream activity output so that logged in users are able to see all the actions performed in the activity stream but only by their FRIEND users. can anyone help me out? I’ve been playing a bit with the bp_has_activity loop, but as I don’t have and I can’t find a complete list of accepted args, and as I’m very very very bad at php, I’ve had results, I don’t deny it, but results are far far from the desired ones, ;D. It’s my (na├»ve) belief now that there’s a magic value for user_id parameter (friends maybe???) that will allow me to accomplish this, and to get very very rich with my social network (does that happen??? :)), but I’ve decided to ask first. Anyway, I’M GOING TO TRY TO INVENT, but I would be grateful if a caritative (and knowing) soul (or mind) would tell me I’m stupid enough and the bright solution is easy and it is this one….


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

  • Federico Altuna


    Hi all again.

    I’ve been googling and googling over this issue and I’ve partially found a solution. You can download this plugin: there and you’ll find some more links, also. We have a problem, though. This piece of code will actually filter all non-friend updates, including OWN updates, and comments on them, what’s pretty bad. I’ve been chasing its author over tweeter and his own blog (poor thing), but I have not had an answer so far. He claims to have fixed this, but it still filters own updates on my installation. Feel free to check it out and to answer here (PLEASE).



    Federico Altuna


    I’ve touched the code a little bit after its author gave me some advice, and it works perfectly fine for me now. If anyone has a similar problem get in touch and I’ll send the files I’ve uploaded to my server. The WHOLE credit, anyway, goes to the code’s author. Kindly thank him at his blog if you make use of this. Regards!

    or drop me a note on here ;)

    Hey @nuprn1,

    im just trying to filter some items in the bp_has_activities() function and cant seem to get it to work whenever I add more than one filter/parameter.

    this works:

    this doesnt work:


    I think my syntax is wrong, or Im trying to mix the filters and parameters in the same place. Anyways, I dont know hot to work with this. Im referencing the following page:

    Any help will be much appreciated,

    no comma `’action=new_blog_post&max=5’`

    Hey, nevermind, I just found the answer here:

    For those of you who get stuck trying to add multiple parameters/filters when calling the bp_has_activities function do it like this, using the & sign:

    Hey @nuprn1,

    I have a new question though. I was able to pull the post from the forum but is it possible to get the permalink to it? I can see the permalink whenever I include this portion of code:



    but it adds more than I want.

    Thanks again

    wow your fast man.. you answered before I replied hahaa

    like so?

    just a link to the forum thread using `bp_activity_thread_permalink`

    Cool, thanks again Rich, it worked, but it doesnt quite do what I wanted.

    The `action=last_activity` doesnt bring me back the same information displayed on the general activity page ( It seems that the missing data is actually coming in from twitter. Is it possible to get the exact same feed? Would I have to import the RSS for the activity page?

    Thanks again

    action is the activity type – such as new_forum_post, new_forum_topic, activity_comment, status_update, or whatever is being used by plugins

    i guess it depends on what information you want to display. maybe you need to pass in the object (component) or nothing at all



    Hi all,

    Can you filter based on different actions?

    activity_update and friendship_created?

    What would be the syntax?




    I’d like to know what activities the current user has created and which one are from others. I mean:

    If the user mentioned another is what I call “created by the user” and if another user mentioned him is what I call “created from other”.


    Hey all,

    I’m trying to consolidate the Personal, Mentions, and Group activity feeds on a member’s page into ONE activity feed… Similar to a Facebook wall. I’ve been playing with the bp_has_activities scopes but it only seems to allow 1 scope at a time. Can anyone help me solve this?


Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘the bp_has_activities() loop filtering’ is closed to new replies.
Skip to toolbar