AL8 Forum
   登錄註冊幫助


標題: [D5.5] AL8 首頁四格顯示 For Discuz 5.5.0(BIG5繁體&UTF-8繁體)
 范倫鐵諾
 0054640
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 301

精華: 0

積分: 2930 點

現金: 485 元

存款: 0 元

閱讀權限: 25

註冊: 2006-10-8

來自: 台灣

狀態: 離線
 
發表於 2007-3-15 02:17  資料  個人空間  短消息  加為好友 
AL8 首頁四格顯示 For Discuz 5.5.0(BIG5繁體&UTF-8繁體)

插件名稱:AL8 首頁四格顯示 for Discuz 5.5.0
適合版本:Discuz 5.5
原作者: alan888
出處:http://www.alan888.com/Discuz/viewthread.php?tid=85947&highlight=al8
DZ 5.0補增益版:By djkevin (在AL8首頁4格的個人資料加入個人圖像 For 5.0)
DZ 5.5修改整理:By 范倫鐵諾(修正5.5與5.0不同處並整理)
演示:http://www.kmusicspot.com/bbs/index.php
數據庫升級:無
修改模板:1個
修改PHP:8個
加入文件: foruminfo.htm (附件1&2)
修改文件:
/index.php
/logging.php
/topicadmin.php
/register.php
/include/newthread.inc.php
/include/newreply.inc.php
/include/counter.inc.php
/include/cache.func.php
/templates/default/discuz.htm

解說:

一直以來都很喜歡alan888站長的四格插件,是個實用又美的四格

而Discuz 5.5.0於2007年3月12日推出,小弟因為程序上的錯誤,

只能硬將自己的論壇升級為Discuz 5.5.0,可是相對的,原先的首

頁四格出現許多錯誤,而小弟的論壇又很需要貴站的四格,故就

此擅自將alan888站長設計的四格之星修正並找出符合5.5.0的地方

,並整合了個人資料加上圖像之美化,如有冒犯他人著作之處,請

不吝告訴小弟,小弟加以改進,在此,再度感謝alan888站長的分享

,小弟會繼續支持AL8,還請再指教。

                         By  【K歌黨】管理顧問

注意:

『1』此版安裝程繁雜,安裝前請記得備份,初學者需再詳細確認步驟。

『2』此版於之前alan888站長的教學缺少了 include/editpost.inc.php的修改,
        因為此部份修改,會造成編輯帖子時嚴重錯誤,在對四格影響不大的情況
        下,小弟省略此步驟,若有需此修改者,請再自行研究。

『3』因5.5.0會對原5.0版本上的今日到訪人數(forumdata/cache/cache_todayvisit.php)
        有數據庫的處理錯誤,故此行已於下列教學中修正為今日發帖總數,若有需要原修改
        者,請再自行研究。

『4』此版本小弟自我測試無錯誤,若有因為過程上造成使用者的問題或其它損害,小弟並不負責任何責任

說明:

1. 修改 include/cache.func.php
修改完成此文件後請即時到後台→更新緩存



'medals' => array('medals')


更換為


                'medals'        => array('medals'),
                'newtopic'        => array('newtopic'),
                'newreply'        => array('newreply'),

               
再找


                case 'medals':
                        $table = 'medals';
                        $cols = 'medalid, name, image';
                        $conditions = "WHERE available='1'";
                        break;


在下面加上 (注意填妥紅字部份)
填上不需要顯示帖子區域
由於使用快取檔型式, 故某些私密區不能判斷會員權限來顯示發帖及回帖, 所以要先修改及取代下紅字部份 "填上不需要顯示帖子區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號" 部份, 例如希望不顯示 fid 1,3,5 便填上 "$fids="1,3,5";"
如果希望全部顯示者, 請將下兩段的 NOT IN ($fids) (藍色字顯示部份)刪除, 否則會出現數據錯誤的顯示


QUOTE:
                case newtopic:
                        $table = 'threads t, '.$tablepre.'forums f';
                        $cols = "t.tid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name";
                        $fids="填上不需要顯示發新帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號";//例如 "1,2,3";
                        $conditions = "WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid NOT IN ($fids) ORDER BY t.dateline DESC LIMIT 0, 11";
                        break;
                case newreply:
                        $table = 'threads t, '.$tablepre.'forums f';
                        $cols = "t.tid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name";
                        $fids="填上不需要顯示回帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號";//例如 "1,2,3";
                        $conditions = "WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid NOT IN ($fids) AND  t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 11";
                        break;
                case todayvisit:
                        $table = 'members';
                        $cols = "COUNT(*)";
                        $datecut = time() - (3600 * 24);
                        $conditions = "WHERE lastactivity>='$datecut' ORDER BY lastvisit DESC";
                        break;





