AL8 Forum
   登錄註冊幫助


標題: 在首頁顯示會員個人資料、AL8 討論區的資料及最新貼文或回覆
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-2 16:04  資料  個人空間  主頁 短消息  加為好友 
在首頁顯示會員個人資料、AL8 討論區的資料及最新貼文或回覆

已推出更新版本, 建議使用新版本
http://www.alan888.com/Discuz/viewthread.php?tid=4625

請支持本討論區, 轉載請說明來源: http://www.alan888.com/Discuz/index.php



注意:
1. 此修改僅適用於原始及Discuz! 2.0 COML 繁體組合版的 index.htm 模板;
2. 其他風格如 Ayoyo, D-Show-Blue 等的 index.htm 模板請參考下列調整自行修改;
3. 星空 - Mac 風格由於多了 mac 的紅綠頭圖案一欄, 所以不建議修改;
4. 修改前請先將 index.php 及 index.htm 模板昨出備份


1. 修改 index.php
$newthreads = $timestamp - $lastvisit;

在下面加上
//---------------Hack PM info start
        $query = $db->query("SELECT COUNT(*) FROM $table_pm WHERE (msgfrom='$discuz_user' AND folder='outbox') OR (msgto='$discuz_user' AND folder='inbox')");
        $u2uusednum = $db->result($query, 0);
        $query = $db->query("SELECT COUNT(*) FROM $table_pm WHERE msgto='$discuz_user' AND folder='inbox' && new='1'");
        $u2unew = $db->result($query, 0);
//---------------hack PM info end
//-----------------hack Bank information start
$query = $db->query("SELECT avatar,credit,bank,money FROM $table_members WHERE username='$discuz_user'");
$userbank=$db->fetch_array($query);
$userbankmoney= $userbank[bank];
$usermoney= $userbank[money];
$allmoney = $userbank[bank]+$userbank[money];
//---------------hack Bank information end
//---------------hack ConvertIP start
function convertip($ip, $datadir = "./"){
        $ip_detail = explode(".", $ip);
        if(file_exists("{$datadir}ipdata/$ip_detail[0].txt")) {
                $ip_fdata = fopen("{$datadir}ipdata/$ip_detail[0].txt", "r");
        } else {
                if(!($ip_fdata = fopen("{$datadir}ipdata/0.txt", "r"))) {
                        echo "IP 數據文件錯誤";
                }
        }
        for ($i = 0; $i <= 3; $i++) {
                $ip_detail[$i] = sprintf("%03d", $ip_detail[$i]);
        }
        $ip=join(".", $ip_detail);
        do {
                $ip_data = fgets($ip_fdata, 200);
                $ip_data_detail = explode("|", $ip_data);
                if($ip >= $ip_data_detail[0] && $ip <= $ip_data_detail[1]) {
                        fclose($ip_fdata);
                        return $ip_data_detail[2].$ip_data_detail[3];
                }
        } while(!feof($ip_fdata));
        fclose($ip_fdata);
        return "未知地區";
}
//---------------hack ConvertIP end
//---------------hack Meminfo start
if(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 6.0")) {
                $visitor_browser = "Internet Explorer 6.0";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 5.5")) {
                $visitor_browser = "Internet Explorer 5.5";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 5.0")) {
                $visitor_browser = "Internet Explorer 5.0";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 4.01")) {
                $visitor_browser = "Internet Explorer 4.01";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NetCaptor")) {
                $visitor_browser = "NetCaptor";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Netscape")) {
                $visitor_browser = "Netscape";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Lynx")) {
                $visitor_browser = "Lynx";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Opera")) {
                $visitor_browser = "Opera";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Konqueror")) {
                $visitor_browser = "Konqueror";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Mozilla/5.0")) {
                $visitor_browser = "Mozilla";
        } else {
                $visitor_browser = "其它";
        }
