==============================================================================
聊天室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, <a href=\"viewpro.php?username=$chatonlinename\">$chatonlinename</a>";
$howmanychatters++;
}
}
if($howmanychatters == 0){
$howmanychatters = "当前无人聊天";
$chattally = " ";
}else{
$howmanychatters = "当前有 <b>$howmanychatters</b> 人在聊天.";
$chattally = substr($chattally,2,strlen($chattally)-2);
}
// End Whos Chatting by skylee
3、编辑header模板,将下面这段代码
<script language="JavaScript">
function chatlaunch() {window.open("chat.php","chat","width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no");}
</script>
加到<script language="JavaScript" src="include/common.js"></script>下面
接着查找
| <a href="pm.php" target="_blank"><font class="navtd">{lang pm}</font></a>
在下面加入
| <a href="javascript: chatlaunch();"><font class="navtd">聊天室</font></a>
4、编辑index模板,将下面这段html代码加到<!--{if empty($gid) && $whosonlinestatus}-->前面
<tr>
<td colspan="6" class="header"><img src="{IMGDIR}/indexicon.gif" align="absmiddle"> ≡ <span class="bold"><a href="javascript: chatlaunch();" style="color: {HEADERTEXT}">谁在聊天</a> </span> ≡ - $howmanychatters</td>
</tr>
<tr>
<td bgcolor="{ALTBG1}" align="center"><img src="{IMGDIR}/online.gif"></td>
<td bgcolor="{ALTBG2}" colspan="5" onMouseOver ="this.style.backgroundColor='{ALTBG1}'" onMouseOut ="this.style.backgroundColor='{ALTBG2}'">$chattally</td>
</tr>
OK!搞定!
---
SKYLEE
http://forum.smthome.net
没有合适的资源?快使用搜索试试~ 我知道了~
discuz聊天室插件 for 2.0
共13个文件
php:6个
txt:3个
log:2个
3星 · 超过75%的资源 需积分: 50 159 下载量 64 浏览量
2005-12-27
09:38:51
上传
评论 1
收藏 12KB RAR 举报
温馨提示
功能介绍:整合到Discuz! 2.0 ,注册会员才能使用,可以使用表情符号及BBCODE,可以私聊,有动作功能(自己写:),首页显示聊天室使用情况,可以统计用户名、数量并显示之。<br> 参考程序:King_of_Dragons的xmbchat 1.01.04<br> 整合制作:skylee<br> 演示论坛:http://forum.smthome.net <br> <br> <br> 文件清单: discuzv2chat.zip<br> <br> install.txt (此文件) chatstyle.css chat.php chatinput.php chatinputadd.php chatmessages.php chatrefresh.php chatusers.php chatlogs/messages.log chatlogs/users.log
资源推荐
资源详情
资源评论
收起资源包目录
DISCUZchat.rar (13个子文件)
论坛相关服务.txt 1KB
help.txt 1KB
discuzv2chat
chatinputadd.php 4KB
chatmessages.php 121B
chat.php 1KB
chatinput.php 8KB
chatstyle.css 1KB
install.txt 3KB
chatrefresh.php 4KB
chatlogs
messages.log 0B
users.log 0B
chatusers.php 3KB
说明.htm 1KB
共 13 条
- 1
资源评论
- 菜鸟12342013-07-03感觉用到不太习惯
- qqf12232017-02-25无法使用, 不过给了点思路, 谢谢
- 「已注销」2013-09-29无法安装。不行
- billzhangtao2013-01-09x2.5上试了一下,无法安装!
普通网友
- 粉丝: 882
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功