============================================================================== 聊天室HACK安装说明 ============================================================================== 功能介绍:整合到Discuz! 2.0 ,注册会员才能使用,可以使用表情符号及BBCODE,可以私聊,有动作功能(自己写:),首页显示聊天室使用情况,可以统计用户名、数量并显示之。 参考程序:King_of_Dragons的xmbchat 1.01.04 整合制作:skylee 演示论坛:http://forum.smthome.net 文件清单: discuzv2chat.zip install.txt (此文件) chatstyle.css chat.php chatinput.php chatinputadd.php chatmessages.php chatrefresh.php chatusers.php chatlogs/messages.log chatlogs/users.log 1、按压缩包内的目录结构将全部文件文件上传到论坛根目录,将chatlogs目录下的2个文件属性设为666。 2、打开 index.php 查找: $detailstatus = (!isset($HTTP_COOKIE_VARS['onlinedetail']) && $onlineinfo[0] < 500) || (($HTTP_COOKIE_VARS['onlinedetail'] || $showoldetails == 'yes') && $showoldetails != 'no'); 在上面加入 // Start Whos Chatting by skylee $LINES = file("chatlogs/users.log"); sort($LINES); $chattally = ""; $howmanychatters = 0; $now = time(); $whileago = $now - 30; foreach ($LINES as $lines){ chop($lines); list($chatonlinename, $chatonlineactive) = split("==W==",$lines); if($whileago <= $chatonlineactive){ $chattally = "$chattally, $chatonlinename"; $howmanychatters++; } } if($howmanychatters == 0){ $howmanychatters = "当前无人聊天"; $chattally = " "; }else{ $howmanychatters = "当前有 $howmanychatters 人在聊天."; $chattally = substr($chattally,2,strlen($chattally)-2); } // End Whos Chatting by skylee 3、编辑header模板,将下面这段代码 加到下面 接着查找 | {lang pm} 在下面加入 | 聊天室 4、编辑index模板,将下面这段html代码加到前面