AL8 Forum
   登錄註冊幫助


標題: [D5.5] 仿AL8首頁四格 For Dz5.5 [已更新]
 tony0109
 0072962
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

暱稱: Tony

帖子: 1536

精華: 0

積分: 8478 點

現金: 3835 元

存款: 2815 元

閱讀權限: 70

註冊: 2007-4-12

狀態: 離線
 
發表於 2007-5-17 18:29  資料  個人空間  主頁 短消息  加為好友  添加 tony0109 為MSN好友 通過MSN和 tony0109 交談
仿AL8首頁四格 For Dz5.5 [已更新]

仿AL8首頁四格 For Dz5.5

適用版本:discuz5.5
作者:tony0109
修改文件:index.php
修改模板:discuz.htm
功能:含高亮顯示,但會增加兩個查詢

1.
index.php

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

下加
//新貼//
$hack_cut_str = 36; //修改標題顯示字數
$new_post_threadlist = array();
$nthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$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'] = $nthread['name'];
        $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$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 = 36; //修改標題顯示字數
$new_reply_threadlist = array();
$rthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$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, 10");
while($rthread = $db->fetch_array($query)) {
        $rthread['forumname'] = $rthread['name'];
        $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$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;
}
//回覆//

'forumlinks', 'birthdays', 'supe_updateusers'

在後面插入
, 'foruminfo'


2.
discuz.htm

