AL8 Forum
   登錄註冊幫助


標題: [D6.0] 首頁四格 For Discuz 6.0.0 [修改全部bug]
 klong
 0086660
Rank: 1

頭銜: Newbie

帖子: 38

精華: 0

積分: 555 點

現金: 0 元

存款: 100 元

閱讀權限: 10

註冊: 2007-9-10

狀態: 離線
 
發表於 2007-9-11 16:46  資料  個人空間  短消息  加為好友 
首頁四格 For Discuz 6.0.0 [修改全部bug]

本人第一次修改四格,如有問題,回post!

演示:http://smazone.4everloves.net/forum/index.php
請支持本壇!

1.修改index.php

$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;


在下面加入
$today  = mktime (0,0,0,date("m")  ,date("d"),date("Y"));
$build_date = mktime (0,0,0,9,9,2007);//請修改後面的三個數字,分別代表你論壇運行第一天的月,日,年。
$build_days = (int)(($today-$build_date)/(24*3600));
//----首頁四格代碼開始
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新貼
$hack_cut_str = 26; //標題字數
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
        $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
        $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
        $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
        $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 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;
}
//新回覆
$hack_cut_str = 26; //標題字數
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid  AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 9");
while($rthread = $db->fetch_array($query)) {
        $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
        $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
        $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
        $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 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[] = $rthread;
}

//----首頁四格代碼結束


2.修改discuz.htm

<div id="ad_text"></div>


