Group avatar in activity stream
Is it possible to have the group avatar displayed instead of the member if it is a group activity item?
- The topic ‘Group avatar in activity stream’ is closed to new replies.
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 can take a look next week – as i wouldn’t mind adding in this feature as well.
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:
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?
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.
JJJ added this to 1.2.6 (secondary avatars)
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:
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.
@gwu123 – I already posted a solution for this a few posts before:
Just a FYI, it requires hacking the core.