you’ll need to use a filter on bp_get_group_avatar and do some leg work to switch it if the activity component is ‘group’. (the way that function is setup, if a user_id is stored in the activity record, even if the component is a group – the object defaults to user regardless. also ‘avatar_dir’ => ‘group-avatars’ is not passed to fetch_avatar)
thanks @nuprn1 – you make it look so easy. Where can I start looking?
@antonrsa let me know if you come right with this and the steps you took please
I will if I can get it right
i can take a look next week – as i wouldn’t mind adding in this feature as well.
Thanks @nuprn1 – I owe you lots of beer!
There appears to be a bug with the bp_get_activity_avatar() function. On closer inspection, these are loafers… wait sorry… it looks like the function is trying to pass the group ID and the component as group, but it adds a redundant check for a user ID, which breaks this functionality.
Going to create a patch right now.
*Edit – patch created:
https://trac.buddypress.org/ticket/2578
@r-a-y
Looked at the patch, thanks for that. Are you asking whether group activity should be patched to both show the group avatar (which you’ve done) and link to the group home page (which you haven’t yet)? Or am I misunderstanding the Q?
Thanks @r-a-y
I’ve implemented the patch but it doesn’t show the uploaded group avatar in the activity stream. It shows a random image that buddypress generates when creating a group.
@antonrsa – Works for me… double check the lines correctly. If it still doesn’t work, let me know.
@r-a-y – can’t get this to work. Here is my code lines 416-440 in bp-activity/bp-activity-templatetags.php – http://pastebin.com/SLR3qk6L
JJJ added this to 1.2.6 (secondary avatars)
@antonrsa – You copied the lines wrong:
http://pastebin.com/8hebkE9s
Anyway like Rich said, JJJ has added secondary avatars to the latest BP 1.2 branch.
Check out testbp.org to see what this looks like:
http://testbp.org/groups/buddypress-testers-614548248/
@r-a-y
is it possible to have the primary avatar of group instead of user avatar?
for e.g. if I joined xyz group the activity should show the avatar of the group followed by the text.
Thanks
@gwu123 – I already posted a solution for this a few posts before:
https://trac.buddypress.org/attachment/ticket/2578/2578.001.patch
Just a FYI, it requires hacking the core.