在下面加入
<!-- 首頁四格代碼開始 -->
<style type="text/css">
td.4r { width: 25%; }
td.bg4r { background: #FFF url("images/default/portalbox_bg.gif"); background-repeat: repeat-x; background-position: 0 1px; }
</style>
<div class="mainbox">
<span class="headactions">
<img id="page4_img" src="images/default/collapsed_no.gif" title="收起/展開" alt="收起/展開" onclick="toggle_collapse('page4');" />
</span>
<h1>$bbname 的資訊</h1>
<table summary="$bbname 的資訊" id="page4" cellspacing="0" cellpadding="0">
<thead class="category">
<tr>
<td class="4r" width="25%">個人資料</td>
<td class="4r" width="25%">論壇資訊</td>
<td class="4r" width="25%">最新發表</td>
<td class="4r" width="25%">最新回帖</td>
</tr>
</thead>
<tr>
<td valign="top" class="bg4r">
<!--{if !$discuz_user}-->
<form method="post" name="login" action="logging.php?action=login">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="referer" value="$referer">
<b>請即 <a href="register.php">{lang register}</a> 成為{lang memberlist}:</b>
<br>
請先<b> <a href="register.php">{lang register}</a> </b>成為本論壇會員<br>以獲得會員權限<br>
<br>
<br><br>
<a href="index.php">$bbname</a> 會員登陸:<br>
{lang username}:<input type="text" name="username" size="14" maxlength="15" tabindex="1">
<br>
{lang password}:<input type="password" name="password" size="14" tabindex="2"><br>
<button type="submit" name="loginsubmit" tabindex="4" class="submit">{lang submit}</button> 或 <a href="$link_login">安全{lang login}</a>
</form>
<!--{/if}-->
<!--{if $discuz_uid}-->
<b>$discuz_userss</b>    <!--{if $allowinvisible}--><!--{if !empty($invisible)}-->[<a href="member.php?action=switchstatus" title="{lang login_switch_normal_mode}">{lang login_invisible_mode}</a>]<!--{else}-->[<a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}">{lang login_normal_mode}</a>]<!--{/if}--><!--{/if}--><br>
{lang index_status}  :<span class="bold"><!--{if $validdays}--><a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a><!--{else}--><span class="bold">$grouptitle</span><!--{/if}--></span> <br>
{lang lastvisit}:<span class="bold">$lastvisittime</span><br>
{lang credits}  :<a class="dropmenu" id="creditlist" onmouseover="showMenu(this.id)">$credits</a><br>
IP  :<span class="bold">$onlineip</span> <br>

{lang pm}:
<!--{if $newpm ==0}-->沒有新{lang pm}<!--{else}-->
<a href="pm.php" target=_bank>?#64<span class="bold"> $newpmnum</span> 條新訊息</a><!--{/if}--><br>
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes" title="{lang show_newthreads}">新帖</a> |
<a href="member.php?action=markread" title="{lang mark_read}">標讀</a> | <a href="my.php?item=threads" title="{lang show_mytopics}">我帖</a> | <a href="digest.php" title="{lang digest}">精華</a> | <!--{if $allowuseblog}--><a href="blog.php?uid=$discuz_uid" target="_blank">{lang blog}</a>
<br>搜索帖子<br><input type="text" name="searchbox1" value="在此輸入內容" size="20" class="altbg2"  onfocus="this.value=''"> <input class="button" type="button" value="搜索" style="height: 1.8em" onclick="window.open('search.php?srchtxt='+$('searchbox1').value+'&searchsubmit=yes');">
<br>或可使用 <b><a href="search.php">高級搜索</a><b>
<!--{/if}-->
<!--{/if}-->
</td>
<td valign="top" class="bg4r">
今日發表{lang total}: $todayposts 篇<br>
昨日發表{lang total}: $postdata[0] 篇<br>
發表主題{lang total}: <span class="bold">$threads</span> 篇<br>
帖子總數{lang total}: <span class="bold">$posts</span> 篇<br>
會員總數: <span class="bold">$totalmembers</span> 人 <br>
是日到訪會員: <span class="bold">{if $todayvisit}$todayvisit{else} 0 {/if}</span> 人 <br>
是日加入會員: <span class="bold">{if $todaynewmems}$todaynewmems</span>{else} 0{/if}</span> 人<br>
線上人數: <span class="bold">$onlinenum</span> 人<br>
{lang welcome_newmember}?#64: <a href="space.php?action=viewpro&username=$lastmember"><font face="Impact">$lastmember</font></a><br>
smallzone成立日數: <span class="bold">$build_days</span> 天
</td>
<td valign="top" class="bg4r">
<!--{loop $new_post_threadlist $nthread}-->
<!--{if $nthread[replies]}-->
<a href="redirect.php?tid=$nthread[tid]&goto=newpost" title="最新話題 {LF}文章版區: $nthread[forumname]{LF}文章主題: $nthread[subject]{LF}文章{lang author}: $nthread[author]{LF}發表{lang time}: $nthread[date]{LF}瀏覽次數: $nthread[views] 次 {LF}{lang replies}次數: $nthread[replies] 次{LF}最後回覆: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]" $nthread[highlight]>$nthread[view_subject]</a>
<!--{else}-->
<a href="redirect.php?tid=$nthread[tid]&goto=newpost" title="最新話題 {LF}文章版區: $nthread[forumname]{LF}文章主題: $nthread[subject]{LF}文章{lang author}: $nthread[author]{LF}發表{lang time}: $nthread[date]{LF}瀏覽次數: $nthread[views] 次{LF}{lang replies}次數: 暫時沒有回覆" $nthread[highlight]>$nthread[view_subject]</a><!--{/if}-->
$nthread[multipage]<br>

<!--{/loop}-->
</td>
<td valign="top" class="bg4r">
<!--{loop $new_reply_threadlist $rthread}-->
<a href="redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost" title="最新回覆 {LF}文章版區: $rthread[forumname]{LF}文章主題: $rthread[subject]{LF}文章{lang author}: $rthread[author]{LF}發表{lang time}: $rthread[date]{LF}瀏覽次數: $rthread[views] 次{LF}{lang replies}次數: $rthread[replies] 次{LF}最後回覆: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]" $rthread[highlight]>$rthread[view_subject]</a>
$rthread[multipage]<br>
<!--{/loop}--></td>
</tr>
</table>
</div>
<!-- 首頁四格代碼結束 -->



<!--{if $gid || !$discuz_uid}--><a href="$indexname">$bbname</a> <!--{else}--><a href="space.php?action=viewpro&uid=$discuz_uid" class="dropmenu" id="creditlist" onmouseover="showMenu(this.id)">$discuz_user</a> <!--{/if}-->


改成
<!--{if $gid || !$discuz_uid}--><a href="$indexname">$bbname</a> <!--{else}--><a href="space.php">$discuz_user</a> <!--{/if}-->


[ 本帖最後由 klong 於 2007-9-11 16:47 編輯 ]




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

頭銜: Lord

帖子: 511

精華: 0

積分: 6826 點

現金: 75 元

存款: 1 元

閱讀權限: 25

註冊: 2006-8-1

狀態: 離線
 
發表於 2007-9-11 17:32  資料  個人空間  短消息  加為好友 
試下先!先支持




 AL8 Forum © All rights reserved.
頂部
 klong
 0086660
Rank: 1

頭銜: Newbie

帖子: 38

精華: 0

積分: 555 點

現金: 0 元

存款: 100 元

閱讀權限: 10

註冊: 2007-9-10

狀態: 離線
 
發表於 2007-9-11 17:34  資料  個人空間  短消息  加為好友 
多謝多謝..




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

頭銜: Lord

帖子: 547

精華: 0

積分: 5160 點

現金: 500 元

存款: 503 元

閱讀權限: 25

註冊: 2006-12-31

狀態: 離線
 
發表於 2007-9-11 19:17  資料  個人空間  主頁 短消息  加為好友 
呢個係原本邊個版本 的?




 AL8 Forum © All rights reserved.
頂部
 Ivan7
 0002644
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

暱稱: 熙

帖子: 2526

精華: 1

積分: 11791 點

現金: 418 元

存款: 1602 元

閱讀權限: 70

註冊: 2004-6-4

來自: 外太空

狀態: 離線
 
發表於 2007-9-11 20:15  資料  個人空間  主頁 短消息  加為好友 
你修改左d咩




 AL8 Forum © All rights reserved.
頂部
 ↗絕情惡魔↘
 0068345
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 241

精華: 0

積分: 2220 點

現金: 5 元

存款: 704 元

閱讀權限: 20

註冊: 2007-2-25

狀態: 離線
 
發表於 2007-9-11 21:54  資料  個人空間  短消息  加為好友 
改左之後.. 好唔掂..

白色... 同黑色... = =..

有冇得改底圖既色..好似有d 亂碼咁...

= =..

d 文字既顏色有冇得改....唔想要藍....




 AL8 Forum © All rights reserved.
頂部
 klong
 0086660
Rank: 1

頭銜: Newbie

帖子: 38

精華: 0

積分: 555 點

現金: 0 元

存款: 100 元

閱讀權限: 10

註冊: 2007-9-10

狀態: 離線
 
發表於 2007-9-12 17:41  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 ↗絕情惡魔↘ 於 2007-9-11 21:54 發表
改左之後.. 好唔掂..
白色... 同黑色... = =..
有冇得改底圖既色..好似有d 亂碼咁...
= =..
d 文字既顏色有冇得改....唔想要藍....

有得,,discuz.htm有




 AL8 Forum © All rights reserved.
頂部
 klong
 0086660
Rank: 1

頭銜: Newbie

帖子: 38

精華: 0

積分: 555 點

現金: 0 元

存款: 100 元

閱讀權限: 10

註冊: 2007-9-10

狀態: 離線
 
發表於 2007-9-12 17:41  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 ivan3545 於 2007-9-11 19:17 發表
呢個係原本邊個版本 的?

6.0rc1




 AL8 Forum © All rights reserved.
頂部
 ↗絕情惡魔↘
 0068345
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 241

精華: 0

積分: 2220 點

現金: 5 元

存款: 704 元

閱讀權限: 20

註冊: 2007-2-25

狀態: 離線
 
發表於 2007-9-13 00:37  資料  個人空間  短消息  加為好友 
我知有得改..

但係我唔識麻...




 AL8 Forum © All rights reserved.
頂部
 klong
 0086660
Rank: 1

頭銜: Newbie

帖子: 38

精華: 0

積分: 555 點

現金: 0 元

存款: 100 元

閱讀權限: 10

註冊: 2007-9-10

狀態: 離線
 
發表於 2007-9-13 19:08  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 ↗絕情惡魔↘ 於 2007-9-13 00:37 發表
我知有得改..
但係我唔識麻...

{ background: #FFF url("images/default/portalbox_bg.gif"); background-repeat: repeat-x; background-position: 0 1px; }


改底圖,,,要自己搵底圖上傳...紅色字自己改 = =

[ 本帖最後由 klong 於 2007-9-13 19:11 編輯 ]




 AL8 Forum © All rights reserved.
頂部
 【賢】◎§
 0077359
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6
點擊查看 【賢】◎§ 的詳細資料

頭銜: Forum Legend

帖子: 4111

精華: 0

積分: 37210 點

現金: 423 元

存款: 402 元

閱讀權限: 70

註冊: 2007-5-24

來自: Fanling

狀態: 離線
 
發表於 2007-9-14 16:15  資料  個人空間  主頁 短消息  加為好友 
仲多bug....我改緊3格版..bug多到咩咁= =




 AL8 Forum © All rights reserved.
頂部
 apple40320
 0082331
Rank: 1

頭銜: Newbie

帖子: 11

精華: 0

積分: 110 點

現金: 94 元

存款: 0 元

閱讀權限: 10

註冊: 2007-7-21

狀態: 離線
 
發表於 2007-9-14 19:15  資料  個人空間  短消息  加為好友 
歡迎新會員?#64

後面有?#64

網址:http://m40320.cvforum.0lx.net/bbs/index.php
看一下
你裡面有用錯東西喔




 AL8 Forum © All rights reserved.
頂部
 霖仔仔
 0059797
Rank: 2Rank: 2

頭銜: Member

帖子: 53

精華: 0

積分: 620 點

現金: 85 元

存款: 0 元

閱讀權限: 15

註冊: 2006-12-5

狀態: 離線
 
發表於 2007-9-15 19:06  資料  個人空間  短消息  加為好友 
有冇得較隱藏某d版區既發帖同回帖??!!~




 AL8 Forum © All rights reserved.
頂部
 gordan
 0060328
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

自述: Banned

帖子: 3803

精華: 0

積分: 3830 點

現金: 4251 元

存款: 12345 元

閱讀權限: 70

註冊: 2006-12-10

狀態: 離線
 
發表於 2007-9-15 19:12  資料  個人空間  短消息  加為好友 
不建議新手作出教學帖/...

不是說你技術不行..只是




 AL8 Forum © All rights reserved.
頂部
 klong
 0086660
Rank: 1

頭銜: Newbie

帖子: 38

精華: 0

積分: 555 點

現金: 0 元

存款: 100 元

閱讀權限: 10

註冊: 2007-9-10

狀態: 離線
 
發表於 2007-9-16 11:45  資料  個人空間  短消息  加為好友 
QUOTE:
原帖由 apple40320 於 2007-9-14 19:15 發表
歡迎新會員?#64
後面有?#64

網址:http://m40320.cvforum.0lx.net/bbs/index.php
看一下
你裡面有用錯東西喔

我已經修改..




 AL8 Forum © All rights reserved.
頂部
 apple40320
 0082331
Rank: 1

頭銜: Newbie

帖子: 11

精華: 0

積分: 110 點

現金: 94 元

存款: 0 元

閱讀權限: 10

註冊: 2007-7-21

狀態: 離線
 
發表於 2007-9-20 19:11  資料  個人空間  短消息  加為好友 
回覆 #14 gordan 的帖子

ㄟㄟㄟ
只是怎樣
有問題我就說出來ㄚ
有什麼不對阿
紙會嗆人
你友好到哪嗎
不建議新手作出教學帖/...

我只是給發鐵人看而已
並不是教學帖
ok???




 AL8 Forum © All rights reserved.
頂部
 TamCalvin
 0048796
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 382

精華: 0

積分: 3533 點

現金: 0 元

存款: 1000 元

閱讀權限: 25

註冊: 2006-7-28

狀態: 離線
 
發表於 2007-9-23 20:45  資料  個人空間  短消息  加為好友 
演示dead!




email & msn:
wcc-20061618@hkedcity.net
 AL8 Forum © All rights reserved.
頂部
 alexyiu
 0057487
Rank: 1

頭銜: Newbie

帖子: 23

精華: 0

積分: 330 點

現金: 90 元

存款: 0 元

閱讀權限: 10

註冊: 2006-11-9

狀態: 離線
 
發表於 2007-10-22 17:16  資料  個人空間  短消息  加為好友 
演示: http://cheat.hk.vg/bbs/index.php
經本人修改 想要就PM ME




 AL8 Forum © All rights reserved.
頂部
 iop45645
 0048705
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 153

精華: 0

積分: 1690 點

現金: 20 元

存款: 0 元

閱讀權限: 20

註冊: 2006-7-26

狀態: 離線
 
發表於 2007-10-22 21:52  資料  個人空間  短消息  加為好友 
so good ar..




 AL8 Forum © All rights reserved.
頂部
 410832259
 0061544
Rank: 1

頭銜: Newbie

帖子: 5

精華: 0

積分: 70 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2006-12-20

狀態: 離線
 
發表於 2007-10-22 22:14  資料  個人空間  短消息  加為好友 
點解我冇discuz.htm既???




 AL8 Forum © All rights reserved.
頂部
聯繫我們 - AL8 Forum - 網頁空間由 I-SERVICES 提供 - Archiver - WAP
清除 Cookies, 當前時區 GMT+8, 現在時間是 2010-3-12 01:59
Processed in 0.765583 second(s), 9 queries , Gzip enabled
Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.