Skip to:

How to modify members activity feed ?

  • rmstm


    Hello, some informations about my installation :

    – WAMP
    – WP v.5.9
    – BP 10.0.0
    – Theme Buddy-x 4.3.1
    – PHP 8.1.0

    There is no other plugin : I try to create a functionnality for a client that can let you be able to repost an activity from other members on your own member profile only.

    The thing is, I actually can insert into the database via ajax method the ID of any activity and the date of reshare. Then I can display on the member profile an array with all the shared activity and informations about them (all columns from the database wp_bp_activity table).

    Now, I want to implement them inside the feed. My idea is to intercept the result of the ajax (bp_has_activities( bp_ajax_querystring( ‘activity’ )) that – apparently – return a JSON data Object. Then insert the shared activities with the date of repost, reorder all these activities by dates and display the complete new feed.

    Intercept -> insert the shared activities -> reorder by dates -> display.

    But I don’t know how I can intercept this query. In fact, even if I delete the activity-loop.php file it’s still the same, I have no control on the feed.

    Anyone has an idea about this ? How to add these shared activities to a member feed ?


Viewing 1 replies (of 1 total)

  • rmstm


    Ok, I just find what I want, thanks to the buddyreshare plugin.

    I was looking for this filter hook :

    add_filter( ‘bp_activity_set_just-me_scope_args’, […], 20, 2 ); from the activity.php file in this plugin.

    Thank you 🙂

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar