@pitaj That makes sense.
Thank you, I think that answers my question.
Interesting! Is this on master already?
Another bug is the sidebar on mobile login.
Seems like no default is set for a guest user.
Also in the chat dropdown.
left: 22px from
#menu .chat-list li a .user-icon+i, .header .chat-list li a .user-icon+i
...I think thats it.
I must say, its nice to see that NodeBB won't depend so much on outside resources by default.
You may have noticed I now have a user icon instead of an avatar... we're testing something new because we're looking to remove gravatar from core
New users will still show their old avatars (gravatars or not), so hopefully this isn't a breaking change. Please report any oddities here (such as user icons missing).
Will you keep gravatar as a plugin?
@exodo that sounds like an "of course" or "we'll keep it in core as an option" thing to me
@pitaj In general, we'll try to minimise core as much as possible, so gravatar will be a plugin. Whether or not we develop it, or a third-party developer, is still open.
When this is tested and merged, there won't be gravatar support for a little bit, until said plugin is created.
How will this work with plugins wanting to show a users' avatar?
Breaks the chat taskbar.
The icons seem to be predominantly red in colour. Is the colour randomly generated?
They are, yes. From a selection of 5 or 6 colours.
Custom colors ftw. You should add the uid as a classname for custom colors with custom CSS.
Something like user-icon-[uid]
@julian you could get the colours to be more varied than that. In my project I used an MD5 hash of the person's username to get a hex colour that's highly likely to be unique. For ex:
$hash = md5( $username ); $hex_colour = substr( $hash, 0, 6 );
md5() function but you could maybe use a library?
@henrywright hell, you could just generate six random hex characters and you'd do fine.
@pitaj you could, but that doesn't quite achieve uniqueness. MD5 isn't perfect but 99.99% of the time you'll get a unique colour from a username argument.
@henrywright yeah, there's a chance, but it's rediculously small. You are 99.99999% likely to get a unique color.
@pitaj true but calling something like MD5 on a username string will ensure you get the exact same colour for a particular user each time. That's something that's important if you're doing this each time on the fly and not storing the generated image.