//上面的是瀏覽器

        if(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 5.1")) {
                $visitor_os = "Windows XP";
        }elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 5.2")) {
                $visitor_os = "Windows Server 2003";
        }elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 5")) {
                $visitor_os = "Windows 2000";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "4.9")) {
                $visitor_os = "Windows ME";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 4")) {
                $visitor_os = "Windows NT 4.0";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "98")) {
                $visitor_os = "Windows 98";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "95")) {
                $visitor_os = "Windows 95";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Mac")) {
                $visitor_os = "Mac";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Linux")) {
                $visitor_os = "Linux";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Unix")) {
                $visitor_os = "Unix";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "FreeBSD")) {
                $visitor_os = "FreeBSD";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "SunOS")) {
                $visitor_os = "SunOS";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "BeOS")) {
                $visitor_os = "BeOS";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "OS/2")) {
                $visitor_os = "OS/2";
        } elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "PC")) {
                $visitor_os = "Macintosh";
        }elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "AIX")) {
                $visitor_os = "AIX";
        } else {
                $visitor_os = "其他";
        }

        $mem_home = convertip($onlineip, $datadir = "./");  

//---------------hack Meminfo end
//---------------hack Hottopic start
$hack_cut_str = 45;
$hack_others_threadlist = array();
$thread = array();
$query = $db->query("SELECT t.* FROM $table_threads t  WHERE t.fid<>'$fid'  ORDER BY lastpost DESC LIMIT 0, 11");
while($thread = $db->fetch_array($query)) {
        $thread['view_subject'] = wordscut($thread['subject'],$hack_cut_str);
$thread['date']= gmdate("$dateformat $timeformat", $thread['dateline'] + $timeoffset * 3600);
$thread['lastreplytime']= gmdate("$dateformat $timeformat", $thread[lastpost] + ($timeoffset * 3600));
$hack_others_threadlist[] = $thread;
}
//---------------hack Hottopic end


                require $discuz_root.'./include/pmprompt.php';
        }


在下面加上
//---------------Hack Today Visit Start
                $datecut = time() - (3600 * 24);
                $query = $db->query("SELECT username FROM $table_members WHERE lastvisit>='$datecut' ORDER BY lastvisit DESC");
               
                $todaymembersnum = 0;
                $todaymembers = '';
                $comma = '';
               
                while ($memberstoday = $db->fetch_array($query)) {
                            if($todaymembersnum<=100){
                      $todaymembers .= "$comma <a href=\"viewpro.php?&username=".rawurlencode($memberstoday['username'])."\">".$memberstoday['username']."</a>";}
                            ++$todaymembersnum;
                            $comma = ", ";
                }
//---------------Hack Today Visit End


2. 修改 index.htm 模板
<table cellspacing="{TABLESPACE}" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center">
<tr class="mediumtxt"><td class="smalltxt">
{lang index_your} {lang credit_title} <span class="bold">$credit</span> {lang credit_unit} / {lang index_status}:
<span class="bold">$grouptitle</span>
<br>
{lang timenow} $currenttime, {lang your_lastvisit} $lastvisittime
</td><td align="right" nowrap class="smalltxt">
{lang total} <span class="bold">$threads</span> {lang index_threads} / <span class="bold">$posts</span> {lang index_posts} / <span class="bold">$totalmembers</span> {lang index_members}<br>
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<a href="member.php?action=markread">{lang mark_read}</a>
<!--{if $discuz_user}-->
| <a href="search.php?srchuname=$discuz_userenc&srchfrom=604800&searchsubmit=yes">{lang show_mytopics}</a>
<!--{/if}-->
| {lang welcome_newmember} <a href="viewpro.php?username=$memberenc"><span class="bold">$lastmember</span></a><br>
</td></tr></table>

找到後把這段刪除

$announcements
</marquee>
<!--{/if}-->
</td></tr>

在下面加入
<!--{/if}-->
<!--{if empty($gid)}-->
<td class="smalltxt" bgcolor="{ALTBG2}" width="31%" valign="top" style="word-break: keep-all" onMouseOver="this.style.backgroundColor='{ALTBG1}'"  onMouseOut="this.style.backgroundColor='{ALTBG2}'">
<!-- MemInfo hack -->
{template MemInfo}
<!-- MemInfo end -->
</td>
<td class="smalltxt" bgcolor="{ALTBG2}" width="27%" valign="top" style="word-break: keep-all" onMouseOver="this.style.backgroundColor='{ALTBG1}'"  onMouseOut="this.style.backgroundColor='{ALTBG2}'">
<!-- ForumInfo hack -->
{template ForumInfo}
<!-- ForumInfo end -->
</td>
<td bgcolor="{ALTBG2}" width="42%" valign="top" style="word-break: keep-all" onMouseOver="this.style.backgroundColor='{ALTBG1}'" onMouseOut="this.style.backgroundColor='{ALTBG2}'">
<!-- Hot hack -->
{template home_hot_topics}
<!-- Hot hack end -->
</td></tr>


