Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group avatar in activity stream

  • Profile photo of Anton
    Anton
    Participant

    @antonrsa

    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)
  • Profile photo of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    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)

    Profile photo of Anton
    Anton
    Participant

    @antonrsa

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

    Profile photo of nit3watch
    nit3watch
    Participant

    @nit3watch

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

    Profile photo of Anton
    Anton
    Participant

    @antonrsa

    I will if I can get it right

    Profile photo of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

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

    Profile photo of Anton
    Anton
    Participant

    @antonrsa

    Thanks @nuprn1 – I owe you lots of beer!

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    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

    Profile photo of Beck B
    Beck B
    Participant

    @beckb

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

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    That’s correct.

    Profile photo of Anton
    Anton
    Participant

    @antonrsa

    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.

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

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

    Profile photo of Anton
    Anton
    Participant

    @antonrsa

    @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

    Profile photo of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    JJJ added this to 1.2.6 (secondary avatars)

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

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

    Profile photo of Anton
    Anton
    Participant

    @antonrsa

    Thanks @r-a-y

    Profile photo of gwu123
    gwu123
    Participant

    @gwu123

    @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

    Profile photo of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @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