Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group avatar in activity stream

  • @antonrsa

    Participant

    Is it possible to have the group avatar displayed instead of the member if it is a group activity item?

Viewing 17 replies - 1 through 17 (of 17 total)
  • @nuprn1

    Participant

    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)

    @antonrsa

    Participant

    thanks @nuprn1 – you make it look so easy. Where can I start looking?

    @nit3watch

    Participant

    @antonrsa let me know if you come right with this and the steps you took please

    @antonrsa

    Participant

    I will if I can get it right

    @nuprn1

    Participant

    i can take a look next week – as i wouldn’t mind adding in this feature as well. :)

    @antonrsa

    Participant

    Thanks @nuprn1 – I owe you lots of beer!

    @r-a-y

    Keymaster

    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

    @beckb

    Participant

    @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?

    @r-a-y

    Keymaster

    That’s correct.

    @antonrsa

    Participant

    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.

    @r-a-y

    Keymaster

    @antonrsa – Works for me… double check the lines correctly. If it still doesn’t work, let me know.

    @antonrsa

    Participant

    @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

    @nuprn1

    Participant

    JJJ added this to 1.2.6 (secondary avatars)

    @r-a-y

    Keymaster

    @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/

    @antonrsa

    Participant

    Thanks @r-a-y

    @gwu123

    Participant

    @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

    @r-a-y

    Keymaster

    @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.

Viewing 17 replies - 1 through 17 (of 17 total)
  • The topic ‘Group avatar in activity stream’ is closed to new replies.
Skip to toolbar