Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_get_group_avatar_thumb returning empty image?


  • 5631871
    Inactive

    After updating from 1.0.3 to 1.1.3, the template tag for group avatars (bp_get_group_avatar_thumb) has stopped working, and I’m not sure how to fix. The avatar works fine on the actual group page. Any ideas would be appreciated.

    The template (all the other function calls work appropriately):

    http://gist.github.com/258549

Viewing 3 replies - 1 through 3 (of 3 total)

  • 5631871
    Inactive

    I think it comes down to how the $groups_template global works.


    5631871
    Inactive

    I hacked my around it by putting the thumb_avatar column in the default returned fields for the group object, but there must be a better way.


    Brajesh Singh
    Participant

    @sbrajesh

    The reason is bp_get_group_avatar_thumb() assumes you are inside group loop and simply ignores the $group,which you passed.

    A possible solution will use this method instead.

    //code edited from here

    Edit:checked my template, It seems ,It does not work. Instead use

    bp_core_fetch_avatar( array( 'item_id' =>YOURGROUPID, 'object' => 'group', 'type' => 'thumb', 'width' => 64 ,'height' => 64 ) )

    Hope It helps.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘bp_get_group_avatar_thumb returning empty image?’ is closed to new replies.
Skip to toolbar