Project

General

Profile

Actions

Feature #342

closed

Blog Listing Displays User Avatars Instead of Blog Avatars

Added by Matt Gold over 13 years ago. Updated over 4 years ago.

Status:
Resolved
Priority name:
Low
Assignee:
Category name:
Blogs (BuddyPress)
Target version:
Start date:
2010-09-17
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

In the listing of all blogs, I see avatars of members: http://commons.gc.cuny.edu/blogs/

Blogs don't really have avatars, so maybe this is by design? If so, I don't remember seeing it before, and I don't think it should be the case. Can you let me know what should be shown there, and then we'll take it from there?


Related issues

Related to CUNY Academic Commons - Feature #1134: Build Flexibility for Image Choices into Featured Content WidgetResolvedBoone Gorges2011-08-23

Actions
Related to CUNY Academic Commons - Support #1173: Avatars for group blogs should fall back on group avatar, not admin user'sResolvedRaymond Hoh2011-09-14

Actions
Related to CUNY Academic Commons - Support #12190: Site avatar in directory is not what user expectsResolved2019-12-05

Actions
Actions #1

Updated by Boone Gorges over 13 years ago

  • Status changed from Assigned to Reporter Feedback
  • Target version set to Future release

This is intended behavior. From the inline docs:

/*** * In future BuddyPress versions you will be able to set the avatar for a blog. * Right now you can use a filter with the ID of the blog to change it if you wish. * By default it will return the avatar for the primary blog admin.
*/

The only obvious option is to shut off the avatars altogether.

Actions #2

Updated by Boone Gorges over 12 years ago

Bump. Do you have suggestions for what should show as the blog avatar, if not the author's picture? Or should we remove the avatar altogether?

Actions #3

Updated by Matt Gold over 12 years ago

Maybe some version of the header image, if there is one? Maybe people should be able to pick a blog avatar when they set up their blogs (and edit it later)? I do think it's important, since it shows up in sitewide blog listings and also affects blogs when we feature them on the homepage.

Actions #4

Updated by Boone Gorges over 12 years ago

Themes all store their header images differently, so pulling it automatically will be next to impossible. Providing a mechanism for blog owners to upload a custom blog avatar is possible, though it essentially adds a pretty extensive bit of functionality to BP. I would argue that this is not, in fact, very important, at least when compared with other, higher impact items on our roadmap, but I'm willing to defer to you if you think it matters that much. If we go ahead with your suggestion (instead of my preference of leaving things as is - easiest - or removing them altogether - also pretty easy), we'll have to make some decisions about how the feature would work. Do you put the ui in BP (if so, where?) Or on the dashboard?

Actions #5

Updated by Matt Gold over 12 years ago

I'm okay with leaving things as they are. The more I think about it, the more I think that the real issue is only on the Featured Content widget, since that's when it really feels odd to have someone's photo up there so prominently (and I know that some members feel embarrassed about that). I'll create a separate ticket if you think that's a more focused and useful way forward.

Actions #6

Updated by Boone Gorges over 12 years ago

Yes, I think that adding the feature to the Featured Content widget is more sensible, since the UI is mostly already there. Please do open a ticket for it, and we can assign it a milestone, and leave this one in future release for when we have more resources.

Actions #7

Updated by Matt Gold over 12 years ago

Done. Thanks.

Actions #8

Updated by Boone Gorges almost 12 years ago

  • Status changed from Reporter Feedback to Assigned
  • Assignee changed from Boone Gorges to Dominic Giglio
  • Priority name changed from Normal to Low

Dom, could you take a look at the way BP implements group and user avatars, and get a sense of what it would take to port the infrastructure to the blogs component?

Actions #9

Updated by Dominic Giglio over 11 years ago

This is an interesting issue. There seems to be some code that's already been added to BP to handle this kind of functionality in the future. From what I could gather so far, the blogs page is getting the user's avatar during a BP loop by calling bp_blog_avatar(). That function is defined in the BP_Blogs_Template class on line 275 of bp-blogs-template.php. There's a slightly confusing comment right in the middle of bp_get_blog_avatar() which you've already partially quoted above:

/***
 * In future BuddyPress versions you will be able to set the avatar for a blog.
 * Right now you can use a filter with the ID of the blog to change it if you wish.
 * By default it will return the avatar for the primary blog admin.
 *
 * This filter is deprecated as of BuddyPress 1.5 and may be removed in a future version.
 * Use the 'bp_get_blog_avatar' filter instead.
 */

