Where's OnComment Javascript method?

Aug 20, 2011 at 12:59 AM

In line 134 of blog.js there's a call to OnComment. I don't see a method with that name. Is this call a hook if needed for external JS?

Coordinator
Aug 23, 2011 at 12:15 PM

What version of BE?  What does the code look like in blog.js before and after line 134?  In BE 2.0 and BE 2.5, I have different code on line 134.

Aug 23, 2011 at 5:03 PM

BE 2.5

BTW, blog.js is hard coded to always minify. I wish the web.config setting to hard minify blog.js still worked. It says it's obsoleted. I would like to see a setting to minify it or not.

 

 

        var callback = isPreview ? BlogEngine.endShowPreview : BlogEngine.appendComment;
        var argument = author + "-|-" + email + "-|-" + website + "-|-" + country + "-|-" + content + "-|-" + notify + "-|-" + isPreview + "-|-" + captcha + "-|-" + replyToId + "-|-" + avatar + "-|-" + recaptchaResponse + "-|-" + recaptchaChallenge + "-|-" + simpleCaptchaChallenge;

        WebForm_DoCallback(BlogEngine.comments.controlId, argument, callback, 'comment', BlogEngine.onCommentError, false);

        if (!isPreview && typeof (OnComment) != "undefined")
            OnComment(author, email, website, country, content);              <================================== is this an extension hook?
    }
    ,
    cancelReply: function () {
        this.replyToComment('');
    }
    ,
    replyToComment: function (id) {

        // set hidden value