@hempsworth, do you have any insights on this?
hook on xprofile_screen_change_avatar
Hey Rich, this is a better hook: xprofile_avatar_uploaded
*runs and hides away* i need a big flowchart of hooks
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’);
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’);
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’);
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.