Manyou诚邀开发者加盟 | 常见问题
《站长》俱乐部官方群公布 城市联络员机会多多
立即免费下载 Discuz!7.0.0 正式版
安装升级指南 | 用户手册 | 新手建站学堂
基于.net架构的Discuz!NT2.6正式版发布
Comsenz公司2009年招贤纳士,期待您的加盟
Discuz!收费服务内容及价格
7月重庆、成都、西安三地社区运营实战特训速报名
Discuz!/UCHome 专用官方虚拟主机
牧场新服一起联运:豆浆机免费带回家
基于Discuz!的免费论坛空间5D6D
康盛创想《站长》俱乐部18城市互动之旅报名ing
返回列表 回复 发帖

鼠标移动到主题显示最后回复for6.0

声明:非原创  修改自鼠标移动到主题显示最后回复内容 for dz5.x[更新适合 foxfire]

演示:http://bbs.364200.cn

修改两个文件:forumdisplay.php    forumdisplay.htm

打开forumdisplay.php

找到:

  1. isset($ascdesc) && in_array($ascdesc, array('ASC', 'DESC')) ? $forumdisplayadd .= "&ascdesc=$ascdesc" : $ascdesc = $_DCACHE['forums'][$fid]['ascdesc'] ? $_DCACHE['forums'][$fid]['ascdesc'] : 'DESC';
复制代码
下面加入:
  1. //e_zailai----鼠标指向主题表格时显示最后回复等内容--------开始
  2. $dotadd1 = $dotadd2 = '';
  3. if($dotfolders && $discuz_uid) {
  4.     $dotadd1 = "DISTINCT p.authorid AS dotauthor, p.subject AS re_subject, p.message, ";
  5.     $dotadd2 = "LEFT JOIN {$tablepre}posts p ON (t.tid=p.tid AND p.authorid='$discuz_uid')";
  6. }else {
  7.     $dotadd1 = "p.subject AS re_subject, p.message, ";
  8.     $dotadd2 = "LEFT JOIN {$tablepre}posts p ON (t.tid=p.tid AND t.lastpost=p.dateline)";
  9. }
  10. //e_zailai----鼠标指向主题表格时显示最后回复等内容--------结束
复制代码
找到:
  1.         $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
  2.         $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);
复制代码
下面加入:
  1.         //e_zailai----鼠标指向主题表格时显示最后回复等内容--------开始
  2. if($forum['viewperm'] && !forumperm($forum['viewperm']) && !$forum['allowview']) {
  3.         $thread['message'] = "谢谢您的访问!由于权限不够,您仅可浏览本版主题标题。";
  4.     } elseif($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator) {
  5.         include language('messages');
  6.         eval("\$show_message = \"".$language[thread_nopermission]."\";");
  7.         $thread['message'] =  $show_message;
  8.     } else {
  9.         $thread['message']  = preg_replace("/\[hide=?\d*\](.+?)\[\/hide\]/is", "**** 回复后才可查看信息 *****", $thread['message'] );
  10.         $thread['message']  = preg_replace("/\[sell=?\d*\](.+?)\[\/sell\]/is", "**** 付費信息,已經隱藏 *****", $thread['message'] );
  11.         $thread['message']  = preg_replace("/\[php](.+?)\[\/php\]/is", "**** 内容为PHP代码 *****", $thread['message'] );
  12.         $thread['message']  = preg_replace("/\[code](.+?)\[\/code\]/is", "**内容为普通代码**", $thread['message'] );
  13.         $thread['message']  = preg_replace("/\[quote](.+?)\[\/quote\]/is", "**图片引用**", $thread['message'] );
  14.         $thread['message']  = preg_replace("/\[url=?(.+?)\](.+?)\[\/url\]/is", "**** 此处为超级链接 *****", $thread['message'] );
  15.         $thread['message']  = preg_replace("/\[img](.+?)\[\/img\]/is", "**此处为图片链接**", $thread['message'] );
  16.         $thread['message'] = str_replace('"', '"', $thread['message']);
  17.         $thread['message'] = str_replace('<', '&lt;', $thread['message']);
  18.         $thread['message'] = str_replace('>', '&gt;', $thread['message']);
  19.         //$thread['message'] = str_replace("\r\n", " ◇ ", $thread['message']);    //去掉回车,紧凑显示
  20.         $thread['message'] = cutstr($thread['message'],100);        //内容截断
  21.         }
  22.     if($thread[replies]) {
  23.         $thread['shortmsg'] = $thread[message].'&nbsp;by:'.$thread[lastposter];
  24.     } else {
  25.         $thread['shortmsg'] = $thread[subject].$thread[message].'主题作者:'.$thread[author].'  发表时间:'.$thread[dateline];
  26.     }
  27. //e_zailai----鼠标指向主题表格时显示最后回复等内容--------结束
复制代码
找到:
  1. $query = $db->query("SELECT t.* FROM {$tablepre}threads t
复制代码
替换为:
  1. /*$query = $db->query("SELECT t.* FROM {$tablepre}threads t*/
  2.         $query = $db->query("SELECT $dotadd1 t.* FROM {$tablepre}threads t $dotadd2
复制代码
打开:forumdisplay.htm
找到:
  1. <span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight]>$thread[subject]</a></span>
复制代码
替换为:
  1. <span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight] title="$thread[shortmsg]">$thread[subject]</a></span>
复制代码
好啊==顶一个
修改不生效....鼠标移上去只显示"by 最后回复人"却不是最后回复的内容.原因?

我的开了静态化,有没有关系?
Visual'R 时尚 主流 领秀  http://www.visualr.cn

回复 3# 的帖子

和你一样
我也一样
可能是静态化不行吧
先复原了--改天再研究
先复原了--改天再研究
先复原了--改天再研究
楼主能不能来看看什么问题啊????
返回列表