Open agriffard opened 1 year ago
@agriffard I already have a Gravatar Module in OCC, which is discussed some time ago in #2829, I will push a PR for it, then @MikeAlhayek might add the feature that demoed it few weeks ago to display the gravatar beside the author everywhere
Please let me know if sounds is good I will do it ASAP
Thank you @hishamco but I don't think the default should be using Gravatar.
The best of both worlds would be to be open to other implementations but, at first, media picker seems to be a good start. (There could for example have one generating an avatar with the first letter of the name, Gravatar, identicons, MonsterID.)
That means we should OrchardCore.Avatar.Abstractions
right?
That means we should
OrchardCore.Avatar.Abstractions
right?
Probably but let's not overthink it for the first step.
My initial question was to @MikeAlhayek because he seemed to suggest in his demo that it could be in included OC, so let's wait for his answer.
Sure, meanwhile you can have a look to OCC.Gravatar also User Avatar
@agriffard I am not sure if this is something we want to bring into OC. During the demo, @sebastienros was not super exited or did not suggest to bring it to OC. I have no issue bringing it into OC if needed. Meanwhile, you should first test drive it since it is available on nuget. https://www.nuget.org/packages/CrestApps.Components.Users#readme-body-tab
There is liquid helper already as per the readme file. For example, {{ Model.User | display_name }}
. There is also an interface called IDisplayNameProvider
that you can use to get the display name of the given user.
Since the demo, I made some changes to make it flexible. For example, you can now specify which of the following you want to use in your app, each field can be invisible, required or optional in the UI.
Also, the display name can have one of the following options
So if you want a custom format, you can specify liquid like this
@agriffard I forgot to also mention that "when both the Users and User Display Name featured are enabled, the search functionality within the Users UI will expand to include fields such as display name, first name, middle name, or last name in the search results." you may want to ready the notes in the readme file
Rewatching the custom user display name and avatar by @MikeAlhayek (https://www.youtube.com/watch?v=gXJk9t9tjvU&ab_channel=Lombiq).
Do you plan to include such feature directly in OC? (and split it from display name to be able to enable one or the other, or both?)
Is there a corresponding Liquid filter? It could be useful to display easily the author of a content item on the front.