Skip to:
Content
Pages
Categories
Search
Top
Bottom

the bp_has_activities() loop filtering

  • @fede3456

    Participant

    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….

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • @fede3456

    Participant

    Hi all again.

    I’ve been googling and googling over this issue and I’ve partially found a solution. You can download this plugin: http://wpmu.org/create-a-better-community-experience-with-the-new-buddypress-friends-only-activity-stream-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).

    Regards,

    Federico

    @fede3456

    Participant

    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!

    @nuprn1

    Participant

    or drop me a note on here ;)

    @johnyred

    Member

    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:

    or

    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:

    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/

    Any help will be much appreciated,
    thanks

    @nuprn1

    Participant

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

    @johnyred

    Member

    Hey, nevermind, I just found the answer here: https://buddypress.org/community/groups/creating-extending/forum/topic/bp_has_activities-not-showing-the-latest-updated-status/#post-67600

    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

    @johnyred

    Member

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

    @nuprn1

    Participant

    like so?
    http://etivite.com/groups/buddypress/forum/topic/how-did-you-add-the-view-blogpost-button/#topic

    just a link to the forum thread using `bp_activity_thread_permalink`

    @johnyred

    Member

    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 (www2.gamesphere.com.br/activity). 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

    @nuprn1

    Participant

    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

    @latinosamorir

    Participant

    Hi all,

    Can you filter based on different actions?

    activity_update and friendship_created?

    What would be the syntax?

    Thanks!

    @abysshorror

    Member

    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”.

    Thanks

    @hyserure

    Member

    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?

    Thanks

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