1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Gravatar is retina ready

Discussion in 'Off Topic' started by Andy.N, Jul 31, 2012.

  1. Andy.N

    Andy.N Well-Known Member

    Adam Howard and digitalpoint like this.
  2. Rudy

    Rudy Well-Known Member

    Gravatars are still broken in XF and elsewhere. I had to disable it on a few sites since they still serve up stale Gravatars, unless you call it with a unique URL.

    I see my Gravatar here is months out of date now...still...the Automattic team needs to fix this.

    I'm leaving a complaint on that very blog post, in fact...
    RastaLulz likes this.
  3. Andy.N

    Andy.N Well-Known Member

    i didnt see any comment
  4. Rudy

    Rudy Well-Known Member

    It goes into a moderation queue. And since it was a complaint of sorts, I bet it never will get published.
  5. digitalpoint

    digitalpoint Well-Known Member

    Hmmm... interesting. Would be nice if XenForo takes advantage of it at some point.
    Adam Howard and Andy.N like this.
  6. Andy.N

    Andy.N Well-Known Member

    Adam Howard likes this.
  7. theArchitect

    theArchitect Member

    Are Gravatar adverse to any form of constructive criticism?

    I don't have them enabled on my forum, but that is more a personal preference, I didn't know there was a technical glitch with the system.
  8. MagnusB

    MagnusB Well-Known Member

    The avatars are cached and does not update unless you call it from a different URL, so it never updates. I got so many complaints from my users about their gravatars not updating, and somehow I was being blamed, so I just removed the functionality all together.
  9. Rudy

    Rudy Well-Known Member

    That's not exactly a good behavior on their part, I agree. I did modify my one XF installation to add a random code to create a new URL each time, but like Mike said in the other thread, that is wasteful on resources. And XF has no way of guessing when you change your Gravatar.

    I need to look back--I think I actually got a reply, but have been so busy that I never had time to follow up.

    I just wish they'd fix it. My Gravatar here is woefully out of date...proof it's still broken. (I have an Acura now, so... :D )
  10. Andy.N

    Andy.N Well-Known Member

    Your avatar shows Acura logo to me
  11. Rudy

    Rudy Well-Known Member

    Yep, got a reply (it just took a bit of time--no biggie), and I was given instructions to contact support. So, I've contacted one of their "Happiness Engineers" to get some...ummm...happiness. ;)
  12. Rudy

    Rudy Well-Known Member

    I've had the Acura logo for two months, yet even after forcing a refresh here, I still get the classic Buick Wildcat logo. Other sites seem to show whatever they feel like from current or past Gravatars...
  13. Adam Howard

    Adam Howard Well-Known Member

  14. digitalpoint

    digitalpoint Well-Known Member

    I mucked around with this a bit... it doesn't seem to be terribly difficult to support. Although it does require a file edit on XenForo_Model_Avatar... Just need to double the sizes in the "protected static $_sizes" method like so:

     protected static $_sizes = array(
    'l' => 384,
    'm' => 192,
    's' => 96,
    You can't extend that without using late static binding (which was only added to PHP 5.3.0, and since XF's minimum system requirements are 5.2.4, there's no way they could change the code to support it without upping the minimum system requirements for PHP).

    And then add a little CSS (I added it to my EXTRA.css template):

    .avatar .img.s { background-size: 48px;}
    .avatar .img.m { background-size: 96px;  }
    .avatar .img.l { background-size: 192px; }
    .visitorPanel .avatar img,
    .memberCard .avatar img {zoom: 0.5};
    I haven't extensively tested it, but do far, I haven't run into any noticeable issues.

    Essentially you are doubling the vertical and horizontal size of the avatars, but then scaling them back down 50%.

    If you wanted to get tricky, you could apply the changes only based on the user agent (something that supports retina displays).

    The first image is the default way XF shows avatars (1:1 pixel ratio)... the second image is how it shows after the above change on an iPhone (you can zoom even further before it starts pixelating)...


  15. digitalpoint

    digitalpoint Well-Known Member

    It turns out the above CSS works on everything except Firefox (it doesn't support zoom, but IE, Safari, Chrome and Opera all do). Which really sucks. :)
    Adam Howard likes this.
  16. Adam Howard

    Adam Howard Well-Known Member

    php 5.5 is already in development

    They should up the requirement in the next release to php 5.4

    I understand the need for some legacy support, but that is also the problem with other forum developments. They hold onto the past for to long and thus other contents pass them.

    It's one of the draw backs of forums. Even WordPress is moving forward... WordPress 4 (could change to 3.x, but most likely v4) will accept php 5.4 as a default.
  17. Andy.N

    Andy.N Well-Known Member

    There should be no , after 96
  18. Andy.N

    Andy.N Well-Known Member

    This does not apply to avatars already uploaded?
    The existing avatars show appears in the top left 1/4 when you click on the member cards.
  19. digitalpoint

    digitalpoint Well-Known Member

    I swear if it's not one thing, it's something else... I redid the main XenForo UI sprite to be twice the size for retina displays... Since Firefox doesn't support zoom, I decided I would just embed the PNG within a SVG since you cant apply scaling to the embedded image... So it worked well in Firefox (no need to use CSS zoom). Unfortunately there's a bug in WebKit (so Safari and Chrome) that doesn't allow SVG to display an embedded image if the SVG is part of a web page (works fine when viewing the image alone in Chrome/Safari). lol... dumbest crap ever...

    Actually doesn't matter either way. :)
    Adam Howard likes this.
  20. The Dark Wizard

    The Dark Wizard Well-Known Member

    As a developer/designer, I am in favor of the world adapting ONE browser. All these browsers try to be cute and add things that the others don't have or tweak something in a special way, it really bothers me. Maybe not one browser but some sort of better "Common Ground" between browsers because the so called Web Standard for Browsers are a joke, it is a hassle to get something to work in IE then have it break in Chrome, or firefox and vice versa.

Share This Page