3. 修改 templates/templates.lang.php
        'credit_unit' => '點',

在下面加上
        'cash' => '現金',
        'money' => '金幣',
        'deposit' => '存款',


4. 將下載回來的 IndexHack.rar 解壓至 templates/default

5. 在系統設置→系統工具→更新緩存

完成

============================================
如已按 http://www.alan888.com/Discuz/viewthread.php?tid=40
在 Mac 風格的首頁插入最新貼文或回覆作出修改者, 請先還原有關設定
包括
1. 將下載回的 home_hot_topics.htm 取代原來的文件
2. 將下列 index.php 下列以前的修改刪去
$hack_cut_str = 39;
$hack_others_threadlist = array();
$thread = array();
$query = $db->query("SELECT t.* FROM $table_threads t  WHERE t.fid<>'$fid'  ORDER BY lastpost DESC LIMIT 0, 5");
while($thread = $db->fetch_array($query)) {
        $thread['view_subject'] = wordscut($thread['subject'],$hack_cut_str);
        $hack_others_threadlist[] = $thread;
}

3. 還原 index.htm 模板
============================================
演示:
本論壇的 Crystal Blue, Silver Grey 及原始風格首頁



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



 AL8 Forum © All rights reserved.
頂部
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-2 16:10  資料  個人空間  主頁 短消息  加為好友 
圖片演示



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



 AL8 Forum © All rights reserved.
頂部
 shray
 0000060
Rank: 3Rank: 3Rank: 3
點擊查看 shray 的詳細資料

頭銜: Conqueror

帖子: 176

精華: 3

積分: 9645 點

現金: 150 元

存款: 212820 元

閱讀權限: 20

註冊: 2003-12-29

狀態: 離線
 
發表於 2004-2-2 17:04  資料  個人空間  短消息  加為好友 
哇~~這個.............等了很久了~~thx




 AL8 Forum © All rights reserved.
頂部
 bk0001
 0000041
Rank: 3Rank: 3Rank: 3

頭銜: Conqueror

自述: 掃地阿四

帖子: 193

精華: 33

積分: 23435 點

現金: 213542 元

存款: 888888 元

閱讀權限: 20

註冊: 2003-12-19

狀態: 離線
 
發表於 2004-2-2 17:27  資料  個人空間  短消息  加為好友 
好~~~~~~thz~~~~~~




 AL8 Forum © All rights reserved.
頂部
 tiger06
 0000129
Rank: 3Rank: 3Rank: 3
點擊查看 tiger06 的詳細資料

頭銜: Conqueror

帖子: 143

精華: 2

積分: 4415 點

現金: 1109 元

存款: 34755 元

閱讀權限: 20

註冊: 2004-1-16

狀態: 離線
 
發表於 2004-2-2 20:09  資料  個人空間  短消息  加為好友 
不能看我也要抓..




甲級貧戶
 AL8 Forum © All rights reserved.
頂部
 tiger06
 0000129
Rank: 3Rank: 3Rank: 3
點擊查看 tiger06 的詳細資料

頭銜: Conqueror

帖子: 143

精華: 2

積分: 4415 點

現金: 1109 元

存款: 34755 元

閱讀權限: 20

註冊: 2004-1-16

狀態: 離線
 
發表於 2004-2-2 20:19  資料  個人空間  短消息  加為好友 
不好意思,搶積分...




甲級貧戶
 AL8 Forum © All rights reserved.
頂部
 杜門
 0000110
Rank: 2Rank: 2
點擊查看 杜門 的詳細資料

頭銜: Member

帖子: 72

精華: 0

積分: 4800 點

現金: 522 元

存款: 0 元

閱讀權限: 15

註冊: 2004-1-13

狀態: 離線
 
發表於 2004-2-2 22:24  資料  個人空間  短消息  加為好友 
我想問咩叫緩存更新一次??




 AL8 Forum © All rights reserved.
頂部
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-2 22:30  資料  個人空間  主頁 短消息  加為好友 
QUOTE:
Originally posted by 杜門 at 2004-2-2 22:24:
我想問咩叫緩存更新一次??

