OK, maybe we can look at this before support ends. I added a pause to the live comments.
The code I am using is this in the template file cmts_main.html :
<script>
$(document).ready(function(){
start_comments();
});
var interval;
var a = '__html_id__'.split("-", 2);
var sCmtsClassName = 'oCmts' + a[0].charAt(0).toUpperCase() + a[0].slice(1) + a[1];
function start_comments()
{
document.getElementById( "pausecomments" ).setAttribute( "onClick", "pause_comments();" );
document.getElementById( "pausecomments" ).setAttribute( "value", "Pause Live Comments" );
interval=setInterval(function(){
if ($('#cmts-box-__html_id__ form:visible > input[name=CmtParent][value=0]') && (!$('#cmts-box-__html_id__ .cmt-text-post').size() || !$('#cmts-box-__html_id__ .cmt-text-post').val().length) && !$('#cmts-box-__html_id__ form:visible > input[name=CmtParent]:not([value=0])').size())
window[sCmtsClassName]._getCmts($('a[name=cmta-__html_id__]'), 0, function () {});
}, 20000);
}
function pause_comments()
{
clearInterval(interval);
document.getElementById( "pausecomments" ).setAttribute( "onClick", "start_comments();" );
document.getElementById( "pausecomments" ).setAttribute( "value", "Start Live Comments" );
}
</script>
and in BxDolCmts.js
// get comment replies via ajax request
BxDolCmts.prototype._getCmts = function (e, iCmtParentId, onLoad, iStart, iPerPage)
{
var $this = this;
var oData = this._getDefaultActions();
oData['action'] = 'CmtsGet';
oData['CmtParent'] = iCmtParentId;
oData['CmtOrder'] = this._sOrder;
if(iStart) {
oData['CmtStart'] = iStart;
$this._iStartLast = iStart;
} else if ($this._iStartLast) {
oData['CmtStart'] = $this._iStartLast;
}
if(iPerPage) {
oData['CmtPerPage'] = iPerPage;
$this._iPerPageLast = iPerPage;
} else if ($this._iPerPageLast) {
oData['CmtPerPage'] = $this._iPerPageLast;
}
if(e)
this._loading (e, true);
jQuery.post (
this._sActionsUrl,
oData,
function(s) {
if(iCmtParentId == 0) {
$('#cmts-box-' + $this._sSystem + '-' + $this._iObjId + ' .cmts > ul').bxdolcmtanim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
$(this).replaceWith(s).bxdolcmtanim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
});
}
else
$('#cmt' + iCmtParentId).append($(s).filter('.cmts').addClass('cmts-margin').hide()).children('.cmts').bxdolcmtanim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
onLoad();
$this._loading (e, false);
}
);
};
BxDolCmts.prototype.cmtEdit = function(e, iCmtId) {
var $this = this;
var oData = this._getDefaultActions();
oData['action'] = 'CmtEdit';
oData['Cmt'] = iCmtId;
if ($('#cmt' + iCmtId + ' .cmt-body > form').length) {
$('#cmt' + iCmtId + ' .cmt-body').bxdolcmtanim(
'hide',
$this._sAnimationEffect,
$this._iAnimationSpeed,
function() {
$(this).html($this._oSavedTexts[iCmtId]).bxdolcmtanim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
});
return;
}
else
this._oSavedTexts[iCmtId] = $('#cmt' + iCmtId + ' .cmt-body').html();
jQuery.post (
this._sActionsUrl,
oData,
function (s) {
if ('err' == s.substring(0,3))
alert (s.substring(3));
else
$('#cmt' + iCmtId + ' .cmt-body').bxdolcmtanim(
'hide',
$this._sAnimationEffect,
$this._iAnimationSpeed,
function() {
$(this).html(s).find('[name = CmtMood][value=' + $.trim($('#cmt' + iCmtId + ' .cmt-mood').html()) + ']').attr('checked', 'checked');
$(this).bxdolcmtanim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
if($this._iGlobAllowHtml == 1)
$this.createEditor(iCmtId, $('#cmt' + iCmtId + ' .cmt-body > form').find('[name=CmtText][tinypossible=true]'));
});
});
}
);
};