AL8 Forum
   登錄註冊幫助


標題: [D6.0] 鼠標移動到主題顯示最後回覆 for6.0
 wat_supp
 0090565
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 372

精華: 0

積分: 3460 點

現金: 65 元

存款: 0 元

閱讀權限: 25

註冊: 2007-11-4

狀態: 離線
 
發表於 2007-11-29 00:32  資料  個人空間  短消息  加為好友 
鼠標移動到主題顯示最後回覆 for6.0

原文:http://www.discuz.net/thread-790220-1-2.html


演示:http://bnb.fdchost.com/


修改兩個文件:forumdisplay.php    forumdisplay.htm(先備份喔︿︿)

1.打開forumdisplay.php

找到:
QUOTE:
isset($ascdesc) && in_array($ascdesc, array('ASC', 'DESC')) ? $forumdisplayadd .= "&ascdesc=$ascdesc" : $ascdesc = $_DCACHE['forums'][$fid]['ascdesc'] ? $_DCACHE['forums'][$fid]['ascdesc'] : 'DESC';

下面加入:
QUOTE:
//e_zailai----鼠標指向主題表格時顯示最後回復等內容--------開始
$dotadd1 = $dotadd2 = '';
if($dotfolders && $discuz_uid) {
    $dotadd1 = "DISTINCT p.authorid AS dotauthor, p.subject AS re_subject, p.message, ";
    $dotadd2 = "LEFT JOIN {$tablepre}posts p ON (t.tid=p.tid AND p.authorid='$discuz_uid')";
}else {
    $dotadd1 = "p.subject AS re_subject, p.message, ";
    $dotadd2 = "LEFT JOIN {$tablepre}posts p ON (t.tid=p.tid AND t.lastpost=p.dateline)";
}
//e_zailai----鼠標指向主題表格時顯示最後回復等內容--------結束


找到:
QUOTE:
        $thread['dateline'] = gmdate($dateformat, $thread['dateline'] + $timeoffset * 3600);
        $thread['lastpost'] = gmdate("$dateformat $timeformat", $thread['lastpost'] + $timeoffset * 3600);

下面加入:
QUOTE:
        //e_zailai----鼠標指向主題表格時顯示最後回復等內容--------開始
if($forum['viewperm'] && !forumperm($forum['viewperm']) && !$forum['allowview']) {
        $thread['message'] = "謝謝您的訪問!由於權限不夠,您僅可瀏覽本版主題標題。";
    } elseif($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator) {
        include language('messages');
        eval("\$show_message = \"".$language[thread_nopermission]."\";");
        $thread['message'] =  $show_message;
    } else {
        $thread['message']  = preg_replace("/\[hide=?\d*\](.+?)\[\/hide\]/is", "**** 回復後才可查看信息 *****", $thread['message'] );
        $thread['message']  = preg_replace("/\[sell=?\d*\](.+?)\[\/sell\]/is", "**** 付費信息,已經隱藏 *****", $thread['message'] );
        $thread['message']  = preg_replace("/\[php](.+?)\[\/php\]/is", "**** 內容為PHP代碼 *****", $thread['message'] );
        $thread['message']  = preg_replace("/\[code](.+?)\[\/code\]/is", "**內容為普通代碼**", $thread['message'] );
        $thread['message']  = preg_replace("/\[quote](.+?)\[\/quote\]/is", "**圖片引用**", $thread['message'] );
        $thread['message']  = preg_replace("/\[url=?(.+?)\](.+?)\[\/url\]/is", "**** 此處為超級鏈接 *****", $thread['message'] );
        $thread['message']  = preg_replace("/\[img](.+?)\[\/img\]/is", "**此處為圖片鏈接**", $thread['message'] );
        $thread['message'] = str_replace('"', '"', $thread['message']);
        $thread['message'] = str_replace('<', '&lt;', $thread['message']);
        $thread['message'] = str_replace('>', '&gt;', $thread['message']);
        //$thread['message'] = str_replace("\r\n", " ◇ ", $thread['message']);    //去掉回車,緊湊顯示
        $thread['message'] = cutstr($thread['message'],100);        //內容截斷
        }
    if($thread[replies]) {
        $thread['shortmsg'] = $thread[message].'&nbsp;by:'.$thread[lastposter];
    } else {
        $thread['shortmsg'] = $thread[subject].$thread[message].'主題作者:'.$thread[author].'  發表時間:'.$thread[dateline];
    }
//e_zailai----鼠標指向主題表格時顯示最後回復等內容--------結束


找到:
QUOTE:
$query = $db->query("SELECT t.* FROM {$tablepre}threads t

替换:
QUOTE:
/*$query = $db->query("SELECT t.* FROM {$tablepre}threads t*/
        $query = $db->query("SELECT $dotadd1 t.* FROM {$tablepre}threads t $dotadd2


2.打開:forumdisplay.htm
找到:
QUOTE:
<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight]>$thread[subject]</a></span>

替换:
QUOTE:
<span id="thread_$thread[tid]"><a href="viewthread.php?tid=$thread[tid]&amp;extra=$extra"$thread[highlight] title="$thread[shortmsg]">$thread[subject]</a></span>




 AL8 Forum © All rights reserved.
頂部
 kenwan
 0069612
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 118

精華: 0

積分: 1440 點

現金: 70 元

存款: 0 元

閱讀權限: 20

註冊: 2007-3-11

狀態: 離線
 
發表於 2007-11-29 00:55  資料  個人空間  短消息  加為好友 
咁方便,唔怪得啲廣告流量越嚟越少啦。




 AL8 Forum © All rights reserved.
頂部
 legolas
 0087343
Rank: 1

頭銜: Newbie

帖子: 37

精華: 0

積分: 320 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2007-9-19

狀態: 離線
 
發表於 2007-12-9 10:17  資料  個人空間  短消息  加為好友 
唔成功,就算係原帖果度都無人成功喎!




 AL8 Forum © All rights reserved.
頂部
 cs254011
 0014380
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 419

精華: 0

積分: 5170 點

現金: 115 元

存款: 0 元

閱讀權限: 25

註冊: 2005-1-5

狀態: 離線
 
發表於 2007-12-31 22:59  資料  個人空間  短消息  加為好友 
純推不裝~~~




 AL8 Forum © All rights reserved.
頂部

聯繫我們 - AL8 Forum - 網頁空間由 I-SERVICES 提供 - Archiver - WAP
清除 Cookies, 當前時區 GMT+8, 現在時間是 2008-12-4 12:45
Processed in 0.017754 second(s), 7 queries , Gzip enabled
Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.