Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group avatar in activity stream

  • Avatar 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)
  • Avatar 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)

    Avatar of Anton
    Anton
    Participant

    @antonrsa

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

    Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

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

    Avatar of Anton
    Anton
    Participant

    @antonrsa

    I will if I can get it right

    Avatar 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. :)

    Avatar of Anton
    Anton
    Participant

    @antonrsa

    Thanks @nuprn1 – I owe you lots of beer!

    Avatar 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:

    http://trac.buddypress.org/ticket/2578

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

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    That’s correct.

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

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

    Avatar 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

    Avatar of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    JJJ added this to 1.2.6 (secondary avatars)

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

    Avatar of Anton
    Anton
    Participant

    @antonrsa

    Thanks @r-a-y

    Avatar 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

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @gwu123 – I already posted a solution for this a few posts before:
    http://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)

You must be logged in to reply to this topic.