可选择头像

Avatars are a big part of anyone’s online identity. Discourse already supports 3 options when it comes to avatars: based on the first letter of your username, your Gravatar or any images you want to upload.

image

But what if you want to provide your users with a limited set of avatars to choose from? It’s now possible thanks to the “selectable avatars” feature!

As an admin, if you click Edit next to the selectable avatars site setting, a modal will pop up and ask you to start uploading avatars.

image

You can either drag & drop up to 10 images at a time or click Upload Picture to browse your computer to select the images you want to upload.

If you want to remove some of the uploaded images, you just need to click on it.

Note: Make sure you click :white_check_mark: after closing the modal to actually save the list.

After enabling the selectable avatars enabled site setting, two things will happen

  • Newly created user will automatically be affected a random avatar from the list.
  • Users will be presented with the same list to choose from whenever they want to change their avatar.

Note: existing users will keep their current avatar until they change it.

Enjoy :heart_eyes_cat:

No cats were armed in the making of this topic.

58 个赞

Since it’s called “selectable avatars”, my expectation would be that they’re selectable but not enforced… Would it be a big change to make these avatars selectable without changing anything else?

Oh, and the logical next step would obviously be to make it possible to include avatar-sets in themes… Or is this already possible?

11 个赞

I know that my home site would really get some usage out of this provided it isn’t enforced that you must have one of these avatars, and that it was just another option alongside the letter/gravatar/custom image. Is that how this works, and if not, could it be an option?

7 个赞

I think the point of the feature is to tightly control the available avatars for branding / theming / safety purposes.

5 个赞

We’re getting reports from users that they are able to use this tool to select avatars for other members, including site administrators…

I haven’t confirmed whether they are able to actually do it (none have been game enough to click the save changes button yet), but they can definitely see the “Change your profile picture” popup if they click on another user’s profile image.

7 个赞

That bug was fixed and will be deployed tomorrow to all our customers.

12 个赞

I would love to use this feature too, but can’t delete profile pics for those who have already uploaded one.

Tight control is not the only valid use case. My site encourages photos but in the absence of photos, we would at least like to be able to visually differentiate users at a glance. The colored letters don’t do that very well; avatars from a list would do it much better.

5 个赞

Agreed with @markschmucker, such tight control of avatars is not the value I was looking for when I went searching for this feature.

Really, I want all of my users just to start out with one of the set avatars I have made instead of off-brand letters, but of course after that I want them to have the freedom to customize their profiles as they see fit.

13 个赞

I hear you :wink: It’s still on my list.

12 个赞

你好 @zogstrip 及各位!目前这个功能已经很不错了,但如果稍作调整,它就能完美无缺!

太长不看版 - 本线程似乎有一个共同主题:

管理员希望能够填充一个品牌头像池或列表。(✓ 可行)管理员还希望自动且随机地为每位新用户分配一个“可选头像”。(✓ 可行)结合上述两点,管理员希望允许用户如果不想使用“可选头像”池/列表中的默认头像,可以上传自己的自定义个人资料图片或头像。(:disappointed_face: 目前不可行,我没错吧?)——基本上是让“可选头像”发挥当前“默认头像”设置的作用。

––––––––––––––––––––––––––––––––––––

目前,存在一些看似在语义上相互冲突的设置:

  • 允许上传头像 ❑ 允许用户上传自定义个人资料图片。
  • 启用可选头像 ❑ 强制用户从列表中选择头像。

我希望能够启用“可选头像”,而不强制用户仅使用该库中的图片。这就是为什么我选中了另一个选项“允许用户上传自定义个人资料图片”。但是,当选中“强制用户从列表中选择头像”选项时,该选项无法生效。

实际使用场景

当新用户加入社区时,他们通常不会自定义个人资料图片或头像。我开发过几个社区,并评估了数百个在线社区样本,发现这一现象在社区中普遍存在。让用户添加个人资料图片或头像是在 承诺曲线 上相当重要的一步。他们通常是在与新社区建立身份认同和信任,并打算长期停留、积极参与(而不仅仅是创建一个账号问一个问题就再也不回来的用户)之后才会这样做。

因此,当新成员在论坛中发帖时,如果大家都使用相同的通用个人资料图片,看起来就像同一个人回复一样。或者,这可能会让人觉得成员参与度不高。Discourse 在一定程度上解决了这个问题,通过更改背景色和用户的首字母。但如果每位新用户都能从预设的图片池中自动(随机)分配一个个人资料图片,那么当这些人发帖时,社区看起来会更加友好、更具欢迎感,并且显得拥有更多积极参与的用户。

这是一个优质社区线程的示例。包含一些已注册会员,以及部分未花时间上传头像的成员(由红色箭头指示)

