Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 8 years ago

#6544 closed enhancement (fixed)

Use WP 4.3 site icon feature to set a blog's "profile photo"

Reported by: imath's profile imath Owned by: r-a-y's profile r-a-y
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Blogs Keywords: has-patch
Cc:

Description

I've been testing the WP 4.3 site icon feature. An administrator will be able to set his site icon into the general settings of his blog. If we remind ourselves about #192, that was the place i thought of for allowing an administrator to set his blog's profile photo :)

As #6026 is dependent of #6534 progresses. I think we should generate a blog's profile photo when his site icon has been set. Once we'll be able to make progress on #6026, we'll only need to create a new tab into the uploader UI to let the admin use the Site icon if he has set one or use a regular avatar upload.

To create a blog's profile photo i'm using the function i've suggested on #5202 (i've included it in this ticket's patch to ease testing.)

Attachments (4)

6544.patch (8.1 KB) - added by imath 9 years ago.
6544.2.patch (8.1 KB) - added by imath 9 years ago.
6544.ray.patch (3.3 KB) - added by r-a-y 8 years ago.
6544.ray.02.patch (5.5 KB) - added by r-a-y 8 years ago.

Download all attachments as: .zip

Change History (16)

@imath
9 years ago

@imath
9 years ago

#1 @imath
9 years ago

Just tested the patch using the customizer site-icon feature to check everything was ok. It is :)
6544.2.patch is updated to latest trunk

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


9 years ago

#3 @DJPaul
9 years ago

@imath I am confused by the terminology so can you check #192 and see if these tickets are the same thing?

#4 @imath
9 years ago

@DJPaul there are relative in a way but not the same thing. I'd say that the part dealing with avatars in #6026 is fixing #192. But here, the goal is to use the wp-site-icon as an avatar by making use of the new function added in #5202.

In a way, once the blogs single item will be in, it will be one option of the avatar UI. In the meantime, it is a way to have blog avatars.

#5 @imath
9 years ago

  • Keywords needs-refresh added

I think if we all agree about my suggested BuddyPress uploads file organization explained in #6570, this patch needs a refresh to use this new organization.

#6 @imath
9 years ago

  • Keywords has-patch removed
  • Milestone changed from 2.4 to Future Release
  • The patch needs a serious refresh to use 5202
  • I'm afraid people won't understand they can use the WP Site Icon as an Avatar
  • I'd feel more secure with a front end UI to have different options (use site icon, upload an avatar..) > #6026

So i prefer to work on this later.

Version 0, edited 9 years ago by imath (next)

@r-a-y
8 years ago

#7 @r-a-y
8 years ago

  • Keywords has-patch added; 2nd-opinion needs-refresh removed

ray.patch is an alternative way to use WP's Site Icon feature as a BP blog avatar (or profile photo).

My approach doesn't copy the site icon to our uploads directory, but merely saves the Site Icon URLs (for both thumb and full-width BP avatar sizes) to blogmeta.

Patch only syncs new site icons and doesn't do any backfilling.

To test:

  1. Navigate to a sub-site's frontend and click on the "Customize" icon in the admin bar.
  2. Next, click on "Site Identity" and set the "Site Icon" to whatever you want.
  3. When you delete or set a new site icon, this info should be synced to blogmeta.
  4. To see if the site icon is synced, navigate to BP's Sites Directory (eg. example.com/blogs/) to see if the site icon is set as the site avatar in the blog loop.
Last edited 8 years ago by r-a-y (previous) (diff)

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


8 years ago

#9 @r-a-y
8 years ago

ray.02.patch now handles backfilling site icons in the blog loop.

You can also disable site icons by using this filter:

add_filter( 'bp_is_blogs_site-icon_active', '__return_false' );

@r-a-y
8 years ago

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


8 years ago

#11 @r-a-y
8 years ago

  • Milestone changed from Future Release to 2.7

#12 @r-a-y
8 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 11150:

Blogs: Use WordPress' Site Icons as blog avatars.

If the current install is using WordPress 4.3+, we'll now use WordPress'
Site Icon as the site avatar in the Sites Directory:
https://codex.wordpress.org/Creating_a_Favicon#WordPress_Version_4.3_or_later

If no site icon is available, we'll fallback to the site owner's user
avatar as before. Under the hood, we are mirroring the site icon URLs to
blogmeta whenever a site icon is updated or deleted.

Devs can disable this functionality with the following filter:
add_filter( 'bp_is_blogs_site-icon_active', '__return_false' );

Fixes #6544.

Note: See TracTickets for help on using tickets.