Gravatars and cool looking identicons?

  • Plugin & Theme Dev Anime Lovers GNU/Linux

    @zenkamal said:

    This is a low priority request, but Discourse just implemented a replacement default avatar, consisting of the first letter of the user name in a square.

    It actually looks pretty nice! Fits in with the clean look of NodeBB, and is reminiscent of gmail's lettered boxes on mobile devices.

    I am a fan of the letter avatars to be honest using the first letter (or possibly first 2 depending).
    They've implemented them by converting them into full images, however I don't think that's the best solution. The ideal solution would be to use pure HTML and CSS only. It's more flexible.

  • NodeBB Admin

    Was wondering the same thing, why not just take the usernames first letter and put it there in a span or something and style it that way.

  • @baris @trevor

    Here is their response to css vs image:

    Q: I think using SVG would have saved much storage space and added more flexibility to avatar creation.

    A: No very against that for 2 reasons

    It is hostile to embedding (like @codinghorror has on his blog)
    It complicates stuff. Now avatars are dead simple... /user_avtar/sam/{size}/{upload_id}.png no special code, easy to explain, no complex branch logic.

  • Admin

    I guess that makes sense, re: embedding. You'd have to build the feature on external sites like in the comments. At the same time I don't really like the idea of saving the images locally. Could probably generate an SVG dynamically (and then cache it) via something like this?

    Would be cool if we could check if there's a space in your name, ex. "Andrew Rodrigues" would give you an "AR" 😉

  • @psychobunny You mean a space in your username? If we used initials from real names, I bet someone would complain about privacy. I guess you could be PB.

    Anyways, Discourse looks much cleaner since they changed. Well, moderately cleaner.

  • GNU/Linux Admin

    Then what happens if your name is Chinese and begins with 林? I wonder if it would work 😄

  • Admin

    You mean like this?林林林林林

    Most forums have figured that problem out already like this.

    RE: space in username, we allow that right? I'm actually not sure how that works. Magic.

  • GNU/Linux Admin

    Hah, for sure it works in NodeBB, I made sure of that... I mean how would that character work if we were going to do the "first letter avatar" thingie 🙂

    Edit: We allow spaces in names... they get slugs, after all.

  • In mine opinion letter avatars should be by default. It's avoiding boring default avatars, and its embed perfectly in flat modern designs. Plus the letter association help u to know who is poster. Plugin like this would be really awesome.

  • @psychobunny said:

    You mean like this?林林林林林

    Most forums have figured that problem out already like this.

    You could indeed just disallow non-English characters, but considering there's even non-English TLDs, that might be a bit too Web 2.0 ("Web 2.0" meaning "overused buzzword" as well as "far, far into the past")
    As long as your letter-to-image thingmajicky supports unicode, there shouldn't really be any problem. Though if some essential piece of core technology for some reason doesn't, you could always just store it as punycode. (that's how they got IDNs to work for domain names)

Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.