Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity Stream – “XYZ User has a new avatar”


  • paulhastings0
    Participant

    @paulhastings0

    Does anyone know of a plugin or work-around that will post to the activity stream when someone uploads a new avatar? I believe that FaceBook has similar functionality.

    I know that it’s possible extend the activity stream since that’s what Buddypress Like does.

    Thanks yall,
    Paul

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

  • paulhastings0
    Participant

    @paulhastings0

    @hempsworth, do you have any insights on this?


    paulhastings0
    Participant

    @paulhastings0

    :bump:

    hook on xprofile_screen_change_avatar


    r-a-y
    Keymaster

    @r-a-y

    Hey Rich, this is a better hook: xprofile_avatar_uploaded

    *runs and hides away* :P i need a big flowchart of hooks


    paulhastings0
    Participant

    @paulhastings0

    code sample?


    paulhastings0
    Participant

    @paulhastings0

    I’ve been studying the WP and BP Core structure and the Buddypress Like plugin files for the last several hours. I feel kind of stupid that this is all I can come up with for now. I know there’s a bunch wrong with it. but I have to start somewhere. Does this look like the right form?


    if (xprofile_avatar_uploaded == true) {

    function bp_new_avatar_uploaded() {
    echo "$user_id has updated their avatar";
    }
    add_action ('bp_activity_filter_options', 'bp_new_avatar_uploaded');

    }

    no reason for an if statement

    function my_activity_avatar_changed() {

    //then pass in whatever array args you want to the activity item
    xprofile_record_activity( )

    }
    add_action(‘xprofile_avatar_uploaded’,’my_activity_avatar_changed’);


    paulhastings0
    Participant

    @paulhastings0

    So I’m looking at this page. Would these be the 10 appropriate variables?

    'user_id' => $bp->loggedin_user->id,
    'action' => '',
    'content' => '',
    'primary_link' => '',
    'component' => $bp->profile->id,
    'type' => false,
    'item_id' => false,
    'secondary_item_id' => false,
    'recorded_time' => gmdate( "Y-m-d H:i:s" ),
    'hide_sitewide' => false

    So for example?

    function my_activity_avatar_changed() {

    //then pass in whatever array args you want to the activity item
    xprofile_record_activity( $user_id, $component );
    echo ("

    $user_id has a new $component

    ");
    }
    add_action(‘xprofile_avatar_uploaded’,'my_activity_avatar_changed’);


    paulhastings0
    Participant

    @paulhastings0

    Or would that be:


    function my_activity_avatar_changed() {

    //then pass in whatever array args you want to the activity item
    xprofile_record_activity( $user_id, $component );
    echo ("$user_id->display_name has a new $component");
    }
    add_action(‘xprofile_avatar_uploaded’,'my_activity_avatar_changed’);


    paulhastings0
    Participant

    @paulhastings0

    Does anyone else think this is worthy submitting to trac as a new feature for BP 1.3? (but probably not for 1.2.4)

    I mean, FB thinks changing avatars is a big enough deal to include it on all of their user’s walls and I’m sure other BP communities would love this as well.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Activity Stream – “XYZ User has a new avatar”’ is closed to new replies.
Skip to toolbar