Skip to:

Opened 11 years ago

Closed 11 years ago

#4959 closed enhancement (fixed)

Passing width and height to bp_message_thread_avatar()

Reported by: henrywright's profile henrywright Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: normal
Severity: normal Version: 1.6.4
Component: Messages Keywords: has-patch


The bp_message_thread_avatar() function doesn't doesn't allow you to pass a height and width. This is in contrast to the various avatar functions available such as bp_member_avatar() and bp_displayed_user_avatar().

Attachments (1)

ticket#4959.patch (1.7 KB) - added by henrywright 11 years ago.

Download all attachments as: .zip

Change History (6)

#1 @boonebgorges
11 years ago

  • Keywords needs-patch added; avatar height avatar width message thread avatar removed
  • Milestone changed from Awaiting Review to Future Release

bp_displayed_user_avatar() seems like a different case to me, but bp_member_avatar() does seem like a good parallel (a specific type of avatar to show in the context of template loops). I don't have a problem adding more pass-through args to it. Patches welcome.

#2 @henrywright
11 years ago

Hi @boonebgorges

I noticed there is a filter hook bp_get_message_thread_avatar available which lets you pass a height and width to bp_core_fetch_avatar so there is a work around until a patch is available.

#3 @henrywright
11 years ago

  • Keywords has-patch added; needs-patch removed

Hi Boone,

I've now had the chance to download the SVN client and add some more pass-through args.

Last edited 11 years ago by henrywright (previous) (diff)

#4 @boonebgorges
11 years ago

  • Milestone changed from Future Release to 1.9

Thanks, henrywright. We normally don't put filters on the echoing version of template tags, like you have on bp_message_thread_avatar(), but otherwise this looks pretty good. Let's do it for 1.9.

#5 @boonebgorges
11 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7435:

Pass more arguments through bp_get_message_thread_avatar()

Allowing more bp_core_fetch_avatar() arguments gives greater flexibility to
themers and plugin authors.

Fixes #4959

Props henrywright

Note: See TracTickets for help on using tickets.