这是我们不想要的示例……所有人的头像都一样。

––––––––––––––––––––––––––––––––––––

我不确定在管理员设置中解决此问题的最佳方法 ¯\ _ (ツ)_/¯

建议的功能更新

一个建议是在“默认头像”选项下方添加另一个选项,并将其命名为“将可选头像作为默认值”(或类似名称)。然后添加如下描述:
❑ 从“可选头像”列表中随机分配一个头像作为新用户的默认头像,直到用户手动更改头像为止。

基于当前“默认头像”设置的逻辑,如果您添加了上述建议的设置 :up_arrow:︎,那么可以将前端 UI 修改为如下所示:

注意:我在“自定义图片”下方添加了一个部分,假设那是管理员上传的“可选头像”列表。灰色高亮显示的头像将是系统选中的头像。(如果切换了“自定义图片”选项,高亮可能会消失。当切换“系统分配的个人资料图片”时,来自“可选头像库”的相关头像将被高亮显示。)

默认情况下,三个选项中的第一个会被选中……但用户仍然可以选择其他选项,使用 Gravatar 或上传自定义图片。如果他们喜欢“可选头像”列表,可以选择一个更喜欢的。

我相信肯定有比我建议的更好的方法来实现这一目标,但希望这能说明我希望 Discourse 通过“可选头像”实现的功能,我相信其他人也在寻求类似的功能。

8 个赞

我刚刚发现了一个变通方法,可以让你上传一个预定义的“可选头像”列表,并将这些设置为“默认头像”,同时允许用户将自己的头像更改为自定义的个人资料图片。看来以下用户曾提出过这个需求:@Elliott_Mozley@D_Friday@markschmucker@orangeandblack5
––––––––––––––––––––––––––––––––––

为新用户设置默认头像,并允许自定义头像/个人资料图片:

  1. 访问管理员设置并搜索“avatar
  2. 找到“可选头像”选项,点击“编辑列表
  3. 点击“上传”按钮,选择所有要用作新用户“默认头像”的文件
  4. 右键单击每个新上传的头像,选择“复制图片地址
  5. 粘贴你刚刚上传的每个头像的“图片地址”。(完成后请务必点击 ✓)

大功告成!你的“可选头像”列表现在将自动随机分配给新用户。随后,他们可以进入自己的账户上传自定义的个人资料图片!

感谢 Discourse 团队让这一切成为可能!

16 个赞

是否有任何方法可以配置,让用户能够从“可选头像”列表中进行选择,同时又不剥夺他们上传自定义头像的能力?

@jord8on 建议的解决方案/界面非常完美,但……是否有人确定 Discourse 是否要求必须在“可选头像”和用户上传的头像之间二选一,而无法同时支持两者?

2 个赞

我认为只需不勾选“强制用户使用列表中的头像”复选框即可。
这样用户就仍保留另外两个选项(使用字母或上传自己的照片)。

2 个赞

你可能会这么想,没错——但当你取消勾选“强制用户使用列表中的头像”后,用户就无法再访问头像列表了。我正在想办法让头像“可用”,但又不“强制要求”。

有什么建议吗?:slightly_smiling_face:

2 个赞

据我理解,可选头像的全部意义在于将头像选择限制在一个安全、预先确定的列表中。允许用户上传头像与这一目标背道而驰。

3 个赞

这是一个用例。另一个用例是,您希望支持您的社区拥有更多选择,同时不限制他们的选项,也不要求他们必须熟悉上传操作。

我理解您所描述的用例,也很高兴 Discourse 支持这一功能。

但这并不意味着,如果该功能不需要“全有或全无”式的实施,而是将选择权交给社区管理者,它会变得更加有用。

5 个赞

我希望系统能使用系统照片,但如果系统照片不可用,则从列表中选择一个。

为什么?因为有时用户会被禁止上传系统照片,而有些用户则被允许。

随机分配一个选项尚可,但那样就需要使用非性别或非种族特征的头像。因此,我更倾向于让用户自行选择,以此彰显多样性。

3 个赞

主题组件能否提供此类图片?

2 个赞

有限的头像集有时在移动视图的帖子列表中与回复功能搭配不佳。新大陆论坛上的示例如下:

这两条消息并非回复同一个人,但新大陆论坛的头像集相当有限(正如我根据经验所见,通常只允许使用一组可用头像的论坛都会如此)。此问题在桌面视图中并不存在,因为用户名会显示在头像旁边:

在移动设备上浏览和阅读此类主题时,很容易造成混淆。

Discourse 是否有计划规避这一小问题?目前,我看不到其他方法,除非作为管理员在移动视图中也添加用户名。

5 个赞

@here 给大家带来一个好消息 ;)\n\nhttps://github.com/discourse/discourse/pull/15878

10 个赞