<br>
{lang credits}: <span class="bold smalltxt">$credits</span> <span id="creditlist" >{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" >{lang login_invisible_mode}</a>
<!--{else}-->
  <a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" id="ajax_switchstatus" >{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" >{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 tonyfour}<br>
<!--{/if}-->
<!--{if empty($gid)}-->


3.
下載附件 tonyfour.htm & 上載至 templates/default 目錄下

[ 本帖最後由 tony0109 於 2007-5-30 23:30 編輯 ]



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



 AL8 Forum © All rights reserved.
頂部
 ab260531
 0069716
Rank: 4Rank: 4Rank: 4Rank: 4

頭銜: Lord

帖子: 376

精華: 0

積分: 510 點

現金: 160 元

存款: 2956 元

閱讀權限: 25

註冊: 2007-3-12

狀態: 離線
 
發表於 2007-5-19 15:46  資料  個人空間  短消息  加為好友 
幫手頂頂..几簡單...




 AL8 Forum © All rights reserved.
頂部
 【無形風】
 0054006
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

自述: AL8是我家

帖子: 1093

精華: 0

積分: 200 點

現金: 0 元

存款: 110 元

閱讀權限: 70

註冊: 2006-10-1

狀態: 離線
 
發表於 2007-5-19 15:54  資料  個人空間  短消息  加為好友 
4.1先係index.htm
5.5係discuz.htm




 AL8 Forum © All rights reserved.
頂部
 044003
 0045908
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

暱稱: Jeff 044003

自述: Jeff 044003

帖子: 2929

精華: 0

積分: 24904 點

現金: 63 元

存款: 13366 元

閱讀權限: 70

註冊: 2006-5-31

來自: 香港

狀態: 離線
 
發表於 2007-5-19 17:33  資料  個人空間  短消息  加為好友  添加 044003 為MSN好友 通過MSN和 044003 交談 Yahoo!
修改模板:冇index.htm




by Jeff@@044003 - UTF-8
 AL8 Forum © All rights reserved.
頂部
 tony0109
 0072962
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

暱稱: Tony

帖子: 1536

精華: 0

積分: 8478 點

現金: 3835 元

存款: 2815 元

閱讀權限: 70

註冊: 2007-4-12

狀態: 離線
 
發表於 2007-5-21 18:38  資料  個人空間  主頁 短消息  加為好友  添加 tony0109 為MSN好友 通過MSN和 tony0109 交談
改番,Sorry




 AL8 Forum © All rights reserved.
頂部
 18s.hk
 0073992
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 170

精華: 0

積分: 1970 點

現金: -136 元

存款: 0 元

閱讀權限: 20

註冊: 2007-4-21

狀態: 離線
 
發表於 2007-5-26 01:55  資料  個人空間  短消息  加為好友  添加 18s.hk 為MSN好友 通過MSN和 18s.hk 交談
thx
用左...
唔錯!




 AL8 Forum © All rights reserved.
頂部
 suzuki8407
 0044396
Rank: 1

頭銜: Newbie

帖子: 16

精華: 0

積分: 170 點

現金: 66 元

存款: 0 元

閱讀權限: 10

註冊: 2006-5-2

狀態: 離線
 
發表於 2007-5-26 03:35  資料  個人空間  短消息  加為好友 
的確簡單!唔錯唔錯!但已經安裝了其他版本啦!sorry!不過都幫你推推post啦!




 AL8 Forum © All rights reserved.
頂部
 小頭目
 0031537
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6
點擊查看 小頭目 的詳細資料

頭銜: Forum Legend

暱稱: 阿爺

自述: 很閒的忙人

帖子: 3102

精華: 0

積分: 6870 點

現金: 9 元

存款: 420 元

閱讀權限: 70

註冊: 2005-9-26

來自: 香港

狀態: 在線
 
發表於 2007-5-28 11:40  資料  個人空間  主頁 短消息  加為好友  添加 小頭目 為MSN好友 通過MSN和 小頭目 交談 ICQ 狀態 Yahoo!
成功了,謝!




 AL8 Forum © All rights reserved.
頂部
 alingchau
 0032462
Rank: 1

頭銜: Newbie

帖子: 47

精華: 0

積分: 630 點

現金: 29 元

存款: 0 元

閱讀權限: 10

註冊: 2005-10-10

狀態: 離線
 
發表於 2007-5-28 18:05  資料  個人空間  短消息  加為好友 
有問題呀...我裝左之後, 佢係最新話題同回覆都出埋內容, 好長...點算呀?




 AL8 Forum © All rights reserved.
頂部
 rroo
 0047115
Rank: 1

頭銜: Newbie

帖子: 5

精華: 0

積分: 50 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2006-6-25

來自: TW

狀態: 離線
 
發表於 2007-5-29 08:22  資料  個人空間  短消息  加為好友 
簡單好用 已修改成功 感謝~~




 AL8 Forum © All rights reserved.
頂部
 adnim
 0075098
Rank: 1

頭銜: Newbie

帖子: 16

精華: 0

積分: 180 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2007-5-1

狀態: 離線
 
發表於 2007-5-29 17:33  資料  個人空間  短消息  加為好友 
有沒有方法可以隱藏了一些版面的主題和回覆不在仿AL8首頁四格看見




 AL8 Forum © All rights reserved.
頂部
 tony0109
 0072962
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

暱稱: Tony

帖子: 1536

精華: 0

積分: 8478 點

現金: 3835 元

存款: 2815 元

閱讀權限: 70

註冊: 2007-4-12

狀態: 離線
 
發表於 2007-5-30 16:58  資料  個人空間  主頁 短消息  加為好友  添加 tony0109 為MSN好友 通過MSN和 tony0109 交談
回覆 #11 adnim 的帖子

我唔知啦sor,應該就冇




 AL8 Forum © All rights reserved.
頂部
 sawyerhin
 0078797
Rank: 1

頭銜: Newbie

帖子: 27

精華: 0

積分: 350 點

現金: 100 元

存款: 0 元

閱讀權限: 10

註冊: 2007-6-9

狀態: 離線
 
發表於 2007-6-10 01:02  資料  個人空間  短消息  加為好友 
YA ...得左...好開心 ^^




 AL8 Forum © All rights reserved.
頂部
 yanyan
 0034334
Rank: 2Rank: 2
點擊查看 yanyan 的詳細資料

頭銜: Member

帖子: 75

精華: 0

積分: 570 點

現金: 185 元

存款: 0 元

閱讀權限: 15

註冊: 2005-11-6

來自: 永恆論壇

狀態: 離線
 
發表於 2007-6-11 23:48  資料  個人空間  主頁 短消息  加為好友 
點降會有個叉包= ="""
http://peterziv.com/ziv/index.php
點解?




 AL8 Forum © All rights reserved.
頂部
 jediskdy
 0049786
Rank: 1

頭銜: Newbie

帖子: 28

精華: 0

積分: 340 點

現金: 1 元

存款: 0 元

閱讀權限: 10

註冊: 2006-8-13

狀態: 離線
 
發表於 2007-6-14 16:40  資料  個人空間  短消息  加為好友 
YA ...得左...好開心 ^^




 AL8 Forum © All rights reserved.
頂部
 sukibb
 0049566
 此發帖者已被禁止訪問

頭銜: Banned

暱稱: 桑高娜是也=]

自述: 我 是 朱 ...

帖子: 2164

精華: 0

積分: 1044 點

現金: 159 元

存款: 117 元

閱讀權限: 0

註冊: 2006-8-9

狀態: 離線
 
發表於 2007-6-14 16:41  資料  個人空間  短消息  加為好友  添加 sukibb 為MSN好友 通過MSN和 sukibb 交談
*** 作者被禁止或刪除 內容自動屏蔽 ***
 tony0109
 0072962
Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6Rank: 6

頭銜: Forum Legend

暱稱: Tony

帖子: 1536

精華: 0

積分: 8478 點

現金: 3835 元

存款: 2815 元

閱讀權限: 70

註冊: 2007-4-12

狀態: 離線
 
發表於 2007-6-14 17:37  資料  個人空間  主頁 短消息  加為好友  添加 tony0109 為MSN好友 通過MSN和 tony0109 交談
QUOTE:
原帖由 yanyan 於 2007-6-11 23:48 發表
點降會有個叉包= ="""
http://peterziv.com/ziv/index.php
點解?


index.php




'forumlinks', 'birthdays', 'supe_updateusers'
在後面插入


, 'foruminfo'




 AL8 Forum © All rights reserved.
頂部
 kevin_cheng
 0074389
Rank: 1

頭銜: Newbie

帖子: 23

精華: 0

積分: 250 點

現金: 10 元

存款: 0 元

閱讀權限: 10

註冊: 2007-4-24

狀態: 離線
 
發表於 2007-6-15 14:23  資料  個人空間  短消息  加為好友 
感謝大大分享,安裝成功了




 AL8 Forum © All rights reserved.
頂部
 叛逆↓彤B
 0070018
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

帖子: 244

精華: 0

積分: 3220 點

現金: 0 元

存款: 0 元

閱讀權限: 20

註冊: 2007-3-15