Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Embedded forum + Emotify plugin does not work

CsabbencsCsabbencs
edited July 2011 in Vanilla 2.0 - 2.8
When embedding a vanilla forum with Emotify plugin enabled and clicking on ~ 'show emoticons' button, nothing happens but the following error in /js/embed_local.js: href is undefined
line 134:
var href = $(this).attr('href'), isHttp = href.substr(0, 7) == 'http://' || href.substr(0,8) == 'https://', isEmbeddedComments = pagePath.substring(0, 24) == 'vanilla/discussion/embed', noTop = $(this).hasClass('SignOut');
Emoticons show up when not embedding.
Please check.

Best Answer

  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Answer ✓
    Csabbencs

    Thank you so much for your quick response and your help.

    It is now working.

    Thanks again.

Answers

  • Options
    OK, I added the following to the code to check if href is undefined:
    if(typeof(href) !== 'undefined' && href != null) { ... }
    If yes, the whole part of $('a').live('click', function() { ... } is skipped without error and emoticons work.
  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Csabbencs would you mind talking me through what you did, please?

    I have the same error.

    I tried to do what you suggested, by copying the line into the embed_local.js file, but I must have done something wrong, as it hasn't helped.

    Where, exactly should the line go, and what exactly should I paste?

    Thanks.
  • Options
    $('a').live('click', function() { if(typeof(href) !== 'undefined' && href != null) { ... } });
    Use Chrome's console or Firefox's Firebug plugin to see if there's an error with javascript, ie. you may have forgot some curly brackets.
  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Answer ✓
    Csabbencs

    Thank you so much for your quick response and your help.

    It is now working.

    Thanks again.
  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Doh!

    Unfortunately, whilst the drop-down smiley box works, the code seems to cause an error in parsing some variables.

    So, for example, it prevents the page from scrolling to the top or the bottom.

    I'm not expecting you to work to solve this, but if you had a brilliant idea that would be great!
  • Options
    In the next version emotify has migrated away from being js (client) to php (server) so it might work better for you.
  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    Thanks , Luc.

    I'll wait for that.

Sign In or Register to comment.