It's the second part of the comment that confuses me. It says to "Use the 'bp_get_blog_avatar' filter instead," but the code right below that DOES use that filter. Maybe BP core was recently updated but the comment wasn't? I can see where bp_core_fetch_avatar() is being called in the filter (line 302), so I understand why a user's avatar is being displayed by default. The new code I mentioned above is actually in bp_core_fetch_avatar(), one of the defaults is 'object' and its inline comment states: // user/group/blog/custom type (if you use filters). So it looks as if this feature has gone beyond planning, it just hasn't been fully implemented.

The DB part shouldn't be too hard, I think adding a new class variable to BP_Blogs_Blog that stores an 'avatar' value from the wp_bp_user_blogs_blogmeta table should work fine. It could then be referenced and checked elsewhere in the code to output a blog avatar when one exists and fallback on a user's when there is no blog avatar.

The missing piece of the puzzle seems to be the UI. Where do you have a user enter a url to (or upload) an avatar image? Do you build a form into BP core that can be called on the sites page? Do you add a page in the dashboard? (I don't like the dashboard idea, too many people don't use/understand the dashboard enough) Right now there is no other UI for blogs than the create page.

So it would appear that we could approach this issue from one of two different directions. We could work on a BP patch that adds the code to support these ideas. Or we could add this feature directly to the commons. Most of the code needed to let a user associate an avatar with there blog appears to exist. It would be a matter of building a UI for them to input their avatar. I think using filters we could check for an image in an upload dir and display it if it exists. All the code for that seems to already be in bp_core_fetch_avatar().

Let me know what you think when you have a minute, maybe this should move to a back burner until after 1.4?

Actions #10

Updated by Matt Gold about 10 years ago

In a cbox thread , Scott Voth linked to the BuddyPress Blog Avatar Plugin

Could this plugin solve this issue for us?

Actions #11

Updated by Boone Gorges almost 10 years ago

  • Tracker changed from Bug to Feature
Actions #12

Updated by Matt Gold almost 10 years ago

Wondering whether the BuddyPress Blog Avatar plugin might work for this: http://wordpress.org/plugins/bp-blog-avatar/

Actions #13

Updated by Michael Smith over 9 years ago

I thought I'd update this considering the new My Commons personal homepage which is about to be released. It would be nice to have a blog avatar so that we could use the nested avatar look similar to the group avatar with individual making an update. Also I noticed it looks particularly confusing when you are logged-in and visit your 'My Sites' page and see your own avatar for every blog in the list.

As far as a UI that we could use for existing sites, possibly the My Sites page could prove useful. Possibly filtering by blogs which you administrate (though that would be another feature as well). As part of this process we may need to create a default blog avatar, it would prevent confusion with personal avatars as well as serve as a prompt to consider adding a custom avatar.

Actions #14

Updated by Matt Gold over 9 years ago

  • Target version changed from Future release to 1.8

Boone, please revisit this for 1.8 and move back to future release if the above plugins won't work/help.

Actions #15

Updated by Boone Gorges over 9 years ago

  • Category name changed from WordPress (misc) to Blogs (BuddyPress)
Actions #16

Updated by Boone Gorges about 9 years ago

  • Assignee changed from Dominic Giglio to Boone Gorges
  • Target version changed from 1.8 to 1.9

Gonna punt this one again. BuddyPress 2.3 is likely to include a rewrite of the way that group and user avatars work. One of the eventual goals of this will be to allow for the easier spinning-up of things like blog avatars. Once BP 2.3 is out, I'd be glad for us to build this BP feature on CAC time, but building the more general attachment API is probably outside of a reasonable scope for us, and in any case will probably not be doable for 1.8.

Actions #17

Updated by Boone Gorges over 8 years ago

  • Target version changed from 1.9 to 1.10
Actions #18

Updated by Boone Gorges over 7 years ago

  • Target version changed from 1.10 to Future release

It's going to require a lot of work to get the BP ticket over the hump, which doesn't seem like top-priority for our team at the moment.

Actions #19

Updated by Boone Gorges over 4 years ago

  • Status changed from Assigned to Resolved
  • Target version changed from Future release to 1.10.2

Since version 2.7, BuddyPress has this feature built in: by setting the WP site icon (Dashboard > Customize > Site Identity), you can set the site avatar. We'll call this fixed as of Commons 1.10.2.

Actions #20

Updated by Boone Gorges over 4 years ago

  • Related to Support #12190: Site avatar in directory is not what user expects added
Actions

Also available in: Atom PDF