From 94ed45f4f041660d08a845e3295e626d25c7b128 Mon Sep 17 00:00:00 2001 From: popiazaza Date: Sun, 3 Jan 2021 11:37:49 +0700 Subject: [PATCH] update 3.0.6 fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - แก้ไขปัญหาเสียงกระซิบหาย - แก้ไขปัญหาวัน-เวลาในหน้ารายการแชทส่วนตัวแสดงผลไม่ถูกต้อง - แก้ไขปัญหาลบข้อความไม่หาย ต้อง Refresh (ในกรณีลบข้อความของตนเอง) - แก้ไขให้ลบข้อความแล้วข้อความหายทันที แทนทีจะต้องรออัปเดตครั้งถัดไป (ในกรณีลบข้อความของตนเอง) - แก้ไขตั้งค่าเสียงให้เปิดเสียงเป็นค่าเริ่มต้น - แก้ไขข้อความในหน้าตั้งค่าปลั๊กอินใน AdminCP ให้สื่อความหมายให้เข้าใจง่ายขึ้น - แก้ไขเวลาที่โพสต์ข้อความให้ติดข้างล่าง และไม่ตัดไปอีกบรรทัด - แก้ไขดีไซน์อื่น ๆ เล็ก ๆ น้อย ๆ - แก้ไขค่าเริ่มต้นของตั้งค่า "จำนวนข้อความที่จะแสดงเริ่มต้น" จาก 30 เป็น 50 - แก้ไขให้สามารถกำหนด "จำนวนข้อความในฐานข้อมูลสูงสุด" (เดิมใช้คำว่า "จำนวน log ที่จะเก็บไว้สูงสุด") เป็น 0 เพื่อไม่จำกัดจำนวนข้อความในฐานข้อมูลได้ (โดยตั้งค่าเริ่มต้นเป็น 0 ให้หากติดตั้งแชทใหม่) Developer Note: เนื่องจากแชทใหม่ที่แยกข้อความทั่วไปกับส่วนตัวจึงเห็นว่าไม่ควรลบข้อความเก่า ๆ ออกไป และการเก็บข้อมูลแชทมาก ๆ แทบไม่มีผลต่อการใช้งานอย่างที่คิดกันในตอนแรก แนะนำให้คนที่ใช้แชทเดิมแก้ไขให้เป็น 0 หลังจากอัปเกรดเป็นเวอร์ชั่นนี้ --- th_chat/discuz_plugin_th_chat.xml | 26 +++++++-------- th_chat/functions.php | 2 +- th_chat/img.inc.php | 5 +-- th_chat/js/th_chat.js | 4 +-- th_chat/js/th_chat.min.js | 2 +- th_chat/new.inc.php | 41 ++++++++++++++++-------- th_chat/newinit.inc.php | 7 ++-- th_chat/online.php | 8 ++--- th_chat/post.inc.php | 4 ++- th_chat/profile.inc.php | 2 +- th_chat/setting.inc.php | 9 ++++-- th_chat/template/big.htm | 2 +- th_chat/template/discuz.htm | 2 +- th_chat/template/th_chat.css | 53 ++++++++++++++++++++----------- th_chat/template/th_chat.min.css | 2 +- 15 files changed, 98 insertions(+), 71 deletions(-) diff --git a/th_chat/discuz_plugin_th_chat.xml b/th_chat/discuz_plugin_th_chat.xml index 147df5b..e62e8af 100644 --- a/th_chat/discuz_plugin_th_chat.xml +++ b/th_chat/discuz_plugin_th_chat.xml @@ -14,7 +14,7 @@ - + @@ -47,35 +47,33 @@ - + - - + + - + - + - + +ใส่ 0 ถ้าไม่ต้องการให้ลบข้อความเก่าทิ้ง]]> - + - - + + diff --git a/th_chat/functions.php b/th_chat/functions.php index fa9c64b..3f4bc00 100644 --- a/th_chat/functions.php +++ b/th_chat/functions.php @@ -69,7 +69,7 @@ function chatrow($id,$text,$uid_p,$username,$time,$touid,$icon,$mod){
'.$tag.$text.'
- อ้างอิง @ กระซิบ '.(($config['editmsg']==1)&&$mod?' แก้ไข':'').($mod?' ลบ':'').' + อ้างอิง @ แชทส่วนตัว '.(($config['editmsg']==1)&&$mod?' แก้ไข':'').($mod?' ลบ':'').'
'.get_date($time).'
diff --git a/th_chat/img.inc.php b/th_chat/img.inc.php index 6916de4..72eb91f 100644 --- a/th_chat/img.inc.php +++ b/th_chat/img.inc.php @@ -2,9 +2,7 @@ if (!defined('IN_DISCUZ')) {exit('Access Denied');} loadcache('plugin'); $config = $_G['cache']['plugin']['th_chat']; -$uid = $_G['uid']; -$is_mod = in_array($_G['adminid'], array(1, 2, 3)); -if ($uid < 1) { +if ($_G['uid'] < 1) { die('Login'); } @@ -14,7 +12,6 @@ { unlink(__DIR__ . '/img_up/' . $file->getFilename()); } - } $files = glob(__DIR__ . '/img_up/' . $_G['uid'] . '_*'); diff --git a/th_chat/js/th_chat.js b/th_chat/js/th_chat.js index 96f3e64..79b1408 100644 --- a/th_chat/js/th_chat.js +++ b/th_chat/js/th_chat.js @@ -34,7 +34,7 @@ function nzalert(text) { nzchatobj.ajaxSetup({ timeout: 2000, error: function (jqXHR, textStatus, errorThrown) { - nzalert('เกิดข้อผิดพลาด: ไม่สามารถเชื่อมต่อกับเซิฟเวอร์ได้'); + nzalert('ขาดเชื่อมต่อกับเซิฟเวอร์ กำลังลองใหม่...'); nzResetInterval(); } }); @@ -200,7 +200,7 @@ function nzSend() { data = JSON.parse(data); if (data.type == 1) { nzalert(data.error); - if (data.script == 1) { + if (data.script) { eval(data.script); } } else { diff --git a/th_chat/js/th_chat.min.js b/th_chat/js/th_chat.min.js index fa559da..1599e8a 100644 --- a/th_chat/js/th_chat.min.js +++ b/th_chat/js/th_chat.min.js @@ -1 +1 @@ -var nzchatobj=jQuery.noConflict(),nzsid=getcookie("sid",!0),nztime1=(new Date).getTime(),nztime2=0,nztouid=0,nzquota=0,nzlastid=0,nzonol=!1,nzcommandz="",formhash="",nzChatPopupContent="",nzscroll=!0,nzChatRoom=0,nzChatList=0,nzInterval;function nzolover(){nzonol=!0}function nzolout(){nzonol=!1}function nzalert(n){nzchatobj("#nzalertbox").text(n),nzchatobj("#nzalertbox").slideDown(200),setTimeout(function(){nzchatobj("#nzalertbox").slideUp(200)},2e3)}function nzNotice(){nzcommandz="notice",nzchatobj(".nzquoteboxi").html('
แก้ไขประกาศ: '+nzchatobj("#nzchatnotice").html()+'
'),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nzScrollChat(!0),nzchatobj("#nzchatmessage").val(nzchatobj("#nzchatnotice").text()),nzchatobj("#nzchatmessage").focus()}function nzChatPopup(n){nzChatPopupContent=nzchatobj(n).next(".nzchatpopuph").html(),nzchatobj("#th_chat_popup_box").html(nzChatPopupContent),showWindow("th_chat_popup","plugin.php?id=th_chat:popup")}function nzSend(){var data=nzchatobj.trim(nzchatobj("#nzchatmessage").val());if(""===data)return!1;nztime1=(new Date).getTime(),nztime1>nztime2?(nzchatobj("#nzchatmessage").val(""),nztime2=nztime1+nzsetting.delay,nzchatobj.post("plugin.php?id=th_chat:post"+formhash,{text:data,lastid:nzlastid,touid:nztouid,quota:nzquota,command:nzcommandz,room:nzChatRoom},function(data){if((nzquota>0||"notice"==nzcommandz||"edit"==nzcommandz.substr(0,4))&&nzTouid(0),data=JSON.parse(data),1==data.type)nzalert(data.error),1==data.script&&eval(data.script);else if(nztouid==nzChatRoom){var listmess=sortObject(data);if(nzReadyForScroll(),nzchatobj.each(listmess,function(n,t){(n=parseInt(n))>nzlastid&&(nzlastid=n,nzchatobj("#afterme").before(t),nzScrollChat())}),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),1==nzsetting.iscleardata){var nzchatrr=nzchatobj(".nzchatrow");nzchatrr.size()>nzsetting.chatrowmax&&nzchatrr.first().remove()}}else nzChangeChatRoom(nztouid)})):nzalert("ส่งข้อความบ่อยไป")}function nzCommand(n,t){if(""==n)nzalert("คำสั่งผิดพลาด");else{if("del"==n)var o="ลบข้อความ",a=" "+nzchatobj("#nzchatcontent"+t).text();else{if("edit"==n)return nzTouid(0),nzcommandz="edit "+t,nzchatobj(".nzquoteboxi").html('
แก้ไขข้อความ
'+nzchatobj("#nzrows_"+t+" .nzinnercontent")[0].outerHTML+'
'),nzchatobj(".nzquoteboxi .nzcq").remove(),nzchatobj(".nzquoteboxi .nzblockquote").remove(),nzchatobj(".nzquoteboxi .nztag").remove(),nzchatobj(".nzquoteboxi .nztag2").remove(),nzchatobj(".nzquoteboxi .nztag3").remove(),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nzScrollChat(!0),nzchatobj("#nzchatmessage").val(nzchatobj(".nzquoteboxi .nzinnercontent").text()),void nzchatobj("#nzchatmessage").focus();if("ban"==n)o="แบน",a=" "+nzchatobj("#nzolpro_"+t).text()+"(UID: "+t+")";else if("unban"==n)o="ปลดแบน",a=" "+nzchatobj("#nzolpro_"+t).text()+"(UID: "+t+")";else if("clear"==n)o="ล้างห้องแชท",a=""}1==confirm("คุณต้องการที่จะ"+o+a+" ?")&&(nzchatobj("#nzchatmessage").val("!"+n+" "+t),nzSend())}}function nzLoadTextInit(){nzchatobj.post("plugin.php?id=th_chat:newinit",{room:nzChatRoom,list:nzChatList},function(n){n=JSON.parse(n),nzlastid=n.lastid,nzchatobj("#nzchatcontent").html('
'+n.datahtml+'
'),nzScrollChat(!0),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),nzonol||nzchatobj("#nzchatolcontent").html(n.datachatonline),nzchatobj("#nzoltotal").html(n.chat_online_total),n.chat_unread&&n.chat_unread>0?(nzchatobj("#nzunread").html(n.chat_unread),nzchatobj("#nzunread").show()):nzchatobj("#nzunread").hide(),nzchatobj("#nzchatnotice").html(n.welcometext),nzResetInterval()})}function nzResetInterval(){clearInterval(nzInterval),nzInterval=setInterval(nzLoadText,nzsetting.reload)}function nzChangeChatRoom(n){nzChatRoom!==n&&(nzChatRoom=n,nzLoadTextInit())}function nzScrollChat(n=!1){var t=document.getElementById("nzchatcontent");n&&(nzscroll=!0,nzchatobj("#nznewmessage").hide()),nzscroll?t.scrollTop=t.scrollHeight:nzchatobj("#nznewmessage").show()}function nzReadyForScroll(){var n=document.getElementById("nzchatcontent");nzscroll=!!nzchatobj(".nzquoteboxo:visible")||n.scrollHeight-n.scrollTop==nzsetting.chatheight}function nzLoadText(){nzchatobj.post("plugin.php?id=th_chat:new",{room:nzChatRoom,list:nzChatList,lastid:nzlastid},function(n){var t=sortObject((n=JSON.parse(n)).chat_row);if(nzReadyForScroll(),nzchatobj.each(t,function(n,t){(n=parseInt(n))>nzlastid&&(nzlastid=n,nzchatobj("#afterme").before(t),nzScrollChat())}),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),1==nzsetting.iscleardata){var o=nzchatobj(".nzchatrow");o.size()>nzsetting.chatrowmax&&o.first().remove()}n.chat_online&&(nzonol||nzchatobj("#nzchatolcontent").html(n.chat_online),nzchatobj("#nzoltotal").html(n.chat_online_total)),n.chat_unread&&n.chat_unread>0?(nzchatobj("#nzunread").html(n.chat_unread),nzchatobj("#nzunread").show()):nzchatobj("#nzunread").hide(),nzResetInterval()})}function nzQuota(n){nzTouid(0),nzchatobj("#nzrows_"+n+" .nzuserat2")[0]?nzchatobj(".nzquoteboxi").html('
'+nzchatobj("#nzrows_"+n+" .nzuserat2")[0].outerHTML+": "+nzchatobj("#nzchatcontent"+n).html()+'
'):nzchatobj(".nzquoteboxi").html('
'+nzchatobj("#nzchatcontent"+n).html()+'
'),nzchatobj(".nzquoteboxi .nzcq").remove(),nzchatobj(".nzquoteboxi .nzuserat2").toggleClass("nzuserat2 nzuserat"),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nzScrollChat(!0),nzquota=n,nzchatobj("#nzchatmessage").focus()}function nzAt(n){seditor_insertunit("nzchat","@"+n+" ",""),nzchatobj("#nzchatmessage").focus()}function nzTouid(n){n>0?(nzTouid(0),nzchatobj(".nzquoteboxi").html('
แชทส่วนตัวกับ '+nzchatobj(".nzat_"+n).last()[0].outerHTML+'
'),nzchatobj(".nzquoteboxi .nzcq").remove(),nzchatobj(".nzquoteboxi .nzinnercontent").remove(),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nztouid=n,nzChatRoom!==n&&nzChangeChatRoom(n)):(nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight),"edit"==nzcommandz.substr(0,4)?nzchatobj(".nzquoteboxi .nzinnercontent").text()==nzchatobj("#nzchatmessage").val()&&nzchatobj("#nzchatmessage").val(""):"notice"==nzcommandz&&nzchatobj("#nzchatmessage").val()==nzchatobj("#nzchatnotice").text()&&nzchatobj("#nzchatmessage").val(""),nzchatobj(".nzquoteboxi").html(""),nzchatobj("#nztouid").html(""),nzchatobj(".nzquoteboxo").hide(),nztouid=0,nzquota=0,nzcommandz="",nzChatRoom>0&&nzChangeChatRoom(0))}function nzReload(){nzTouid(0),nzchatobj("#nzchatolcontent").html(""),nzchatobj("#nzchatnotice").html("กำลังโหลดประกาศล่าสุด..."),nzchatobj("#nzchatcontent").html('





Load
'),nzchatobj.post("plugin.php?id=th_chat:newinit",function(n){n=JSON.parse(n),nzlastid=n.lastid,nzchatobj("#nzchatcontent").html(''+n.datahtml+'
'),nzScrollChat(!0),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),nzchatobj("#nzchatolcontent").html(n.datachatonline),nzchatobj("#nzchatnotice").html(n.welcometext)})}function nzClean(){nzchatobj(".nzchatrow").fadeOut("slow")}function nzCheckImg(n){var t=parseInt(n.width),o=parseInt(n.height);t>500&&(n.style.cursor="pointer",n.onclick=function(){window.open(this.src,"ImageViewer","resizable=1").focus()},o*=500/t,t=500,n.height=o,n.width=t),o>240&&(n.style.cursor="pointer",n.onclick=function(){window.open(this.src,"ImageViewer","resizable=1").focus()},n.width=240/o*t,n.height=240)}function sortObject(n){var t,o={},a=[];for(t in n)n.hasOwnProperty(t)&&a.push(t);for(a.sort(),t=0;t{nzchatobj("#nzchatmessage").val(nzchatobj("#nzchatmessage").val()+n)}),nzchatobj("#nzemoji").click(function(){n.togglePicker(this)}),nzchatobj("#nznewmessage").click(function(){nzScrollChat(!0)}),nzchatobj("#nzchatmessage").keydown(function(n){"13"==n.keyCode&&nzSend()}),nzchatobj("#nzchatcontent").scroll(function(){var n=document.getElementById("nzchatcontent");n.scrollHeight-n.scrollTop==nzsetting.chatheight&&(nzchatobj("#nznewmessage").hide(),n.scrollTop=n.scrollHeight)})}); \ No newline at end of file +var nzchatobj=jQuery.noConflict(),nzsid=getcookie("sid",!0),nztime1=(new Date).getTime(),nztime2=0,nztouid=0,nzquota=0,nzlastid=0,nzonol=!1,nzcommandz="",formhash="",nzChatPopupContent="",nzscroll=!0,nzChatRoom=0,nzChatList=0,nzInterval;function nzolover(){nzonol=!0}function nzolout(){nzonol=!1}function nzalert(n){nzchatobj("#nzalertbox").text(n),nzchatobj("#nzalertbox").slideDown(200),setTimeout(function(){nzchatobj("#nzalertbox").slideUp(200)},2e3)}function nzNotice(){nzcommandz="notice",nzchatobj(".nzquoteboxi").html('
แก้ไขประกาศ: '+nzchatobj("#nzchatnotice").html()+'
'),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nzScrollChat(!0),nzchatobj("#nzchatmessage").val(nzchatobj("#nzchatnotice").text()),nzchatobj("#nzchatmessage").focus()}function nzChatPopup(n){nzChatPopupContent=nzchatobj(n).next(".nzchatpopuph").html(),nzchatobj("#th_chat_popup_box").html(nzChatPopupContent),showWindow("th_chat_popup","plugin.php?id=th_chat:popup")}function nzSend(){var data=nzchatobj.trim(nzchatobj("#nzchatmessage").val());if(""===data)return!1;nztime1=(new Date).getTime(),nztime1>nztime2?(nzchatobj("#nzchatmessage").val(""),nztime2=nztime1+nzsetting.delay,nzchatobj.post("plugin.php?id=th_chat:post"+formhash,{text:data,lastid:nzlastid,touid:nztouid,quota:nzquota,command:nzcommandz,room:nzChatRoom},function(data){if((nzquota>0||"notice"==nzcommandz||"edit"==nzcommandz.substr(0,4))&&nzTouid(0),data=JSON.parse(data),1==data.type)nzalert(data.error),data.script&&eval(data.script);else if(nztouid==nzChatRoom){var listmess=sortObject(data);if(nzReadyForScroll(),nzchatobj.each(listmess,function(n,t){(n=parseInt(n))>nzlastid&&(nzlastid=n,nzchatobj("#afterme").before(t),nzScrollChat())}),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),1==nzsetting.iscleardata){var nzchatrr=nzchatobj(".nzchatrow");nzchatrr.size()>nzsetting.chatrowmax&&nzchatrr.first().remove()}}else nzChangeChatRoom(nztouid)})):nzalert("ส่งข้อความบ่อยไป")}function nzCommand(n,t){if(""==n)nzalert("คำสั่งผิดพลาด");else{if("del"==n)var o="ลบข้อความ",a=" "+nzchatobj("#nzchatcontent"+t).text();else{if("edit"==n)return nzTouid(0),nzcommandz="edit "+t,nzchatobj(".nzquoteboxi").html('
แก้ไขข้อความ
'+nzchatobj("#nzrows_"+t+" .nzinnercontent")[0].outerHTML+'
'),nzchatobj(".nzquoteboxi .nzcq").remove(),nzchatobj(".nzquoteboxi .nzblockquote").remove(),nzchatobj(".nzquoteboxi .nztag").remove(),nzchatobj(".nzquoteboxi .nztag2").remove(),nzchatobj(".nzquoteboxi .nztag3").remove(),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nzScrollChat(!0),nzchatobj("#nzchatmessage").val(nzchatobj(".nzquoteboxi .nzinnercontent").text()),void nzchatobj("#nzchatmessage").focus();if("ban"==n)o="แบน",a=" "+nzchatobj("#nzolpro_"+t).text()+"(UID: "+t+")";else if("unban"==n)o="ปลดแบน",a=" "+nzchatobj("#nzolpro_"+t).text()+"(UID: "+t+")";else if("clear"==n)o="ล้างห้องแชท",a=""}1==confirm("คุณต้องการที่จะ"+o+a+" ?")&&(nzchatobj("#nzchatmessage").val("!"+n+" "+t),nzSend())}}function nzLoadTextInit(){nzchatobj.post("plugin.php?id=th_chat:newinit",{room:nzChatRoom,list:nzChatList},function(n){n=JSON.parse(n),nzlastid=n.lastid,nzchatobj("#nzchatcontent").html('
'+n.datahtml+'
'),nzScrollChat(!0),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),nzonol||nzchatobj("#nzchatolcontent").html(n.datachatonline),nzchatobj("#nzoltotal").html(n.chat_online_total),n.chat_unread&&n.chat_unread>0?(nzchatobj("#nzunread").html(n.chat_unread),nzchatobj("#nzunread").show()):nzchatobj("#nzunread").hide(),nzchatobj("#nzchatnotice").html(n.welcometext),nzResetInterval()})}function nzResetInterval(){clearInterval(nzInterval),nzInterval=setInterval(nzLoadText,nzsetting.reload)}function nzChangeChatRoom(n){nzChatRoom!==n&&(nzChatRoom=n,nzLoadTextInit())}function nzScrollChat(n=!1){var t=document.getElementById("nzchatcontent");n&&(nzscroll=!0,nzchatobj("#nznewmessage").hide()),nzscroll?t.scrollTop=t.scrollHeight:nzchatobj("#nznewmessage").show()}function nzReadyForScroll(){var n=document.getElementById("nzchatcontent");nzscroll=!!nzchatobj(".nzquoteboxo:visible")||n.scrollHeight-n.scrollTop==nzsetting.chatheight}function nzLoadText(){nzchatobj.post("plugin.php?id=th_chat:new",{room:nzChatRoom,list:nzChatList,lastid:nzlastid},function(n){var t=sortObject((n=JSON.parse(n)).chat_row);if(nzReadyForScroll(),nzchatobj.each(t,function(n,t){(n=parseInt(n))>nzlastid&&(nzlastid=n,nzchatobj("#afterme").before(t),nzScrollChat())}),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),1==nzsetting.iscleardata){var o=nzchatobj(".nzchatrow");o.size()>nzsetting.chatrowmax&&o.first().remove()}n.chat_online&&(nzonol||nzchatobj("#nzchatolcontent").html(n.chat_online),nzchatobj("#nzoltotal").html(n.chat_online_total)),n.chat_unread&&n.chat_unread>0?(nzchatobj("#nzunread").html(n.chat_unread),nzchatobj("#nzunread").show()):nzchatobj("#nzunread").hide(),nzResetInterval()})}function nzQuota(n){nzTouid(0),nzchatobj("#nzrows_"+n+" .nzuserat2")[0]?nzchatobj(".nzquoteboxi").html('
'+nzchatobj("#nzrows_"+n+" .nzuserat2")[0].outerHTML+": "+nzchatobj("#nzchatcontent"+n).html()+'
'):nzchatobj(".nzquoteboxi").html('
'+nzchatobj("#nzchatcontent"+n).html()+'
'),nzchatobj(".nzquoteboxi .nzcq").remove(),nzchatobj(".nzquoteboxi .nzuserat2").toggleClass("nzuserat2 nzuserat"),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nzScrollChat(!0),nzquota=n,nzchatobj("#nzchatmessage").focus()}function nzAt(n){seditor_insertunit("nzchat","@"+n+" ",""),nzchatobj("#nzchatmessage").focus()}function nzTouid(n){n>0?(nzTouid(0),nzchatobj(".nzquoteboxi").html('
แชทส่วนตัวกับ '+nzchatobj(".nzat_"+n).last()[0].outerHTML+'
'),nzchatobj(".nzquoteboxi .nzcq").remove(),nzchatobj(".nzquoteboxi .nzinnercontent").remove(),nzchatobj(".nzquoteboxo").show(),nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight-nzchatobj(".nzquoteboxo").height()),nztouid=n,nzChatRoom!==n&&nzChangeChatRoom(n)):(nzchatobj("#nzchatcontent").css("height",nzsetting.chatheight),"edit"==nzcommandz.substr(0,4)?nzchatobj(".nzquoteboxi .nzinnercontent").text()==nzchatobj("#nzchatmessage").val()&&nzchatobj("#nzchatmessage").val(""):"notice"==nzcommandz&&nzchatobj("#nzchatmessage").val()==nzchatobj("#nzchatnotice").text()&&nzchatobj("#nzchatmessage").val(""),nzchatobj(".nzquoteboxi").html(""),nzchatobj("#nztouid").html(""),nzchatobj(".nzquoteboxo").hide(),nztouid=0,nzquota=0,nzcommandz="",nzChatRoom>0&&nzChangeChatRoom(0))}function nzReload(){nzTouid(0),nzchatobj("#nzchatolcontent").html(""),nzchatobj("#nzchatnotice").html("กำลังโหลดประกาศล่าสุด..."),nzchatobj("#nzchatcontent").html('





Load
'),nzchatobj.post("plugin.php?id=th_chat:newinit",function(n){n=JSON.parse(n),nzlastid=n.lastid,nzchatobj("#nzchatcontent").html(''+n.datahtml+'
'),nzScrollChat(!0),nzchatobj(".nzinnercontent img").one("load",function(){nzScrollChat()}),nzchatobj("#nzchatolcontent").html(n.datachatonline),nzchatobj("#nzchatnotice").html(n.welcometext)})}function nzClean(){nzchatobj(".nzchatrow").fadeOut("slow")}function nzCheckImg(n){var t=parseInt(n.width),o=parseInt(n.height);t>500&&(n.style.cursor="pointer",n.onclick=function(){window.open(this.src,"ImageViewer","resizable=1").focus()},o*=500/t,t=500,n.height=o,n.width=t),o>240&&(n.style.cursor="pointer",n.onclick=function(){window.open(this.src,"ImageViewer","resizable=1").focus()},n.width=240/o*t,n.height=240)}function sortObject(n){var t,o={},a=[];for(t in n)n.hasOwnProperty(t)&&a.push(t);for(a.sort(),t=0;t{nzchatobj("#nzchatmessage").val(nzchatobj("#nzchatmessage").val()+n)}),nzchatobj("#nzemoji").click(function(){n.togglePicker(this)}),nzchatobj("#nznewmessage").click(function(){nzScrollChat(!0)}),nzchatobj("#nzchatmessage").keydown(function(n){"13"==n.keyCode&&nzSend()}),nzchatobj("#nzchatcontent").scroll(function(){var n=document.getElementById("nzchatcontent");n.scrollHeight-n.scrollTop==nzsetting.chatheight&&(nzchatobj("#nznewmessage").hide(),n.scrollTop=n.scrollHeight)})}); \ No newline at end of file diff --git a/th_chat/new.inc.php b/th_chat/new.inc.php index 3cd76e7..08e8d4e 100644 --- a/th_chat/new.inc.php +++ b/th_chat/new.inc.php @@ -11,28 +11,32 @@ DB::update('newz_data', array( 'unread' => 0, ), "`id`>'$id' AND `unread`=1 AND `uid`='$room' AND `touid`='$uid'"); - $re = DB::query("SELECT n.*,m.username AS name,mt.username AS toname,g.color,gt.color AS tocolor + $re = DB::query("SELECT n.*,m.username AS name,mt.username AS toname,g.color,gt.color AS tocolor FROM " . DB::table('newz_data') . " n LEFT JOIN " . DB::table('common_member') . " m ON n.uid=m.uid LEFT JOIN " . DB::table('common_member') . " mt ON n.touid=mt.uid LEFT JOIN " . DB::table('common_usergroup') . " g ON m.groupid=g.groupid LEFT JOIN " . DB::table('common_usergroup') . " gt ON mt.groupid=gt.groupid -WHERE id>{$id} AND ((n.uid='$room' AND n.touid='$uid') OR (n.uid='$uid' AND n.touid='$room')) +WHERE id>{$id} AND ((n.touid='$uid') OR (n.uid='$uid' AND n.touid!=0) OR (n.uid='$uid' AND n.touid!=0)) ORDER BY id DESC LIMIT {$config['chat_init']}"); -} else { - $re = DB::query("SELECT n.*,m.username AS name,mt.username AS toname,g.color,gt.color AS tocolor +$setting_data = DB::fetch_first("SELECT setting FROM ".DB::table('newz_nick')." WHERE uid='{$_G['uid']}'"); +}else{ + $re = DB::query("SELECT n.*,m.username AS name,mt.username AS toname,g.color,gt.color AS tocolor FROM " . DB::table('newz_data') . " n LEFT JOIN " . DB::table('common_member') . " m ON n.uid=m.uid LEFT JOIN " . DB::table('common_member') . " mt ON n.touid=mt.uid LEFT JOIN " . DB::table('common_usergroup') . " g ON m.groupid=g.groupid LEFT JOIN " . DB::table('common_usergroup') . " gt ON mt.groupid=gt.groupid -WHERE id>{$id} AND (n.touid='0' OR n.touid='$uid') +WHERE id>{$id} AND ((n.touid='$uid') OR (n.touid=0)) ORDER BY id DESC LIMIT {$config['chat_init']}"); -} $setting_data = DB::fetch_first("SELECT setting FROM ".DB::table('newz_nick')." WHERE uid='{$_G['uid']}'"); -$setting = json_decode($setting_data['setting'],1); -$setting['sound_general'] = $setting['sound_general'] == 0 ? 0 : 1; -$setting['sound_private'] = $setting['sound_private'] == 0 ? 0 : 1; +} +if($setting_data){ + $setting = json_decode($setting_data['setting'],1); +}else{ + $setting['sound_general'] = 1; + $setting['sound_private'] = 1; +} $body = array(); while ($c = DB::fetch($re)) { $c['text'] = preg_replace('/\[quota\](.*?)\[\/quota\]/', '$1', $c['text']); @@ -46,20 +50,29 @@ $body[$c['id']] .= ''; continue; } elseif ($room != $c['uid'] && $c['touid'] == $uid) { - if ($config['pm_sound'] && $sounddata['sound_2']) { + if ($config['pm_sound'] && $setting['sound_private']) { $body[$c['id']] .= ''; - } + }else{ + $body[$c['id']] = ''; + } continue; - } + } elseif ($room && $c['touid'] == 0) { + if($config['pm_sound'] && $setting['sound_general']){ + $body[$c['id']] .= ''; + }else{ + $body[$c['id']] = ''; + } + continue; + } if ($c['ip'] == 'clear') { $seedd = $time . '_' . $uid . '_' . rand(1, 999); $c['text'] = 'แจ้งเตือน: ล้างข้อมูล'; } elseif ($c['icon'] == 'alert') { $c['text'] = '' . $c['text'] . ''; } elseif ($c['touid'] == 0) { - $c['text'] = (($config['pm_sound'] && $setting['sound_general']) ? '' : '') . '' . $c['text'] . ''; + $c['text'] = (($config['pm_sound'] && $setting['sound_general']) ? '' : '') . '' . $c['text'] . ''; } elseif ($c['touid'] == $uid) { - $c['text'] = (($config['pm_sound'] && $setting['sound_private']) ? '' : '') . '' . $c['text'] . ''; + $c['text'] = (($config['pm_sound'] && $setting['sound_private']) ? '' : '') . '' . $c['text'] . ''; } elseif ($c['uid'] == $uid) { $c['text'] = '' . $c['text'] . ''; } diff --git a/th_chat/newinit.inc.php b/th_chat/newinit.inc.php index 2a09e79..a61ed25 100644 --- a/th_chat/newinit.inc.php +++ b/th_chat/newinit.inc.php @@ -29,13 +29,10 @@ ORDER BY id DESC LIMIT {$config['chat_init']}"); } $body = array(); -$lastid = 0; +$lastid = DB::fetch_first("SELECT max(id) as lastid FROM ".DB::table('newz_data')); +$lastid = $lastid['lastid']; while ($c = DB::fetch($re)) { $c['text'] = preg_replace('/\[quota\](.*?)\[\/quota\]/', '$1', $c['text']); - if ($c['id'] > $lastid) { - $lastid = $c['id']; - } - if ($c['ip'] == 'delete') { continue; } elseif ($c['ip'] == 'edit') { diff --git a/th_chat/online.php b/th_chat/online.php index 206759a..64e7472 100644 --- a/th_chat/online.php +++ b/th_chat/online.php @@ -53,7 +53,7 @@ if ($_POST['list']) { $chatgroup = array(); - $re = DB::query("SELECT n.*,MAX(n.id) as maxid,SUM(n.unread) as count,m.username AS name,mt.username AS toname,g.color,gt.color AS tocolor + $re = DB::query("SELECT n.*,MAX(n.id) as maxid,MAX(n.time) as maxtime,SUM(n.unread) as count,m.username AS name,mt.username AS toname,g.color,gt.color AS tocolor FROM " . DB::table('newz_data') . " n LEFT JOIN " . DB::table('common_member') . " m ON n.uid=m.uid LEFT JOIN " . DB::table('common_member') . " mt ON n.touid=mt.uid @@ -77,7 +77,7 @@
' . $r['toname'] . '
- ' . get_date($r['time']) . ' + ' . get_date($r['maxtime']) . '
@@ -98,7 +98,7 @@
' . $r['name'] . '
- ' . ($r['count'] ? '' . $r['count'] . ' ข้อความใหม่' : '' . get_date($r['time']) . '') . ' + ' . ($r['count'] ? '' . $r['count'] . ' ข้อความใหม่' : '' . get_date($r['maxtime']) . '') . '
@@ -133,7 +133,7 @@
' . ($r['ban'] ? '' . $r['username'] . '' : $r['username']) . '
' . $r['grouptitle'] . '
'; diff --git a/th_chat/post.inc.php b/th_chat/post.inc.php index 0c8d221..e5972b1 100644 --- a/th_chat/post.inc.php +++ b/th_chat/post.inc.php @@ -155,7 +155,9 @@ if ($needClear) { DB::query("DELETE FROM " . DB::table('newz_data') . " WHERE id<" . $last); } else { - DB::query("DELETE FROM " . DB::table('newz_data') . " WHERE id<" . ($last - $config['chat_log'])); + if($config['chat_log']){ + DB::query("DELETE FROM " . DB::table('newz_data') . " WHERE id<" . ($last - $config['chat_log'])); + } } if ($_POST['touid']) { $room = intval($_POST['room']); diff --git a/th_chat/profile.inc.php b/th_chat/profile.inc.php index 9833ffd..9aa1215 100644 --- a/th_chat/profile.inc.php +++ b/th_chat/profile.inc.php @@ -16,7 +16,7 @@ if($uid==$_G['uid']){ $mlist .= ' เปลี่ยนรูป ตั้งค่าห้องแชท'; }else{ - $mlist .= ' กระซิบ เพิ่มเพื่อน ส่งข้อความ'; + $mlist .= ' แชทส่วนตัว เพิ่มเพื่อน ส่งข้อความ'; } $banuntil = ''; if($r['ban']){ diff --git a/th_chat/setting.inc.php b/th_chat/setting.inc.php index 341da43..4ff1901 100644 --- a/th_chat/setting.inc.php +++ b/th_chat/setting.inc.php @@ -47,9 +47,12 @@ exit('เปลี่ยนการตั้งค่าสำเร็จ!'); }else{ $setting_data = DB::fetch_first("SELECT setting FROM ".DB::table('newz_nick')." WHERE uid='{$_G['uid']}'"); - $setting = json_decode($setting_data['setting'],1); - $setting['sound_general'] = $setting['sound_general'] == 0 ? 0 : 1; - $setting['sound_private'] = $setting['sound_private'] == 0 ? 0 : 1; + if($setting_data){ + $setting = json_decode($setting_data['setting'],1); + }else{ + $setting['sound_general'] = 1; + $setting['sound_private'] = 1; + } if(!in_array($setting['theme'],array('light','dark'))){ $setting['theme'] = $config['default_theme']; } diff --git a/th_chat/template/big.htm b/th_chat/template/big.htm index 4bc5a30..cae99a0 100644 --- a/th_chat/template/big.htm +++ b/th_chat/template/big.htm @@ -44,7 +44,7 @@ -
+
ออนไลน์ ?
diff --git a/th_chat/template/discuz.htm b/th_chat/template/discuz.htm index 9a3d3a3..3b138c6 100644 --- a/th_chat/template/discuz.htm +++ b/th_chat/template/discuz.htm @@ -44,7 +44,7 @@
-
+
ออนไลน์ ?
diff --git a/th_chat/template/th_chat.css b/th_chat/template/th_chat.css index c4284d5..0b3320f 100644 --- a/th_chat/template/th_chat.css +++ b/th_chat/template/th_chat.css @@ -50,8 +50,6 @@ } .nzchatanno { - border-top: 1px solid #ccc; - border-left: 1px solid #ccc; background-color: #d9edf7; color: #31708f; clear: both; @@ -60,6 +58,7 @@ border-radius: 4px 0 0 0; box-sizing: border-box; line-height: 33px; + border-right: 1px solid #ccc; } .nzchatanno a { @@ -67,9 +66,9 @@ } #nzchatcontent { - border-top: #CCC 1px solid; - border-left: #CCC 1px solid; - border-bottom: #CCC 1px solid; + border-top: 1px solid #ccc; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; box-sizing: border-box; position: relative; overflow-y: scroll; @@ -113,8 +112,8 @@ #nzchatmessage { border-top: none; border-bottom: none; - border-left: 1px solid rgb(204, 204, 204); - border-right: 1px solid rgb(204, 204, 204); + border-left: 1px solid #ccc; + border-right: none; line-height: normal; width: 100%; box-sizing: border-box; @@ -248,6 +247,10 @@ a.nzca:hover { #nzchat { text-align: left; margin-bottom: 8px; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + background: #eaeaea; } .nzchatrow { @@ -316,6 +319,9 @@ a.nzca:hover { .nzcontentt.nzme { text-align: right; + display: flex; + align-items: flex-end; + justify-content: right; } .nzme .nzinnercontent { @@ -447,7 +453,6 @@ a.nzca:hover { width: 24px; height: 24px; background: url('../../../../source/plugin/th_chat/images/img.png') #fff; - border-left: 1px solid #ccc; padding-right: 2px; } @@ -492,9 +497,7 @@ a.nzca:hover { } .nztoolbar { - background: #eaeaea; - border: #CCC 1px solid; - border-radius: 0 0 4px 4px; + border-top: 1px solid #CCC; height: 25px; } @@ -541,8 +544,9 @@ a.nzca:hover { .nzchat_room { cursor: pointer; width: 50%; - height: 32px; - line-height: 32px; + height: 33px; + line-height: 33px; + transition:.3s; } .nzchat_room.nzchat_general { @@ -551,7 +555,6 @@ a.nzca:hover { .nzchat_room.nzchat_whisper { float: right; - border-radius: 0 4px 0 0; } .nzchat_room.nzactive { @@ -560,6 +563,10 @@ a.nzca:hover { color: #fff; } +.nzchat_room:not(.nzactive):hover { + background: #bbb; +} + #nzoltotal { color: #fff; font-weight: bold; @@ -584,8 +591,9 @@ a.nzca:hover { .nzchatimenu { display: inline-block; - padding-left: 5px; + padding: 0 5px; line-height: 13px; + flex-shrink: 0; } /* Theme */ @@ -609,10 +617,19 @@ a.nzca:hover { box-shadow: none; } #nzchat.nzdark #nzchatcontent{ - border-top: #333 1px solid; - border-left: #333 1px solid; - border-bottom: #333 1px solid; + border-top: 1px solid #333; + border-right: 1px solid #333; + border-bottom: 1px solid #333; +} +#nzchat.nzdark{ + border: 1px solid #333; } #nzchat.nzdark .nzchat_room.nzactive{ background: #303641; +} +#nzchat.nzdark .nzchatanno { + border-right: 1px solid #333; +} +#nzchat.nzdark #nzchattable a, #nzchat.nzdark .nzlist a { + color: #60a2e4; } \ No newline at end of file diff --git a/th_chat/template/th_chat.min.css b/th_chat/template/th_chat.min.css index 00c7e19..42b5ae3 100644 --- a/th_chat/template/th_chat.min.css +++ b/th_chat/template/th_chat.min.css @@ -1 +1 @@ -#nzchattable>div{width:100%;border-collapse:collapse;grid-template-columns:auto 200px;display:grid;border:none;margin:0 auto}#nzchattable a,.nzlist a{color:#0073e8}.nzlist2 td:nth-child(1){width:52px}.nzlist2 td:nth-child(2){width:135px}#nzchatonline{width:200px}.nzchatbbcode a:hover{border-color:#09c;cursor:pointer;border-radius:2px}.nzchatbbcode a{border:1px solid transparent}.nzchatpopup{cursor:pointer;background:#0094ff;width:100px;border-radius:12px;padding:2px 5px;text-align:center;color:#fff;display:inline-block}.nzchatpopuph{display:none}.nzchatanno{border-top:1px solid #ccc;border-left:1px solid #ccc;background-color:#d9edf7;color:#31708f;clear:both;padding:0 8px;height:33px;border-radius:4px 0 0 0;box-sizing:border-box;line-height:33px}.nzchatanno a{color:#fff}#nzchatcontent{border-top:#ccc 1px solid;border-left:#ccc 1px solid;border-bottom:#ccc 1px solid;box-sizing:border-box;position:relative;overflow-y:scroll;overflow-x:hidden}.nzblockquote{padding-left:8px;margin-left:5px;border-left:2px solid #ccc;margin-top:0;margin-bottom:0;text-align:left}.nzme .nzblockquote{border-left:2px solid #73b075}.nzblockquote img{max-height:50px!important}#nzchatolcontent{width:200px;background:#444753;overflow-y:scroll}.nzuserat{font-weight:700;cursor:pointer}.nzuserat2{font-weight:700;cursor:pointer;padding:1px 0 0 1px}#nzchatmessage{border-top:none;border-bottom:none;border-left:1px solid #ccc;border-right:1px solid #ccc;line-height:normal;width:100%;box-sizing:border-box;padding:5px 7px}#n_copyright{color:#666}#n_copyright a{color:#333;font-weight:700}#n_copyright a:hover{border:1px solid transparent}.nzchatavatar{height:32px;width:32px;border-radius:32px}div.child{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.6;background:#fff}.nzquoteboxo{display:none}.nzquoteboxi{background:#eaeaea;padding:5px 10px;border-bottom:1px solid #ccc;border-left:1px solid #ccc;min-height:24px;display:flex;align-items:center;justify-content:space-between}.nzquoteboxh{font-weight:700;color:#1e88e5;margin-left:2px}.nzcq{opacity:0;font-size:11px;color:#666;padding-right:5px;transition:opacity .3s}.nztime{font-size:11px;color:#666;vertical-align:bottom}#nztouid img,.nzinnercontent img{max-height:100px;vertical-align:middle}.nzinnercontent img.zoom{cursor:pointer}a.nzca{cursor:pointer}a.nzca:hover{text-decoration:none}.nzchatrow{border:none;border-collapse:collapse;grid-template-columns:36px auto;display:grid;padding:0;margin:0;width:100%}.nzavatart{width:35px;padding-right:2px;position:relative}.nzavsm{width:21px;height:21px}.nzavsm2{width:21px;height:21px;transition:opacity .25s ease-in-out;cursor:pointer}.nzavsm2:hover{opacity:.2}.nzchatpro{width:150px;background:#fff;border:1px solid #dddbd3;text-align:center;padding-top:12px;border-radius:3px;box-shadow:5px 5px 5px #ccc}#nzchat{text-align:left;margin-bottom:8px}.nzchatrow{background:0 0}#nzchatcpy{float:right;margin-top:3px;margin-right:10px;text-align:right}#nzchatcpy>span>a{background:0 0;float:unset;margin:unset;width:unset;height:unset;text-indent:unset;line-height:unset;overflow:unset}#nzchatolcontent li{list-style:none}#nzchatolcontent img.nzavsm{margin-right:3px}#nzchat a.nzbtn{padding:2px 3px;display:inline-block;border:1px solid #999;background:#e5e5e5 url(../../../../static/image/common/pn.png) repeat-x 0 0;box-shadow:0 1px 0 #e5e5e5;cursor:pointer;font-size:13px;color:#333}#nzchat a.nzbtn:hover{text-decoration:none;color:#666}#nzchat a.nzbtn:active{background:#ccc;color:#333}.nzcontentt{padding:0 2px 2px 4px}.nzinnercontent{box-shadow:1px 1px 2px #ccc;background:#fff;padding:4px 10px;border-radius:8px 8px 8px 0;display:inline-block;margin-right:2px}.nzcontentt.nzme{text-align:right}.nzme .nzinnercontent{border-radius:8px 8px 0 8px;background:#a6e39e;box-shadow:none}.nznametop{font-size:20px;display:block;font-weight:700;padding:.1em .5em;border-radius:4px;background:#0073e8;border-radius:4px;text-align:center}.nznametop2{font-size:12px;font-weight:700}.nzlist{overflow:hidden;width:100%}.nzlist div:hover{background:#dfdfdf}.nzlist td{padding:5px 30px}.nzlist tr:last-child{border-bottom:none}.nzlist tr{border-bottom:1px solid #ddd}.nzlist2{overflow:hidden;width:100%}.nzlist2 td{padding:2px}.nzlist2 tr{border-bottom:1px solid #fff;background-color:#333}.nzlist tr:hover{background:#dfdfdf}#nzosicon{vertical-align:bottom}#nzstatus{color:#999}#nzimgupload{display:none}#nzimguploadl{display:inline-block;padding:2px 12px;cursor:pointer;border-radius:10px;background:#2185d0;color:#fff}#nznewmessage{display:none;background:rgba(52,152,215,.8);width:250px;height:30px;position:relative;font-size:16px;box-sizing:border-box;padding-left:10px;color:#fff;line-height:30px;text-align:center;cursor:pointer;margin:-40px auto 0 auto;border-radius:2px}#nzalertbox{display:none;background:rgba(255,224,169,.9);width:100%;height:30px;margin-top:-30px;position:relative;font-size:16px;box-sizing:border-box;padding-left:10px;color:#8a6d3b;line-height:30px}.nzbbcode{float:left;margin:2px 5px 0 0;width:20px;height:20px;text-indent:-9999px;line-height:20px;overflow:hidden}#nzimgup{cursor:pointer;width:24px;height:24px;background:url(../../../../source/plugin/th_chat/images/img.png) #fff;border-left:1px solid #ccc;padding-right:2px}#nzemoji{cursor:pointer;width:24px;height:24px;background:url(../../../../source/plugin/th_chat/images/emoji.png) #fff;border-left:1px solid #ccc}.nzolname{background:#fff;border-radius:4px;padding:4px}.nzolname.nzwhisper{cursor:pointer}.nzolcon:nth-child(1){padding-top:5px}.nzolcon{padding:0 5px 5px 5px}.nzavatart .nzchatavatar{margin-left:2px;position:absolute;bottom:2px}.nznametop span{color:#fff}.nznametop span:hover{color:#fff}.nztoolbar{background:#eaeaea;border:#ccc 1px solid;border-radius:0 0 4px 4px;height:25px}.nzcancel{height:16px;width:16px;background:url(../../../../source/plugin/th_chat/images/cancel.png);cursor:pointer;margin-left:3px;flex-shrink:0}.nzcancel:hover{background:url(../../../../source/plugin/th_chat/images/cancel_h.png)}.nztag{color:#fff;background:#fff3e4;border-radius:4px;padding:2px 6px;margin-right:4px;margin-left:-6px;text-shadow:none}.nztag2{font-weight:700;color:#fff;background:#fff3e4;margin-right:4px;border-radius:0 4px 4px 0;border:1px solid #fb8c00;padding:1px 6px}.nztag3{color:#f4511e;border:1px solid #f4511e;border-radius:4px;padding:0 4px}.nzchat_room{cursor:pointer;width:50%;height:32px;line-height:32px}.nzchat_room.nzchat_general{float:left}.nzchat_room.nzchat_whisper{float:right;border-radius:0 4px 0 0}.nzchat_room.nzactive{font-weight:700;background:#444753;color:#fff}#nzoltotal{color:#fff;font-weight:700;padding:1px 4px;border-radius:4px;background:#388e3c}#nzunread{color:#fff;font-weight:700;padding:1px 3px;border-radius:3px;background:red;display:none}.nzunread{color:red;font-weight:700}.nzchatimenu{display:inline-block;padding-left:5px;line-height:13px}#nzchat.nzdark .nzchatanno{background-color:#1e2126;color:#fff;border-color:#616773}#nzchat.nzdark .nztime{color:#ccc}#nzchat.nzdark .nzinnercontent,#nzchat.nzdark .nzolname{background:#4a515e;color:#fff}#nzchat.nzdark #nzchatcontent,#nzchat.nzdark #nzchatolcontent{background:#303641;color:#bec0c2}#nzchat.nzdark .nzinnercontent{box-shadow:none}#nzchat.nzdark #nzchatcontent{border-top:#333 1px solid;border-left:#333 1px solid;border-bottom:#333 1px solid}#nzchat.nzdark .nzchat_room.nzactive{background:#303641} \ No newline at end of file +#nzchattable>div{width:100%;border-collapse:collapse;grid-template-columns:auto 200px;display:grid;border:none;margin:0 auto}#nzchattable a,.nzlist a{color:#0073e8}.nzlist2 td:nth-child(1){width:52px}.nzlist2 td:nth-child(2){width:135px}#nzchatonline{width:200px}.nzchatbbcode a:hover{border-color:#09c;cursor:pointer;border-radius:2px}.nzchatbbcode a{border:1px solid transparent}.nzchatpopup{cursor:pointer;background:#0094ff;width:100px;border-radius:12px;padding:2px 5px;text-align:center;color:#fff;display:inline-block}.nzchatpopuph{display:none}.nzchatanno{background-color:#d9edf7;color:#31708f;clear:both;padding:0 8px;height:33px;border-radius:4px 0 0 0;box-sizing:border-box;line-height:33px;border-right:1px solid #ccc}.nzchatanno a{color:#fff}#nzchatcontent{border-top:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc;box-sizing:border-box;position:relative;overflow-y:scroll;overflow-x:hidden}.nzblockquote{padding-left:8px;margin-left:5px;border-left:2px solid #ccc;margin-top:0;margin-bottom:0;text-align:left}.nzme .nzblockquote{border-left:2px solid #73b075}.nzblockquote img{max-height:50px!important}#nzchatolcontent{width:200px;background:#444753;overflow-y:scroll}.nzuserat{font-weight:700;cursor:pointer}.nzuserat2{font-weight:700;cursor:pointer;padding:1px 0 0 1px}#nzchatmessage{border-top:none;border-bottom:none;border-left:1px solid #ccc;border-right:none;line-height:normal;width:100%;box-sizing:border-box;padding:5px 7px}#n_copyright{color:#666}#n_copyright a{color:#333;font-weight:700}#n_copyright a:hover{border:1px solid transparent}.nzchatavatar{height:32px;width:32px;border-radius:32px}div.child{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.6;background:#fff}.nzquoteboxo{display:none}.nzquoteboxi{background:#eaeaea;padding:5px 10px;border-bottom:1px solid #ccc;border-left:1px solid #ccc;min-height:24px;display:flex;align-items:center;justify-content:space-between}.nzquoteboxh{font-weight:700;color:#1e88e5;margin-left:2px}.nzcq{opacity:0;font-size:11px;color:#666;padding-right:5px;transition:opacity .3s}.nztime{font-size:11px;color:#666;vertical-align:bottom}#nztouid img,.nzinnercontent img{max-height:100px;vertical-align:middle}.nzinnercontent img.zoom{cursor:pointer}a.nzca{cursor:pointer}a.nzca:hover{text-decoration:none}.nzchatrow{border:none;border-collapse:collapse;grid-template-columns:36px auto;display:grid;padding:0;margin:0;width:100%}.nzavatart{width:35px;padding-right:2px;position:relative}.nzavsm{width:21px;height:21px}.nzavsm2{width:21px;height:21px;transition:opacity .25s ease-in-out;cursor:pointer}.nzavsm2:hover{opacity:.2}.nzchatpro{width:150px;background:#fff;border:1px solid #dddbd3;text-align:center;padding-top:12px;border-radius:3px;box-shadow:5px 5px 5px #ccc}#nzchat{text-align:left;margin-bottom:8px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;background:#eaeaea}.nzchatrow{background:0 0}#nzchatcpy{float:right;margin-top:3px;margin-right:10px;text-align:right}#nzchatcpy>span>a{background:0 0;float:unset;margin:unset;width:unset;height:unset;text-indent:unset;line-height:unset;overflow:unset}#nzchatolcontent li{list-style:none}#nzchatolcontent img.nzavsm{margin-right:3px}#nzchat a.nzbtn{padding:2px 3px;display:inline-block;border:1px solid #999;background:#e5e5e5 url(../../../../static/image/common/pn.png) repeat-x 0 0;box-shadow:0 1px 0 #e5e5e5;cursor:pointer;font-size:13px;color:#333}#nzchat a.nzbtn:hover{text-decoration:none;color:#666}#nzchat a.nzbtn:active{background:#ccc;color:#333}.nzcontentt{padding:0 2px 2px 4px}.nzinnercontent{box-shadow:1px 1px 2px #ccc;background:#fff;padding:4px 10px;border-radius:8px 8px 8px 0;display:inline-block;margin-right:2px}.nzcontentt.nzme{text-align:right;display:flex;align-items:flex-end;justify-content:right}.nzme .nzinnercontent{border-radius:8px 8px 0 8px;background:#a6e39e;box-shadow:none}.nznametop{font-size:20px;display:block;font-weight:700;padding:.1em .5em;border-radius:4px;background:#0073e8;border-radius:4px;text-align:center}.nznametop2{font-size:12px;font-weight:700}.nzlist{overflow:hidden;width:100%}.nzlist div:hover{background:#dfdfdf}.nzlist td{padding:5px 30px}.nzlist tr:last-child{border-bottom:none}.nzlist tr{border-bottom:1px solid #ddd}.nzlist2{overflow:hidden;width:100%}.nzlist2 td{padding:2px}.nzlist2 tr{border-bottom:1px solid #fff;background-color:#333}.nzlist tr:hover{background:#dfdfdf}#nzosicon{vertical-align:bottom}#nzstatus{color:#999}#nzimgupload{display:none}#nzimguploadl{display:inline-block;padding:2px 12px;cursor:pointer;border-radius:10px;background:#2185d0;color:#fff}#nznewmessage{display:none;background:rgba(52,152,215,.8);width:250px;height:30px;position:relative;font-size:16px;box-sizing:border-box;padding-left:10px;color:#fff;line-height:30px;text-align:center;cursor:pointer;margin:-40px auto 0 auto;border-radius:2px}#nzalertbox{display:none;background:rgba(255,224,169,.9);width:100%;height:30px;margin-top:-30px;position:relative;font-size:16px;box-sizing:border-box;padding-left:10px;color:#8a6d3b;line-height:30px}.nzbbcode{float:left;margin:2px 5px 0 0;width:20px;height:20px;text-indent:-9999px;line-height:20px;overflow:hidden}#nzimgup{cursor:pointer;width:24px;height:24px;background:url(../../../../source/plugin/th_chat/images/img.png) #fff;padding-right:2px}#nzemoji{cursor:pointer;width:24px;height:24px;background:url(../../../../source/plugin/th_chat/images/emoji.png) #fff;border-left:1px solid #ccc}.nzolname{background:#fff;border-radius:4px;padding:4px}.nzolname.nzwhisper{cursor:pointer}.nzolcon:nth-child(1){padding-top:5px}.nzolcon{padding:0 5px 5px 5px}.nzavatart .nzchatavatar{margin-left:2px;position:absolute;bottom:2px}.nznametop span{color:#fff}.nznametop span:hover{color:#fff}.nztoolbar{border-top:1px solid #ccc;height:25px}.nzcancel{height:16px;width:16px;background:url(../../../../source/plugin/th_chat/images/cancel.png);cursor:pointer;margin-left:3px;flex-shrink:0}.nzcancel:hover{background:url(../../../../source/plugin/th_chat/images/cancel_h.png)}.nztag{color:#fff;background:#fff3e4;border-radius:4px;padding:2px 6px;margin-right:4px;margin-left:-6px;text-shadow:none}.nztag2{font-weight:700;color:#fff;background:#fff3e4;margin-right:4px;border-radius:0 4px 4px 0;border:1px solid #fb8c00;padding:1px 6px}.nztag3{color:#f4511e;border:1px solid #f4511e;border-radius:4px;padding:0 4px}.nzchat_room{cursor:pointer;width:50%;height:33px;line-height:33px;transition:.3s}.nzchat_room.nzchat_general{float:left}.nzchat_room.nzchat_whisper{float:right}.nzchat_room.nzactive{font-weight:700;background:#444753;color:#fff}.nzchat_room:not(.nzactive):hover{background:#bbb}#nzoltotal{color:#fff;font-weight:700;padding:1px 4px;border-radius:4px;background:#388e3c}#nzunread{color:#fff;font-weight:700;padding:1px 3px;border-radius:3px;background:red;display:none}.nzunread{color:red;font-weight:700}.nzchatimenu{display:inline-block;padding:0 5px;line-height:13px;flex-shrink:0}#nzchat.nzdark .nzchatanno{background-color:#1e2126;color:#fff;border-color:#616773}#nzchat.nzdark .nztime{color:#ccc}#nzchat.nzdark .nzinnercontent,#nzchat.nzdark .nzolname{background:#4a515e;color:#fff}#nzchat.nzdark #nzchatcontent,#nzchat.nzdark #nzchatolcontent{background:#303641;color:#bec0c2}#nzchat.nzdark .nzinnercontent{box-shadow:none}#nzchat.nzdark #nzchatcontent{border-top:1px solid #333;border-right:1px solid #333;border-bottom:1px solid #333}#nzchat.nzdark{border:1px solid #333}#nzchat.nzdark .nzchat_room.nzactive{background:#303641}#nzchat.nzdark .nzchatanno{border-right:1px solid #333}#nzchat.nzdark #nzchattable a,#nzchat.nzdark .nzlist a{color:#60a2e4} \ No newline at end of file