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

XF 1.1 The Happy Place v3 - Smilies not showing up

Discussion in 'Troubleshooting and Problems' started by Luxus, May 29, 2012.

  1. Luxus

    Luxus Well-Known Member

    I have installed v3 of The Happy Place, an add-on from inph and Kier. However smilies are not showing up as you can see below:


    Does this add-on not work properly with XF 1.1.2?
  2. Shelley

    Shelley Well-Known Member

    If your using a spritesheet that will be the reason they aren't showing. It's a known issue, you'll have to revert back to using individual images (smilies) if your wanting the smilies to display pending this is the case, that your using a spritesheet.
    Luxus likes this.
  3. Adam Howard

    Adam Howard Well-Known Member

    I've actually started to play with that. Weird code... All I'll say..... (But I am looking at it)
  4. Luxus

    Luxus Well-Known Member

    Thank you, that is indeed the cause.
  5. ArnyVee

    ArnyVee Well-Known Member

    Cool .... hopefully you can get it working properly because it is certainly necessary :)

    Anything that can help organize smilies would be awesome :D
  6. latimer

    latimer Active Member

    Not exactly the most graceful fix, but this should allow you to use both individual images and sprites with the add-on.

    In the "happy_place" template find:
    var smilieFile  = DOM.encode(smilie[1]),
    smilieTitle = DOM.encode(smilie[0]),
    smilieCode  = DOM.encode(smilieName),
    smilieLink  = '<img src="' + smilieFile + '" title="' + smilieTitle + '" alt="' + smilieCode + '" class="smilie" />';
    Add beneath:
    if (!isNaN(parseFloat(smilieFile)) && isFinite(smilieFile))
    var smilieLink  = '<img src="styles/default/xenforo/clear.png" title="' + smilieTitle + '" alt="' + smilieCode + '" class="mceSmilieSprite mceSmilie' + smilieFile + '" />';
    window.tinyMCE.editors['{$editorId}_html'].execCommand('mceInsertContent',false, '<img src="' + $(this).children().attr("src") + '" alt="' + $(this).children().attr("alt") + '"class="smilie" data-smilie="yes" />' );
    Replace with:
    window.tinyMCE.editors['{$editorId}_html'].execCommand('mceInsertContent',false, '<img src="' + $(this).children().attr("src") + '" alt="' + $(this).children().attr("alt") + '"class="' + $(this).children().attr("class") + '" data-smilie="yes" />' );
    I couldn't find a variable that indicates whether or not a smilie is a sprite in xenforo_smilies, so what it does is check if the smilie file is numeric and renders it as a sprite if it is.
    Nolik, Adam Howard, Kevin and 2 others like this.
  7. Shelley

    Shelley Well-Known Member

    I think any fix is welcomed but I've chopped and changed between sprites and individual images so many times due to it breaking I'll just stick with using individual smiley images. Appreciate the fix which I'm sure users will to. (y)
  8. Kevin

    Kevin Well-Known Member

    Had a chance to check this out today... works fine! (y)
    TheVisitors likes this.

Share This Page