Site Feedback Thread

8 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

What happened to the smilies?

Back to Forum: Site Feedback
  • User profile image
    Dodo

    What happened to the old Channel9 emoticons?

    Smiley Big Smile Scared Tongue Out Wink Sad Perplexed Expressionless Crying Embarassed Cool Mad Angel Devil

    Doesn't turn into

    Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image

    anymore.

     

  • User profile image
    Geoffreyk

    Yeah, I was working on that yesterday. We are just letting the old, wrong images naturally flush from the cache. Look for them to update on Monday.

  • User profile image
    Geoffreyk

    All new entries will be getting c9 smilies from now on. Old ones will gradually change to the correct images as they drop out of the cache. They have a really long cache time, so it could be a few weeks.

    Cool

  • User profile image
    Dodo

    Ok, wait, how does that work, exactly?

    Did you replace the images on the server? Wouldn't it have been easier to change the URLs in the reference file?

    The C9 emoticons are in http://video.ch9.ms/ecn/content/images/emoticons/C9/*
    & the normal ones are in http://video.ch9.ms/ecn/content/images/emoticons/*

  • User profile image
    Duncanma

    @Dodo: Yes, we replaced them on the server ... the way the code works in that we convert your text smiley into a <img> tag pointing at that location... we keep that converted html in the DB and only regenerate if you edit. So, changing the URL in our code would have fixed all new smileys (and it did), but changing the source images means that any old reference to the smiley in a comment or perhaps copied from within a comment will also be updated.

  • User profile image
    TommyCarlier

    @Duncanma:To solve this kind of re-generation problems in the future (not just related to smileys, but also other situations where the HTML might need to be re-generated), you could make your code lazy: When a page wants to render a post, it gets the original text and the generated HTML from the database. If the HTML is empty, re-generate it and update the database record. When some new feature (or bug fix) requires the HTML of a lot of posts to be re-generated, you just "UPDATE Posts SET Html = NULL" and all the posts will be lazily re-populated (when they are requested).

  • User profile image
    Duncanma

    @TommyCarlier: Yeah, we did think of that, but we decided that we'd build that in when we had a major reason to use it (like an update to the anti-xss code we run or something more serious like that) instead of building it in ahead of time

  • User profile image
    Geoffreyk

    , Dodo wrote

    What happened to the old Channel9 emoticons?

    SmileyBig Smile ScaredTongue OutWinkSadPerplexedExpressionlessCrying EmbarassedCoolMadAngelDevil

    Doesn't turn into

    Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image Generic Forum Image

    anymore.

     

    Just to wrap this up, the images are now dropping out of the cache and being replaced with the c9 versions.

    In a few days, both of these lines will look the same.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.