$GLOBALS['totlamembers'] = $data['totalmembers'] = $db->result($query, 0);


在下面加上


                        $datecut = time() - (3600 * 24);
                        $query = $db->query("SELECT COUNT(*) FROM {$tablepre}members WHERE regdate>='$datecut'");
                        $GLOBALS['todaynewmems'] = $data['todaynewmems'] = $db->result($query, 0);





                case 'forumlinks':
                        global $forumlinkstatus;


上面加上


                case 'newreply':
                $hack_cut_str = 26;
                $new_reply_threadlist = array();
                $rthread = array();
                $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
                while($rthread = $db->fetch_array($query)){
                $rthread['forumname'] = $rthread['name'];
                $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
                $rthread['subject'] = cutstr($rthread['subject'],46);
                $rthread['date']= gmdate('Y-n-j G:i', $rthread['dateline'] + 8 * 3600);
                $rthread['lastreplytime']= gmdate('Y-n-j G:i', $rthread['lastpost'] + 8 * 3600);
                if($rthread['highlight']) {
                $string = sprintf('%02d', $rthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $rthread['highlight'] = 'style="';
                $rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $rthread['highlight'] .= '"';
                } else {
                $rthread['highlight'] = '';
                }
                $new_reply_threadlist = "<a href=\"redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost\" title=\"論壇: $rthread[forumname]\r\n標題: $rthread[subject]\r\n作者: $rthread[author]\r\n發表時間: $rthread[date]\r\n瀏覽次數: $rthread[views] 次\r\n回覆: $rthread[replies] 次\r\n最後回覆: $rthread[lastreplytime]\r\n最後發表: $rthread[lastposter]\" $rthread[highlight]>$rthread[view_subject]</a><br>";
                $data[] = array('content' => $new_reply_threadlist);
                        }
                break;
                case 'newtopic':
                $hack_cut_str = 26;
                $new_post_threadlist = array();
                $nthread = array();
                $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
                while($nthread = $db->fetch_array($query)){
                $nthread['forumname'] = $nthread['name'];
                $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
                $nthread['subject'] = cutstr($nthread['subject'],46);
                $nthread['date']= gmdate('Y-n-j G:i', $nthread['dateline'] + 8 * 3600);
                $nthread['lastreplytime']= gmdate('Y-n-j G:i', $nthread[lastpost] + 8 * 3600);
                if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string[0]);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
                $nthread['highlight'] .= '"';
                } else {
                $nthread['highlight'] = '';
                }
        $new_post_threadlist = $nthread[replies] ? "<a href=\"redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost\" title=\"論壇: $nthread[forumname]\r\n標題: $nthread[subject]\r\n作者: $nthread[author]\r\n發表時間: $nthread[date]\r\n瀏覽次數: $nthread[views] 次 \r\n回覆: $nthread[replies] 次\r\n最後回覆: $nthread[lastreplytime]\r\n最後發表: $nthread[lastposter]\" $nthread[highlight] >$nthread[view_subject]</a><br>" : "<a href=\"redirect.php?tid=$nthread[tid]&goto=lastpost#lastpost\" title=\"論壇: $nthread[forumname]\r\n標題: $nthread[subject]\r\n作者: $nthread[author]\r\n發表時間: $nthread[date]\r\n瀏覽次數: $nthread[views] 次\r\n回覆: 暫時沒有回覆\" $nthread[highlight] >$nthread[view_subject]</a><br>";
                $data[] = array('content' => $new_post_threadlist);
                        }
                break;


2. 修改 include/newthread.inc.php



showmessage('post_newthread_succeed', "viewthread.php?tid=$tid&extra=$extra");


在上面加上


        require DISCUZ_ROOT.'./include/cache.func.php';
        updatecache('newtopic');


3. 修改 include/newreply.inc.php



showmessage('post_reply_succeed', "viewthread.php?tid=$tid&pid=$pid&page=".(@ceil(($thread['replies'] + 2) / $ppp))."&extra=$extra#pid$pid");


