Re: BP Avatars in bbPress
I like the inclusion of ‘signature’ in a profile field! Nice idea.
I’ve updated bbGroups to optionally transfer all users over to bbpress meta or just users who are in groups. Skipping the bbpress/buddypress utility user.
I’ve got all xprofile groups and group field values going to bbpress.
Got a template tag that allows getting any of those values by user, group, field.
Did some cleanup internationalization for text.
Now doing testing. Gotta look into the problem with tags for hidden groups showing up in the tag cloud. I don’t think you’d be interested in any of this. You’ve already got that stuff implemented.
I think that the only mod of yours I stepped on was the oci_get_user_filter() changes you included in there. I added another filter function oci_get_xprofile_filter($user) that adds all the xprofile fields to the $user array. It won’t break your mod, it’ll just add all the xprofile fields again.
/**
* oci_get_xprofile_filter()
*
* This filter adds all xprofile groups and group fields to bbpress
*
* @param <array> $user
* @return <array> $user array for xmlrpc transport
*/
function oci_get_xprofile_filter($user){
$xprofile_groups = BP_XProfile_Group:: get_all(true); // all except empty groups
foreach($xprofile_groups as $group){
foreach($group->fields as $field){ // all fields for group
$field_obj = new BP_XProfile_Field($field->id, $user,true); // this field
// xprofile_groupname_fieldname to prevent conflicts
$user = array(‘group’ => $group->name, ‘name’ => $field_obj->name, ‘value’ => $field_obj->data->value, ‘type’ => $field_obj->type);
}
}
return $user;
}
add_filter(‘oci_get_user’,’oci_get_xprofile_filter’,10,1);