Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show Profile changes in activity feed


  • Ehegwer
    Participant

    @ehegwer

    OK. I’ll Admit it. I’m stuck. Something about the loop in a loop for the profile system.

    Does anyone have any suggestions or tips to get this: I want profile changes to show up in the activity feed:

    “User just updated category in their profile”

    Aaaargh!!!

    I can’t seem to get bp_has_profile() to work, or bp_has_activities() either!

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

  • Roger Coathup
    Participant

    @rogercoathup

    @ehegwer

    You should add an action function to the xprofile_updated_profile() hook. It’s called when a profile is edited.

    In your action function, you can use bp_activity_add() to create a new activity item each time a profile is edited.

    You can find those functions in bp-xprofile.php and bp-activity.php, and it’s probably worth checking to see how they work.

    If you are not familiar with writing hooks, there is some content in the docs section on here. [ https://codex.buddypress.org/developer-docs/action-reference/ ]

    If you search the forums for bp_activity_add you’ll find some examples of how to setup and call that function – it’s at the heart of what you are trying to do.


    Ehegwer
    Participant

    @ehegwer

    This is my first pass, and I’m getting a T-string error on the last line – FWIW, I have no Idea if this is the correct path, but it makes sense to me

    function add_profile_updates_to_activity_feed(){
    global $bp;
    }
    $bp_member_profile_data( ‘birthday’ )

    bp_activity_add( ‘$bp_member_profile_data’,’add_profile_updates_to_activity_feed’)


    Roger Coathup
    Participant

    @rogercoathup

    @ehegwer

    The T-string error is because your code is not valid php

    You’ve closed your function after the global definition, and failed to put a ; after your statements.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show Profile changes in activity feed’ is closed to new replies.
Skip to toolbar