Opened 13 years ago
Closed 13 years ago
#3500 closed defect (bug) (fixed)
Get correct avatar thumbnail size in single activity view
Reported by: | Jonnyauk | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | minor |
Severity: | minor | Version: | |
Component: | Activity | Keywords: | has-patch |
Cc: | contact@… |
Description
When you are viewing a single activity item the size parameters are set correctly to fetch the avatar ($bp->avatar->full->height, $bp->avatar->full->width), but the actual image file fetched is the smaller thumbnail.
FILE: bp-activity/bp-activity-template.php
FUNCTION: bp_get_activity_avatar()
In bp_get_activity_avatar() there is a check for this, but the $type variable is still set to 'thumb' from when it is called in bp-themes.bp-default/activity/entry.php
Patch attached for bp_get_activity_avatar() function
1) Double check it is a single activity view
2) Stop $type variable being polluted, set to 'full' to pass onto bp_core_fetch_avatar()
Attachments (3)
Change History (6)
#1
@
13 years ago
- Component changed from Core to Activity
- Milestone changed from Awaiting Review to 1.5
- Priority changed from normal to minor
- Severity changed from normal to minor
#2
@
13 years ago
- Cc contact@… added
Agreed - much clearer for users to see whats going on if correct params used in theme file rather than hack in bp_get_activity_avatar() - I was just building on what was already in there!
I also noticed that my 01 patch was polluting the comments on single view and loading the large avatar thumbnails and reszing to the smaller height - was just working through, but 3500.02 and 3500.03 patches fix this.
New patch attached (3500.03) - remove bp_is_single_activity and combine backpat code for $bp avatar sizes in bp_get_activity_avatar.
Good call. This is definitely a bug.
It seems to me that the check for 'thumb' == $type && bp_is_single_activity() is a hack. If we want a full avatar, we should request it. I've attached 3500.02.patch, which has what is, IMO, a better solution (it sets an intelligent default, and removes the argument from the template). Just need someone to glance at it and make sure it won't break existing themes. I'm pretty sure it will be backward compatible.