系統設置→系統工具→更新緩存




 AL8 Forum © All rights reserved.
頂部
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-2 22:32  資料  個人空間  主頁 短消息  加為好友 
QUOTE:
Originally posted by tiger06 at 2004-2-2 20:19:
不好意思,搶積分...

係唔洗錢架不過夠分先睇到




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

頭銜: Member

帖子: 72

精華: 0

積分: 4800 點

現金: 522 元

存款: 0 元

閱讀權限: 15

註冊: 2004-1-13

狀態: 離線
 
發表於 2004-2-3 21:36  資料  個人空間  短消息  加為好友 
點解我整好咗,仲係咩都冇變的??有who能幫我,我的網址:
http://ipwaiki2001.no-ip.com




 AL8 Forum © All rights reserved.
頂部
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-3 21:49  資料  個人空間  主頁 短消息  加為好友 
QUOTE:
Originally posted by 杜門 at 2004-2-3 21:36:
點解我整好咗,仲係咩都冇變的??有who能幫我,我的網址:
http://ipwaiki2001.no-ip.com

我查你個 default 風格 = 冇改
查你個 D-Show blue, 跟本沒有 blue 的 templates




 AL8 Forum © All rights reserved.
頂部
 alexfok
 0000229
Rank: 2Rank: 2

頭銜: Member

帖子: 66

精華: 0

積分: 4400 點

現金: 4209 元

存款: 0 元

閱讀權限: 15

註冊: 2004-1-27

狀態: 離線
 
發表於 2004-2-4 01:45  資料  個人空間  短消息  加為好友 
請問...
可否看看
http://lunckyforum.no-ip.com
這個壇
主頁
我找不回之前的留言...
不知怎樣delete 返佢




 AL8 Forum © All rights reserved.
頂部
 alexfok
 0000229
Rank: 2Rank: 2

頭銜: Member

帖子: 66

精華: 0

積分: 4400 點

現金: 4209 元

存款: 0 元

閱讀權限: 15

註冊: 2004-1-27

狀態: 離線
 
發表於 2004-2-4 02:02  資料  個人空間  短消息  加為好友 




 AL8 Forum © All rights reserved.
頂部
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-4 02:18  資料  個人空間  主頁 短消息  加為好友 
這裡記憶中沒發過這樣的 Hack




 AL8 Forum © All rights reserved.
頂部
 alexfok
 0000229
Rank: 2Rank: 2

頭銜: Member

帖子: 66

精華: 0

積分: 4400 點

現金: 4209 元

存款: 0 元

閱讀權限: 15

註冊: 2004-1-27

狀態: 離線
 
發表於 2004-2-4 02:24  資料  個人空間  短消息  加為好友 

點樣delete 左佢-.-
and 我想知有咩hack 改係
要改到index.htm同php 架
我一係重新整個




 AL8 Forum © All rights reserved.
頂部
 alan888
 0000001
Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9Rank: 9

頭銜: Administrator

自述: skywalker

帖子: 21877

精華: 195

積分: 558095 點

現金: 78355948 元

存款: 144392954 元

閱讀權限: 120

註冊: 2003-11-13

來自: Hong Kong

狀態: 離線
 
發表於 2004-2-4 02:41  資料  個人空間  主頁 短消息  加為好友 
QUOTE:
Originally posted by alexfok at 2004-2-4 02:24:

點樣delete 左佢-.-
and 我想知有咩hack 改係
要改到index.htm同php 架
我一係重新整個

1. 大概位置在
<a href="#bottom"><img src="{IMGDIR}/arrow_dw.gif" border="0" align="absmiddle"></a></td></tr></table><br>
下及這裡上
<tr class="header"><td colspan="3">$bbname {lang index_announcements}</td></tr>
<tr bgcolor="{ALTBG2}" align="center">
<td colspan="3" align="center">
<!--{if empty($announcements)}-->
{lang index_noannouncement}
<!--{else}-->

2. 除這個外, 聊天室, 訪客, 今日到訪正式用戶, 滾動聯盟論壇, 最近注冊的 20 名新會員.....
看看這裡
http://www.alan888.com/Discuz/viewthread.php?tid=288




 AL8 Forum © All rights reserved.
頂部