在上面加上


require DISCUZ_ROOT.'./include/cache.func.php';
updatecache('newreply');
updatecache('newtopic');




4. 修改 include/counter.inc.php



if(!$sessionexists) {
        if(strpos($visitor['agent'], 'Netscape')) {
                $visitor['browser'] = 'Netscape';
        } elseif(strpos($visitor['agent'], 'Lynx')) {
                $visitor['browser'] = 'Lynx';
        } elseif(strpos($visitor['agent'], 'Opera')) {
                $visitor['browser'] = 'Opera';
        } elseif(strpos($visitor['agent'], 'Konqueror')) {
                $visitor['browser'] = 'Konqueror';
        } elseif(strpos($visitor['agent'], 'MSIE')) {
                $visitor['browser'] = 'MSIE';
        } elseif(substr($visitor['agent'], 0, 7) == 'Mozilla') {
                $visitor['browser'] = 'Mozilla';
        } else {
                $visitor['browser'] = 'Other';
        }

        if(strpos($visitor['agent'], 'Win')) {
                $visitor['os'] = 'Windows';
        } elseif(strpos($visitor['agent'], 'Mac')) {
                $visitor['os'] = 'Mac';
        } elseif(strpos($visitor['agent'], 'Linux')) {
                $visitor['os'] = 'Linux';
        } elseif(strpos($visitor['agent'], 'FreeBSD')) {
                $visitor['os'] = 'FreeBSD';
        } elseif(strpos($visitor['agent'], 'SunOS')) {
                $visitor['os'] = 'SunOS';
        } elseif(strpos($visitor['agent'], 'OS/2')) {
                $visitor['os'] = 'OS/2';
        } elseif(strpos($visitor['agent'], 'AIX')) {
                $visitor['os'] = 'AIX';
        } elseif(preg_match("/(Bot|Crawl|Spider)/i", $visitor['agent'])) {
                $visitor['os'] = 'Spiders';
        } else {
                $visitor['os'] = 'Other';
        }


更換為


if(!$sessionexists || $discuz_uid) {
if(strpos($visitor['agent'], "MSIE 7.0")) {
                $visitor_browser = "Internet Explorer 7.0";
                $visitor['browser'] = 'MSIE';
        } elseif(strpos($visitor['agent'], "MSIE 6.0")) {
                $visitor_browser = "Internet Explorer 6.0";
                $visitor['browser'] = 'MSIE';
        } elseif(strpos($visitor['agent'], "MSIE 5.5")) {
                $visitor_browser = "Internet Explorer 5.5";
                $visitor['browser'] = 'MSIE';
        } elseif(strpos($visitor['agent'], "MSIE 5.0")) {
                $visitor_browser = "Internet Explorer 5.0";
                $visitor['browser'] = 'MSIE';
        } elseif(strpos($visitor['agent'], "MSIE 4.01")) {
                $visitor_browser = "Internet Explorer 4.01";
                $visitor['browser'] = 'MSIE';
        } elseif(strpos($visitor['agent'], "Netscape")) {
                $visitor_browser = "Netscape";
                $visitor['browser'] = 'Netscape';
        } elseif(strpos($visitor['agent'], "Lynx")) {
                $visitor_browser = "Lynx";
                $visitor['browser'] = 'Lynx';
        } elseif(strpos($visitor['agent'], "Opera")) {
                $visitor_browser = "Opera";
                $visitor['browser'] = 'Opera';
        } elseif(strpos($visitor['agent'], "Konqueror")) {
                $visitor_browser = "Konqueror";
                $visitor['browser'] = 'Konqueror';
        } elseif(strpos($visitor['agent'], "Firefox")) {
                $visitor_browser = "Firefox";
                $visitor['browser'] = 'Mozilla';
        } elseif(strpos($visitor['agent'], "Mozilla/5.0")) {
                $visitor_browser = "Mozilla";
                $visitor['browser'] = 'Mozilla';
        } else {
                $visitor_browser = "其它";
                $visitor['browser'] = 'Other';
        }
        if(strpos($visitor['agent'], "NT 5.1")) {
        if(strpos($visitor['agent'], "SV1")){
                $visitor_os = "Windows XP SP2";
                $visitor['os'] = 'Windows';
        }else{
                $visitor_os = "Windows XP";
                $visitor['os'] = 'Windows';
        }
        }elseif(strpos($visitor['agent'], "NT 6.0")) {
                $visitor_os = "Win Vista";
                $visitor['os'] = 'Windows';
        }elseif(strpos($visitor['agent'], "NT 5.2")) {
                $visitor_os = "Windows Server 2003";
                $visitor['os'] = 'Windows';
        }elseif(strpos($visitor['agent'], "NT 5")) {
                $visitor_os = "Windows 2000";
                $visitor['os'] = 'Windows';
        } elseif(strpos($visitor['agent'], "4.9")) {
                $visitor_os = "Windows ME";
                $visitor['os'] = 'Windows';
        } elseif(strpos($visitor['agent'], "NT 4")) {
                $visitor_os = "Windows NT 4.0";
                $visitor['os'] = 'Windows';
        } elseif(strpos($visitor['agent'], "98")) {
                $visitor_os = "Windows 98";
                $visitor['os'] = 'Windows';
        } elseif(strpos($visitor['agent'], "95")) {
                $visitor_os = "Windows 95";
                $visitor['os'] = 'Windows';
        } elseif(strpos($visitor['agent'], "Mac")) {
                $visitor_os = "Mac";
                $visitor['os'] = 'Mac';
        } elseif(strpos($visitor['agent'], "Linux")) {
                $visitor_os = "Linux";
                $visitor['os'] = 'Linux';
        } elseif(strpos($visitor['agent'], "Unix")) {
                $visitor_os = "Unix";
                $visitor['os'] = 'Other';
        } elseif(strpos($visitor['agent'], "FreeBSD")) {
                $visitor_os = "FreeBSD";
                $visitor['os'] = 'FreeBSD';
        } elseif(strpos($visitor['agent'], "SunOS")) {
                $visitor_os = "SunOS";
                $visitor['os'] = 'SunOS';
        } elseif(strpos($visitor['agent'], "OS/2")) {
                $visitor_os = "OS/2";
                $visitor['os'] = 'OS/2';
        }elseif(strpos($visitor['agent'], "AIX")) {
                $visitor_os = "AIX";
                $visitor['os'] = 'AIX';
        } elseif(preg_match("/(Bot|Crawl|Spider)/i", $visitor['agent'])) {
                $visitor_os = "Spiders";
                $visitor['os'] = 'Spiders';
        } else {
                $visitor_os = "其他";
                $visitor['os'] = 'Other';
        }


5. 修改 topicadmin.php

(第一段約第 15 行那句)

require_once DISCUZ_ROOT.'./include/misc.func.php';


在下面加上


require_once DISCUZ_ROOT.'./include/cache.func.php';





showmessage((isset($resultarray['message']) ? $resultarray['message'] : 'admin_succeed'), $resultarray['redirect']);


在上面加上


                        updatecache('newreply');
                        updatecache('newtopic');


6. 修改 logging.php



$sessionexists = 0;


在下面加上


                                require_once DISCUZ_ROOT.'./include/cache.func.php';
                                updatecache('todayvisit');


7. 修改 index.php


$searchboxstatus = substr(sprintf('%03b', $qihoo_searchbox), -1, 1);

上方加入


//------------圖像 by keven
        $member_query = $db->query("SELECT * FROM {$tablepre}members m, {$tablepre}memberfields mf
                WHERE m.uid='$discuz_uid' AND mf.uid='$discuz_uid'");
        $member = $db->fetch_array($member_query);
        $member['lastvisit'] = gmdate("$dateformat $timeformat", $member['lastvisit'] + ($timeoffset * 3600));
        $member['usernameenc'] = rawurlencode($member['username']);
        $allowfriendcheck = array($member['allowfriend'] => 'checked');
        $avatypecheck = array($member['avatype'] => 'checked');
if(!$member[avatar]){
        $member[avatar]="images/avatars/noavatar.gif";
}
//-------------圖像 END





$catlist = $forumlist = $sublist = $pmlist = array();



在上面加上


//-----------hack AL8 Info
if(!$statstatus && $discuz_uid){
require_once DISCUZ_ROOT.'./include/counter.inc.php';
}
require_once DISCUZ_ROOT.'./include/misc.func.php';
$mem_home = convertip($onlineip, $datadir = "./");
@include './forumdata/cache/cache_newtopic.php';
@include './forumdata/cache/cache_newreply.php';
//-----------hack AL8 Info End





'forumlinks', 'birthdays', 'supe_updateusers'


在後面插入


, 'foruminfo'


9. 修改 register.php



$styleid = $styleid ? $styleid : $_DCACHE['settings']['styleid'];


在下面加上


$datecut = time() - (3600 * 24);
$query = $db->query("SELECT COUNT(*) FROM {$tablepre}members WHERE regdate>='$datecut'");
$todaynewmems = $db->result($query, 0);





updatesettings();


在上面加上


$_DCACHE['settings']['todaynewmems'] = $todaynewmems;


8. 修改 discuz 模板
找到及刪除


<div title="menu" class="popupmenu_popup" id="creditlist_menu" style="display: none">
<div class="popupmenu_option" style="text-align: left">
{lang credits}: $credits<br>
<!--{loop $extcredits $id $credit}-->
$credit[title]: $GLOBALS['extcredits'.$id] $credit[unit]<br>
<!--{/loop}-->
</div></div>





<br>
<br>
{lang credits}: <span class="bold smalltxt">$credits</span> <span id="creditlist" onmouseover="showMenu(this.id)">{lang credits_detail}</span> / {lang index_status}:
<!--{if $validdays}-->
        <a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a>
<!--{else}-->
        <span class="bold">$grouptitle</span>
<!--{/if}-->
<!--{if $allowinvisible && $discuz_uid}-->{lang online_status}:
        <!--{if !empty($invisible)}-->
                <a href="member.php?action=switchstatus" title="{lang login_switch_normal_mode}" id="ajax_switchstatus" onclick="ajaxmenu(event, this.id, 2000, 'changestatus', 0)">{lang login_invisible_mode}</a>
        <!--{else}-->
                <a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" id="ajax_switchstatus" onclick="ajaxmenu(event, this.id, 2000, 'changestatus', 0)">{lang login_normal_mode}</a>
        <!--{/if}-->
<!--{/if}--><br>
{lang your_lastvisit} <span class="smalltxt">$lastvisittime</span><br>
</div>

<div class="right" style="line-height: 18px;">
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<a href="digest.php">{lang digest}</a> |
<a href="member.php?action=markread" id="ajax_markread" onclick="ajaxmenu(event, this.id)">{lang mark_read}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
<br>
{lang total} <span class="smalltxt">$threads</span> {lang index_threads} / <span class="smalltxt">$posts</span> {lang index_posts} / {lang index_today} <span class="smalltxt">$todayposts</span> {lang index_posts}<br>
{lang total} <span class="smalltxt">$totalmembers</span> {lang index_members} / {lang welcome_newmember} <a href="space.php?username=$memberenc"><span class="bold">$lastmember</span></a>
</div>

</div><br>

<!--{if empty($gid)}-->
        <!--{if !empty($announcements)}-->
                <div id="announcement">$announcements</div><script type="text/javascript">announcement();</script>
        <!--{/if}-->


更換為


</div>
<div class="right" style="line-height: 18px;">
<!--{if !empty($stylejumpstatus)}-->
        <select onchange="if(this.options[this.selectedIndex].value != '') {
        <!--{if $rewritestatus && in_array(CURSCRIPT, array('forumdisplay', 'viewthread', 'viewpro'))}-->
                <!--{echo "var thisurl = '".substr($_SERVER[SCRIPT_FILENAME], strrpos($_SERVER[SCRIPT_FILENAME], '/')+1).'?'.$_SERVER[QUERY_STRING]."'";}-->
        <!--{else}-->
                var thisurl = document.URL.replace(/[&?]styleid=.+?&sid=.+?$/i, '');
        <!--{/if}-->
        window.location=(thisurl.replace(/\#.+$/, '')+(thisurl.match(/\?/) ? '&' : '?')+'styleid='+this.options[this.selectedIndex].value+'&sid=$sid') }">
        <option value="">{lang style}</option>
        <option value="">----------</option>
        <!--{loop $stylejump $id $name}-->
                <option value="$id">$name</option>
        <!--{/loop}-->
        </select>
<!--{/if}-->
<!--{if $rssstatus}--> <a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
</div>
</div>
<!--{if empty($gid)}-->
{template foruminfo}<br>
<!--{/if}-->
<!--{if empty($gid)}-->


9. 下載附件 foruminfo.htm, 並執行
a. 根據自身討論區對下一段作出調整


QUOTE:
來自 $mem_home 的訪客,即日起,現{lang register}成為(黨員)歌手,便即刻擁有<font color=red>20元</font>版稅並立即使用K歌黨相關功能。


b. 上載至 templates/default 目錄下

~完成~

[ 本帖最後由 范倫鐵諾 於 2007-3-30 08:34 編輯 ]



 附件: 您所在的用戶組無法下載或查看附件



http://www.k-song.com
一個喜歡唱歌的好地方
 AL8 Forum © All rights reserved.
頂部
 范倫鐵諾
 0054640
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 301

精華: 0

積分: 2930 點

現金: 485 元

存款: 0 元

閱讀權限: 25

註冊: 2006-10-8

來自: 台灣

狀態: 離線
 
發表於 2007-3-15 02:18  資料  個人空間  短消息  加為好友 
標題:如何在 "最新發表文章" 及 "最新回覆文章" 加上 "主題分類

include/cache.func.php



                case newtopic:
                        $table = 'threads t, cdb_forums f';
                        $cols = "t.tid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name";
                        $fids="填上不需要顯示發新帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號";//例如 "1,2,3";
                        $conditions = "WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid NOT IN ($fids) ORDER BY t.dateline DESC LIMIT 0, 11";
                        break;
                case newreply:
                        $table = 'threads t, cdb_forums f';
                        $cols = "t.tid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name";
                        $fids="填上不需要顯示回帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號";//例如 "1,2,3";
                        $conditions = "WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid NOT IN ($fids) AND  t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 11";
                        break;


更換為


                        case newtopic:
                        $table = 'threads t';
                        $cols = "t.tid, t.typeid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name, tt.name AS idname";
                        $fids="填上不需要顯示發新帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號";//例如 "1,2,3";
                        $conditions = "LEFT JOIN {$tablepre}threadtypes tt ON (tt.typeid=t.typeid) LEFT JOIN {$tablepre}forums f ON (f.fid=t.fid) WHERE t.fid<>'$fid' AND f.fid NOT IN ($fids) ORDER BY t.dateline DESC LIMIT 0, 11";
                        break;
                case newreply:
                        $table = 'threads t';
                        $cols = "t.tid, t.typeid, t.subject, t.author, t.dateline, t.views, t.replies, t.lastpost, t.lastposter, t.highlight, f.name, tt.name AS idname";
                        $fids="填上不需要顯示回帖區域的 fid 編號, 以逗號作分格, 最後一個不用加上逗號";//例如 "1,2,3";
                        $conditions = "LEFT JOIN {$tablepre}threadtypes tt ON (tt.typeid=t.typeid) LEFT JOIN {$tablepre}forums f ON (f.fid=t.fid) WHERE t.fid<>'$fid' AND f.fid NOT IN ($fids) AND  t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 11";
                        break;





$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);


更換為


$rthread['view_subject'] = $rthread[idname] ? cutstr( "[$rthread[idname]] $rthread[subject]",$hack_cut_str) : cutstr($rthread['subject'],$hack_cut_str);





$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);


更換為


$nthread['view_subject'] = $nthread[idname] ? cutstr( "[$nthread[idname]] $nthread[subject]",$hack_cut_str) : cutstr($nthread['subject'],$hack_cut_str);


在下次更新時 (或到後台->更新緩存) 便會顯示

[ 本帖最後由 范倫鐵諾 於 2007-3-15 21:09 編輯 ]




http://www.k-song.com
一個喜歡唱歌的好地方
 AL8 Forum © All rights reserved.
頂部
 riuge
 0068880
Rank: 1

頭銜: Newbie

帖子: 25

精華: 0

積分: 280 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2007-3-3

狀態: 離線
 
發表於 2007-3-15 03:57  資料  個人空間  短消息  加為好友 
感謝你的分享,不過5.5板的DISCUZ在註冊頁面會有連結到簡體且號稱MSN的非官方可疑網站,加上該網站的連結被我查出有木馬,所以我應該不會用5.5的DZ。

此一問題連結在官方論壇已經有很多用戶希望拿掉 ,在官方改版前我應該都不會升級到5.5吧




 AL8 Forum © All rights reserved.
頂部
 yanzilme
 0061657
Rank: 2Rank: 2

頭銜: Member

帖子: 60

精華: 0

積分: 790 點

現金: 0 元

存款: 100 元

閱讀權限: 15

註冊: 2006-12-21

狀態: 離線
 
發表於 2007-3-15 04:17  資料  個人空間  短消息  加為好友 
先幫你頂一個
我也很喜歡AL8的首頁四格
晚一點就裝上!

另外有一個問題,要如何修改才可以像這個論壇的首頁四格一樣
可以把"資料"這一格的數字指定顏色?
http://forum.xfastest.com/index.php




 AL8 Forum © All rights reserved.
頂部
 andysui
 0051780
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 154

精華: 0

積分: 1730 點

現金: 7 元

存款: 0 元

閱讀權限: 20

註冊: 2006-9-6

狀態: 離線
 
發表於 2007-3-15 07:31  資料  個人空間  短消息  加為好友 
謝謝你的修改!!!!!!!!
.5板的DISCUZ在註冊頁面會有連結到簡體且號稱MSN
有這個問題嗎?




 AL8 Forum © All rights reserved.
頂部
 samspson
 0043778
Rank: 4Rank: 4Rank: 4Rank: 4
點擊查看 samspson 的詳細資料

頭銜: Lord

帖子: 392

精華: 0

積分: 3760 點

現金: 49 元

存款: 0 元

閱讀權限: 25

註冊: 2006-4-20

狀態: 離線
 
發表於 2007-3-15 10:32  資料  個人空間  短消息  加為好友 
支持支持




 AL8 Forum © All rights reserved.
頂部
 ntf
 0043014
Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

頭銜: Moderator

自述: ntf

帖子: 3710

精華: 0

積分: 6373 點

現金: 0 元

存款: 38423 元

閱讀權限: 100

註冊: 2006-4-7

狀態: 離線
 
發表於 2007-3-15 11:18  資料  個人空間  短消息  加為好友 
SUPPORT
不過都係等 AL8大 發




 AL8 Forum © All rights reserved.
頂部
 andysui
 0051780
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 154

精華: 0

積分: 1730 點

現金: 7 元

存款: 0 元

閱讀權限: 20

註冊: 2006-9-6

狀態: 離線
 
發表於 2007-3-15 11:20  資料  個人空間  短消息  加為好友 
Parse error: syntax error, unexpected '[' in /home/xxxxxpublic_html/test/include/cache.func.php on line 521




 AL8 Forum © All rights reserved.
頂部
 范倫鐵諾
 0054640
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 301

精華: 0

積分: 2930 點

現金: 485 元

存款: 0 元

閱讀權限: 25

註冊: 2006-10-8

來自: 台灣

狀態: 離線
 
發表於 2007-3-15 12:08  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 riuge 於 2007-3-15 03:57 發表。&nbsp;
感謝你的分享,不過5.5板的DISCUZ在註冊頁面會有連結到簡體且號稱MSN的非官方可疑網站,加上該網站的連結被我查出有木馬,所以我應該不會用5.5的DZ。
此一問題連結在官方論壇已經有很多用戶希望拿掉 ,在官方 ...

請參考

http://www.alan888.com/Discuz/thread-104575-1-1.html




http://www.k-song.com
一個喜歡唱歌的好地方
 AL8 Forum © All rights reserved.
頂部
 keihileon
 0047534
 此發帖者帳號尚未激活

頭銜: Inactive Member

暱稱: 不懂弄暱稱

自述: Bamed t ...

帖子: 3533

精華: 0

積分: 10069 點

現金: 0 元

存款: 120 元

閱讀權限: 10

註冊: 2006-7-4

來自: MaCaU

狀態: 離線
 
發表於 2007-3-15 12:10  資料  個人空間  主頁 短消息  加為好友  添加 keihileon 為MSN好友 通過MSN和 keihileon 交談 QQ ICQ 狀態 Yahoo!
QUOTE:
原帖由 ntf 於 2007-3-15 11:18 發表。&nbsp;
SUPPORT
不過都係等 AL8大 發

agree




[url=http://bbs.hady-world.com][b][color=red]哈地論壇歡迎你!按此進入吧![/color][/b][/url]
 AL8 Forum © All rights reserved.
頂部
 范倫鐵諾
 0054640
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 301

精華: 0

積分: 2930 點

現金: 485 元

存款: 0 元

閱讀權限: 25

註冊: 2006-10-8

來自: 台灣

狀態: 離線