diff --git a/composer.json b/composer.json index c0a03d6..909fbbe 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "mChat Extension for phpbb 3.1.x", "homepage": "http://www.dmzx-web.net", - "version": "0.0.1", + "version": "0.0.2", "time": "2015-03-10", "keywords": ["phpbb", "extension", "mchat"], "license": "GPL-2.0", diff --git a/migrations/mchat_schema.php b/migrations/mchat_schema.php index 6caed1b..f21fe03 100644 --- a/migrations/mchat_schema.php +++ b/migrations/mchat_schema.php @@ -20,7 +20,7 @@ class mchat_schema extends \phpbb\db\migration\migration array('config.add', array('mchat_on_index', true)), array('config.add', array('mchat_new_posts', false)), array('config.add', array('mchat_stats_index', false)), - array('config.add', array('mchat_version','0.0.1')), + array('config.add', array('mchat_version','0.0.2')), array('permission.add', array('u_mchat_use')), array('permission.add', array('u_mchat_view')), diff --git a/sounds/add.swf b/sounds/add.swf new file mode 100644 index 0000000..5d8b6c2 Binary files /dev/null and b/sounds/add.swf differ diff --git a/sounds/del.swf b/sounds/del.swf new file mode 100644 index 0000000..e306cc4 Binary files /dev/null and b/sounds/del.swf differ diff --git a/sounds/error.swf b/sounds/error.swf new file mode 100644 index 0000000..d05b7ef Binary files /dev/null and b/sounds/error.swf differ diff --git a/styles/prosilver/template/mchat_ajax_mini.js b/styles/prosilver/template/mchat_ajax_mini.js index 188dd4a..974f18f 100644 --- a/styles/prosilver/template/mchat_ajax_mini.js +++ b/styles/prosilver/template/mchat_ajax_mini.js @@ -9,8 +9,8 @@ **/ var $jQ=jQuery.noConflict(true); -var hasFocus = true;$jQ(function(){if(!mChatArchiveMode){var scrH=$jQ('#mChatmain')[0].scrollHeight;$jQ('#mChatmain').animate({scrollTop:scrH},1000,'swing');if(mChatPause){$jQ('#mChatMessage').bind('keypress',function(){clearInterval(interval);$jQ('#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG').hide();$jQ('#mChatRefreshText').html(mChatRefreshNo).addClass('mchat-alert');$jQ('#mChatPauseIMG').show()})}$jQ([window,document]).blur(function(){hasFocus = false}).focus(function(){hasFocus = true});$jQ.fn.preventDoubleSubmit=function(){var alreadySubmitted=false;return $jQ(this).submit(function(){if(alreadySubmitted){return false}else{alreadySubmitted=true}})};$jQ.fn.autoGrowInput=function(o){var width=$jQ('.mChatPanel').width();o=$jQ.extend({maxWidth:width-20,minWidth:0,comfortZone:20},o);this.filter('input:text').each(function(){var minWidth=o.minWidth||$jQ(this).width(),val='',input=$jQ(this),testSubject=$jQ('
').css({position:'absolute',top:-9999,left:-9999,width:'auto',fontSize:input.css('fontSize'),fontFamily:input.css('fontFamily'),fontWeight:input.css('fontWeight'),letterSpacing:input.css('letterSpacing'),whiteSpace:'nowrap'}),check=function(){if(val===(val=input.val())){return}var escaped=val.replace(/&/g,'&').replace(/\s/g,' ').replace(//g,'>');testSubject.html(escaped);var testerWidth=testSubject.width(),newWidth=(testerWidth+o.comfortZone)>=minWidth?testerWidth+o.comfortZone:minWidth,currentWidth=input.width(),isValidWidthChange=(newWidth=minWidth)||(newWidth>minWidth&&newWidth");}else if(e.keyCode==13){mChat.add();}},countDown:function(){if($jQ('#mChatSessMess').hasClass('mchat-alert')){$jQ('#mChatSessMess').removeClass('mchat-alert')}session_time=session_time-1;var sec=Math.floor(session_time);var min=Math.floor(sec/60);var hrs=Math.floor(min/60);sec=(sec%60);if(sec<=9){sec="0"+sec}min=(min%60);if(min<=9){min="0"+min}hrs=(hrs%60);if(hrs<=9){hrs="0"+hrs}var time_left=hrs+":"+min+":"+sec;$jQ('#mChatSessMess').html(mChatSessEnds+' '+time_left);if(session_time<=0){clearInterval(counter);$jQ('#mChatSessMess').html(mChatSessOut).addClass('mchat-alert')}},clear:function(){if($jQ('#mChatMessage').val()==''){return false}var answer=confirm(mChatReset);if(answer){if($jQ('#mChatRefreshText').hasClass('mchat-alert')){$jQ('#mChatRefreshText').removeClass('mchat-alert')}if(mChatPause){interval=setInterval(function(){mChat.refresh()},mChatRefresh)}$jQ('#mChatOkIMG').show();$jQ('#mChatLoadIMG, #mChatErrorIMG, #mChatPauseIMG').hide();$jQ('#mChatRefreshText').html(mChatRefreshYes);$jQ('#mChatMessage').val('').focus()}else{$jQ('#mChatMessage').focus()}},sound:function(file){if($jQ.cookie('mChatNoSound')=='yes'){return}if($jQ.browser.msie){$jQ('#mChatSound').html('')}else{$jQ('#mChatSound').html('')}},alert:function(){if(!hasFocus||!document.hasFocus()){$jQ.titleAlert(mChatNewMessageAlert)}},toggle:function(id){$jQ('#mChat'+id).slideToggle('normal',function(){if($jQ('#mChat'+id).is(':visible')){$jQ.cookie('mChatShow'+id,'yes')}if($jQ('#mChat'+id).is(':hidden')){$jQ.cookie('mChatShow'+id,null)}})},add:function(){if($jQ('#mChatMessage').val()==''){return false}var mChatMessChars=$jQ('#mChatMessage').val().replace(/ /g,'');if(mChatMessChars.length>mChatMssgLngth&&mChatMssgLngth){alert(mChatMssgLngthLong);return}$jQ.ajax({url:mChatFile,timeout:10000,async:false,type:'POST',data:$jQ('#postform').serialize(),dataType:'text',beforeSend:function(){$jQ('#submit_button').attr('disabled','disabled');if(mChatUserTimeout){clearInterval(activeinterval);clearInterval(counter)}clearInterval(interval)},success:function(){mChat.refresh()},error:function(XMLHttpRequest){if(XMLHttpRequest.status==400){alert(mChatFlood)}else if(XMLHttpRequest.status==403){alert(mChatNoAccess)}else if(XMLHttpRequest.status==501){alert(mChatNoMessageInput)}},complete:function(){if($jQ('#mChatData').children('#mChatNoMessage :last')){$jQ('#mChatNoMessage').remove()}$jQ('#submit_button').removeAttr('disabled');interval=setInterval(function(){mChat.refresh()},mChatRefresh);if(mChatUserTimeout){session_time=mChatUserTimeout?mChatUserTimeout/1000:false;counter=setInterval(function(){mChat.countDown()},1000);activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout)}$jQ('#mChatMessage').val('').focus()}})},edit:function(id){var message=$jQ('#edit'+id).val();apprise(mChatEditInfo + ' (Shift and Enter for new line)',{'textarea':message,'animate':true,'position':200,'confirm':true}, function(r){if(r){$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',data:{mode:'edit',message_id:id,message:r},dataType:'text',beforeSend:function(){clearInterval(interval);if(mChatUserTimeout){clearInterval(activeinterval);clearInterval(counter);$jQ('#mChatSessTimer').html(mChatRefreshing)}},success:function(html){$jQ('#mess'+id).fadeOut('slow',function(){$jQ(this).replaceWith(html);$jQ('#mess'+id).css('display','none').fadeIn('slow')})},error:function(XMLHttpRequest){if(XMLHttpRequest.status==403){alert(mChatNoAccess)}else if(XMLHttpRequest.status==501){alert(mChatNoMessageInput)}},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh);if(mChatUserTimeout){session_time=mChatUserTimeout?mChatUserTimeout/1000:false;counter=setInterval(function(){mChat.countDown()},1000);activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout)}if(!mChatArchiveMode){scrH=$jQ('#mChatmain')[0].scrollHeight;window.setTimeout(function(){$jQ('#mChatmain').animate({scrollTop:scrH},1000,'swing')},1500)}}})}})},del:function(id){apprise(mChatDelConfirm,{'position':200,'animate':true,'confirm':true},function(del){if(del){$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',data:{mode:'delete',message_id:id},beforeSend:function(){clearInterval(interval);if(mChatUserTimeout){clearInterval(activeinterval);clearInterval(counter);$jQ('#mChatSessTimer').html(mChatRefreshing)}},success:function(){$jQ('#mess'+id).fadeOut('slow',function(){$jQ(this).remove()});mChat.sound(mChatForumRoot+'ext/dmzx/mchat/styles/prosilver/theme/images/del.swf')},error:function(){alert(mChatNoAccess)},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh);if(mChatUserTimeout){session_time=mChatUserTimeout?mChatUserTimeout/1000:false;counter=setInterval(function(){mChat.countDown()},1000);activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout)}}})}else{return false;}});},refresh: -function(){if(mChatArchiveMode){return}var mess_id=0;if($jQ('#mChatData').children().not('#mChatNoMessage').length){if($jQ('#mChatNoMessage')){$jQ('#mChatNoMessage').remove()}mess_id=$jQ('#mChatData').children(':last-child').attr('id').replace('mess','')}var oldScrH=$jQ('#mChatmain')[0].scrollHeight;$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:true,data:{mode:'read',message_last_id:mess_id},dataType:'html',beforeSend:function(){$jQ('#mChatOkIMG,#mChatErrorIMG,#mChatPauseIMG').hide();$jQ('#mChatLoadIMG').show()},success:function(html){if(html!=''&&html!=0){if($jQ('#mChatRefreshText').hasClass('mchat-alert')){$jQ('#mChatRefreshText').removeClass('mchat-alert')}$jQ('#mChatData').append(html).children(':last').not('#mChatNoMessage');var newInner=$jQ('#mChatData').children().not('#mChatNoMessage').innerHeight();var newH=oldScrH+newInner;$jQ('#mChatmain').animate({scrollTop:newH},'slow');mChat.sound(mChatForumRoot+'ext/dmzx/mchat/styles/prosilver/theme/images/add.swf');mChat.alert()}setTimeout(function(){$jQ('#mChatLoadIMG,#mChatErrorIMG,#mChatPauseIMG').hide();$jQ('#mChatOkIMG').show();$jQ('#mChatRefreshText').html(mChatRefreshYes)},500)},error:function(){$jQ('#mChatLoadIMG,#mChatOkIMG,#mChatPauseIMG,#mChatRefreshTextNo,#mChatPauseIMG,').hide();$jQ('#mChatErrorIMG').show();mChat.sound(mChatForumRoot+'ext/dmzx/mchat/styles/prosilver/theme/images/error.swf')},complete:function(){if(!$jQ('#mChatData').children(':last').length){$jQ('#mChatData').append('
'+mChatNoMessage+'
').show('slow')}}})},stats:function(){if(!mChatWhois){return}$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',data:{mode:'stats'},dataType:'html',beforeSend:function(){if(mChatCustomPage){$jQ('#mChatRefreshN').show();$jQ('#mChatRefresh').hide()}},success:function(stats){$jQ('#mChatStats').replaceWith(stats);if(mChatCustomPage){setTimeout(function(){$jQ('#mChatRefreshN').hide();$jQ('#mChatRefresh').show()},500)}},error:function(){mChat.sound(mChatForumRoot+'ext/dmzx/mchat/styles/prosilver/theme/images/error.swf')},complete:function(){if($jQ('#mChatUserList').length&&($jQ.cookie('mChatShowUserList')=='yes'||mChatCustomPage)){$jQ('#mChatUserList').css('display','block')}}})},active:function(){if(mChatArchiveMode||!mChatUserTimeout){return}clearInterval(interval);$jQ('#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG').hide();$jQ('#mChatPauseIMG').show();$jQ('#mChatRefreshText').html(mChatRefreshNo).addClass('mchat-alert');$jQ('#mChatSessMess').html(mChatSessOut).addClass('mchat-alert')}};var interval=setInterval(function(){mChat.refresh()},mChatRefresh);var statsinterval=setInterval(function(){mChat.stats()},mChatWhoisRefresh);var activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout);var session_time=mChatUserTimeout?mChatUserTimeout/1000:false;if(mChatUserTimeout){var counter=setInterval(function(){mChat.countDown()},1000)}if($jQ.cookie('mChatShowSmiles')=='yes'&&$jQ('#mChatSmiles').css('display','none')){$jQ('#mChatSmiles').slideToggle('slow')}if($jQ.cookie('mChatShowBBCodes')=='yes'&&$jQ('#mChatBBCodes').css('display','none')){$jQ('#mChatBBCodes').slideToggle('slow')}if($jQ.cookie('mChatShowUserList')=='yes'&&$jQ('#mChatUserList').length){$jQ('#mChatUserList').slideToggle('slow')}if($jQ.cookie('mChatShowColour')=='yes'&&$jQ('#mChatColour').css('display','none')){$jQ('#mChatColour').slideToggle('slow')}$jQ('#mChatUseSound').change(function(){if($jQ(this).is(':checked')){$jQ.cookie('mChatNoSound',null)}else{$jQ.cookie('mChatNoSound','yes')}}); +var hasFocus = true;$jQ(function(){if(!mChatArchiveMode){var scrH=$jQ('#mChatmain')[0].scrollHeight;$jQ('#mChatmain').animate({scrollTop:scrH},1000,'swing');if(mChatPause){$jQ('#mChatMessage').bind('keypress',function(){clearInterval(interval);$jQ('#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG').hide();$jQ('#mChatRefreshText').html(mChatRefreshNo).addClass('mchat-alert');$jQ('#mChatPauseIMG').show()})}$jQ([window,document]).blur(function(){hasFocus = false}).focus(function(){hasFocus = true});$jQ.fn.preventDoubleSubmit=function(){var alreadySubmitted=false;return $jQ(this).submit(function(){if(alreadySubmitted){return false}else{alreadySubmitted=true}})};$jQ.fn.autoGrowInput=function(o){var width=$jQ('.mChatPanel').width();o=$jQ.extend({maxWidth:width-20,minWidth:0,comfortZone:20},o);this.filter('input:text').each(function(){var minWidth=o.minWidth||$jQ(this).width(),val='',input=$jQ(this),testSubject=$jQ('
').css({position:'absolute',top:-9999,left:-9999,width:'auto',fontSize:input.css('fontSize'),fontFamily:input.css('fontFamily'),fontWeight:input.css('fontWeight'),letterSpacing:input.css('letterSpacing'),whiteSpace:'nowrap'}),check=function(){if(val===(val=input.val())){return}var escaped=val.replace(/&/g,'&').replace(/\s/g,' ').replace(//g,'>');testSubject.html(escaped);var testerWidth=testSubject.width(),newWidth=(testerWidth+o.comfortZone)>=minWidth?testerWidth+o.comfortZone:minWidth,currentWidth=input.width(),isValidWidthChange=(newWidth=minWidth)||(newWidth>minWidth&&newWidth");}else if(e.keyCode==13){mChat.add();}},countDown:function(){if($jQ('#mChatSessMess').hasClass('mchat-alert')){$jQ('#mChatSessMess').removeClass('mchat-alert')}session_time=session_time-1;var sec=Math.floor(session_time);var min=Math.floor(sec/60);var hrs=Math.floor(min/60);sec=(sec%60);if(sec<=9){sec="0"+sec}min=(min%60);if(min<=9){min="0"+min}hrs=(hrs%60);if(hrs<=9){hrs="0"+hrs}var time_left=hrs+":"+min+":"+sec;$jQ('#mChatSessMess').html(mChatSessEnds+' '+time_left);if(session_time<=0){clearInterval(counter);$jQ('#mChatSessMess').html(mChatSessOut).addClass('mchat-alert')}},clear:function(){if($jQ('#mChatMessage').val()==''){return false}var answer=confirm(mChatReset);if(answer){if($jQ('#mChatRefreshText').hasClass('mchat-alert')){$jQ('#mChatRefreshText').removeClass('mchat-alert')}if(mChatPause){interval=setInterval(function(){mChat.refresh()},mChatRefresh)}$jQ('#mChatOkIMG').show();$jQ('#mChatLoadIMG, #mChatErrorIMG, #mChatPauseIMG').hide();$jQ('#mChatRefreshText').html(mChatRefreshYes);$jQ('#mChatMessage').val('').focus()}else{$jQ('#mChatMessage').focus()}},sound: function (file) {if ($jQ.cookie('mChatNoSound') == 'yes') { return}if (false || $.browser.msie) {$('#mChatSound').html('');} else {$('#mChatSound').html('');}},alert:function(){if(!hasFocus||!document.hasFocus()){$jQ.titleAlert(mChatNewMessageAlert)}},toggle:function(id){$jQ('#mChat'+id).slideToggle('normal',function(){if($jQ('#mChat'+id).is(':visible')){$jQ.cookie('mChatShow'+id,'yes')}if($jQ('#mChat'+id).is(':hidden')){$jQ.cookie('mChatShow'+id,null)}})},add:function(){if($jQ('#mChatMessage').val()==''){return false}var mChatMessChars=$jQ('#mChatMessage').val().replace(/ /g,'');if(mChatMessChars.length>mChatMssgLngth&&mChatMssgLngth){alert(mChatMssgLngthLong);return}$jQ.ajax({url:mChatFile,timeout:10000,async:false,type:'POST',data:$jQ('#postform').serialize(),dataType:'text',beforeSend:function(){$jQ('#submit_button').attr('disabled','disabled');if(mChatUserTimeout){clearInterval(activeinterval);clearInterval(counter)}clearInterval(interval)},success:function(){mChat.refresh()},error:function(XMLHttpRequest){if(XMLHttpRequest.status==400){alert(mChatFlood)}else if(XMLHttpRequest.status==403){alert(mChatNoAccess)}else if(XMLHttpRequest.status==501){alert(mChatNoMessageInput)}},complete:function(){if($jQ('#mChatData').children('#mChatNoMessage :last')){$jQ('#mChatNoMessage').remove()}$jQ('#submit_button').removeAttr('disabled');interval=setInterval(function(){mChat.refresh()},mChatRefresh);if(mChatUserTimeout){session_time=mChatUserTimeout?mChatUserTimeout/1000:false;counter=setInterval(function(){mChat.countDown()},1000);activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout)}$jQ('#mChatMessage').val('').focus()}})},edit:function(id){var message=$jQ('#edit'+id).val();apprise(mChatEditInfo + ' (Shift and Enter for new line)',{'textarea':message,'animate':true,'position':200,'confirm':true}, function(r){if(r){$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',data:{mode:'edit',message_id:id,message:r},dataType:'text',beforeSend:function(){clearInterval(interval);if(mChatUserTimeout){clearInterval(activeinterval);clearInterval(counter);$jQ('#mChatSessTimer').html(mChatRefreshing)}},success:function(html){$jQ('#mess'+id).fadeOut('slow',function(){$jQ(this).replaceWith(html);$jQ('#mess'+id).css('display','none').fadeIn('slow')})},error:function(XMLHttpRequest){if(XMLHttpRequest.status==403){alert(mChatNoAccess)}else if(XMLHttpRequest.status==501){alert(mChatNoMessageInput)}},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh);if(mChatUserTimeout){session_time=mChatUserTimeout?mChatUserTimeout/1000:false;counter=setInterval(function(){mChat.countDown()},1000);activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout)}if(!mChatArchiveMode){scrH=$jQ('#mChatmain')[0].scrollHeight;window.setTimeout(function(){$jQ('#mChatmain').animate({scrollTop:scrH},1000,'swing')},1500)}}})}})},del:function(id){apprise(mChatDelConfirm,{'position':200,'animate':true,'confirm':true},function(del){if(del){$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',data:{mode:'delete',message_id:id},beforeSend:function(){clearInterval(interval);if(mChatUserTimeout){clearInterval(activeinterval);clearInterval(counter);$jQ('#mChatSessTimer').html(mChatRefreshing)}},success:function(){$jQ('#mess'+id).fadeOut('slow',function(){$jQ(this).remove()});mChat.sound(mChatForumRoot+'ext/dmzx/mchat/sounds/del.swf')},error:function(){alert(mChatNoAccess)},complete:function(){interval=setInterval(function(){mChat.refresh()},mChatRefresh);if(mChatUserTimeout){session_time=mChatUserTimeout?mChatUserTimeout/1000:false;counter=setInterval(function(){mChat.countDown()},1000);activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout)}}})}else{return false;}});},refresh: +function(){if(mChatArchiveMode){return}var mess_id=0;if($jQ('#mChatData').children().not('#mChatNoMessage').length){if($jQ('#mChatNoMessage')){$jQ('#mChatNoMessage').remove()}mess_id=$jQ('#mChatData').children(':last-child').attr('id').replace('mess','')}var oldScrH=$jQ('#mChatmain')[0].scrollHeight;$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',async:true,data:{mode:'read',message_last_id:mess_id},dataType:'html',beforeSend:function(){$jQ('#mChatOkIMG,#mChatErrorIMG,#mChatPauseIMG').hide();$jQ('#mChatLoadIMG').show()},success:function(html){if(html!=''&&html!=0){if($jQ('#mChatRefreshText').hasClass('mchat-alert')){$jQ('#mChatRefreshText').removeClass('mchat-alert')}$jQ('#mChatData').append(html).children(':last').not('#mChatNoMessage');var newInner=$jQ('#mChatData').children().not('#mChatNoMessage').innerHeight();var newH=oldScrH+newInner;$jQ('#mChatmain').animate({scrollTop:newH},'slow');mChat.sound(mChatForumRoot+'ext/dmzx/mchat/sounds/add.swf');mChat.alert()}setTimeout(function(){$jQ('#mChatLoadIMG,#mChatErrorIMG,#mChatPauseIMG').hide();$jQ('#mChatOkIMG').show();$jQ('#mChatRefreshText').html(mChatRefreshYes)},500)},error:function(){$jQ('#mChatLoadIMG,#mChatOkIMG,#mChatPauseIMG,#mChatRefreshTextNo,#mChatPauseIMG,').hide();$jQ('#mChatErrorIMG').show();mChat.sound(mChatForumRoot+'ext/dmzx/mchat/sounds/error.swf')},complete:function(){if(!$jQ('#mChatData').children(':last').length){$jQ('#mChatData').append('
'+mChatNoMessage+'
').show('slow')}}})},stats:function(){if(!mChatWhois){return}$jQ.ajax({url:mChatFile,timeout:10000,type:'POST',data:{mode:'stats'},dataType:'html',beforeSend:function(){if(mChatCustomPage){$jQ('#mChatRefreshN').show();$jQ('#mChatRefresh').hide()}},success:function(stats){$jQ('#mChatStats').replaceWith(stats);if(mChatCustomPage){setTimeout(function(){$jQ('#mChatRefreshN').hide();$jQ('#mChatRefresh').show()},500)}},error:function(){mChat.sound(mChatForumRoot+'ext/dmzx/mchat/sounds/error.swf')},complete:function(){if($jQ('#mChatUserList').length&&($jQ.cookie('mChatShowUserList')=='yes'||mChatCustomPage)){$jQ('#mChatUserList').css('display','block')}}})},active:function(){if(mChatArchiveMode||!mChatUserTimeout){return}clearInterval(interval);$jQ('#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG').hide();$jQ('#mChatPauseIMG').show();$jQ('#mChatRefreshText').html(mChatRefreshNo).addClass('mchat-alert');$jQ('#mChatSessMess').html(mChatSessOut).addClass('mchat-alert')}};var interval=setInterval(function(){mChat.refresh()},mChatRefresh);var statsinterval=setInterval(function(){mChat.stats()},mChatWhoisRefresh);var activeinterval=setInterval(function(){mChat.active()},mChatUserTimeout);var session_time=mChatUserTimeout?mChatUserTimeout/1000:false;if(mChatUserTimeout){var counter=setInterval(function(){mChat.countDown()},1000)}if($jQ.cookie('mChatShowSmiles')=='yes'&&$jQ('#mChatSmiles').css('display','none')){$jQ('#mChatSmiles').slideToggle('slow')}if($jQ.cookie('mChatShowBBCodes')=='yes'&&$jQ('#mChatBBCodes').css('display','none')){$jQ('#mChatBBCodes').slideToggle('slow')}if($jQ.cookie('mChatShowUserList')=='yes'&&$jQ('#mChatUserList').length){$jQ('#mChatUserList').slideToggle('slow')}if($jQ.cookie('mChatShowColour')=='yes'&&$jQ('#mChatColour').css('display','none')){$jQ('#mChatColour').slideToggle('slow')}$jQ('#mChatUseSound').change(function(){if($jQ(this).is(':checked')){$jQ.cookie('mChatNoSound',null)}else{$jQ.cookie('mChatNoSound','yes')}}); function mChatTimeShow(id){var tid = parseInt(id);$(".mchatrow" + id).show();}function mChatTimeHide(id){var tid = parseInt(id);$(".mchatrow" + id).hide();} // Apprise 1.5 by Daniel Raftery