AGAMES 討論區

 找回密碼
 快速註冊
搜索
查看: 1720|回復: 1
打印 上一主題 下一主題

首頁六格+七格(FLASH+新帖+回復+熱門+精華+排行)旗艦版 [複製鏈接]

七級帝王會員

☆Prince★}+}|電腦王子

Rank: 7Rank: 7Rank: 7

帖子
3799
EXP
6040 點
金幣
4990 個
好友
0
註冊時間
2008-3-27

友誼之星勳章

跳轉到指定樓層
樓主
發表於 2008-11-16 17:48:43 |只看該作者 |倒序瀏覽
*******************************************
Discuz!6.0&6.1首頁六格双星旗艦版
改編作者:WOWO
此文轉:http://wowo.nike.tw/WOWO論壇
適用:DZ6.0/DZ6.1正式版(並能搭配正式版六風格)
難度:☆
款式:提供2款式~可依喜好自行選擇搭配!
第一款演示:圖一
第二款演示:圖二
語言支持:BIG5 繁體中文版+GBK簡體中文+UTF-8繁體中文

備注:
1.此帖僅發表AL8 分享轉貼或修改時,請務必保留原作者及此帖出處!謝謝
2.純無聊修改分享~因此本人不附帶任何安裝錯誤的責任~~安裝前請記得備份!
3.如有侵犯他人權益~還請告知~本人將立即改正!!謝謝!

修改模板:1個
修改PHP:1個
上傳模板:1個
上傳圖檔資料夾:1個

如您的檔案從未修改過?
附件並提供已經修改好的檔案~請選擇您要的版本~上傳覆蓋原檔即可實現!!
注意~~安裝前~請記得備份原檔喔!!
**************************************************

說明:
本人論壇並不打算升級Discuz!6.1版本!
此修改~~僅為分享給有需要的人!~無任何代價~~無聊修改之作~純分享~!
如果喜歡本人的修改?可以的話?只求能回復支持給予鼓勵一下即可!~感謝您的舉手之勞!!

功能說明:
1.經過本人優化及修改~對於初學者安裝更加容易!!
2.增加首頁6格主題支援高亮顯示
3.點擊新回復即可到最後回復帖處
4.修正FLASH圖檔大小~優化開啟速度
5.可設置不想顯示在6格之內的板塊fid
6.修正顯示標題過長導致爆框問題
7.FLASH圖片宣傳展示~可由站長完全自定義~不調用論壇附件圖片!
8.FLASH宣傳圖檔連結修改~只須修改模板foruminfo.htm~同在一個模板中完成!
9.更新宣傳圖片~只須上傳到相應目錄覆蓋即可~注意檔名及副檔名為jpg非JPG.
10.如果不想調用某個版或某個區或者某些版的帖子可在
打開: index.php
找到AND f.fid not in (0)<<<共4處(新主題+新回復+一周熱門+隨機精華)

修改為如示範:
AND f.fid not in (1,2,3)<<<舉例其中的1,2,3為 不想調用的 fid

修改不想顯示的fid即可!
多個不想顯示的版塊, 請用逗号,間隔!

如何知道論壇板塊fid?
答:從網址列最後即可看到!!

最佳特色:
所謂雙星旗艦版定義:
站長還可以依照心情及需要~~隨時更換版本!~而不須改動任何文件!
只要簡單幾秒~便可立即完成模板更換動作!

方法:
1.將兩款版本圖檔附件包同時下載並上傳到相對應位置內!
2.以後如需要更換模板?只需要FTP上傳另一款版本模板覆蓋~即可立即實現!!
3.只須模板更換: foruminfo.htm

===================================================

演示: 第一款

演示: 第二款


**************************************************************

安裝開始:
以下兩款皆共用!!

1.打開 index.php
找到:
  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
複製代碼
在下方加入:

  1. //----WOWO首頁六格代碼開始BY:WOWO
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //最新主題
  4. $hack_cut_str = 50; //標題字數
  5. $hack_cut_strauthor = 10;
  6. $new_post_threadlist = array();
  7. $nthread = array();
  8. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
  9. while($nthread = $db->fetch_array($query)) {
  10.         $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
  11.         $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
  12.         $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
  13.         $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
  14.         $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
  15.         if($nthread['highlight']) {
  16.                 $string = sprintf('%02d', $nthread['highlight']);
  17.                 $stylestr = sprintf('%03b', $string[0]);
  18.                 $nthread['highlight'] = 'style="';
  19.                 $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  20.                 $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  21.                 $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  22.                 $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  23.                 $nthread['highlight'] .= '"';
  24.         } else {
  25.                 $nthread['highlight'] = '';
  26.         }
  27.         $new_post_threadlist[] = $nthread;
  28. }
  29. //最新回復
  30. $hack_cut_str = 50; //標題字數
  31. $hack_cut_strauthor = 10;
  32. $new_reply_threadlist = array();
  33. $rthread = array();
  34. $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 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
  35. while($rthread = $db->fetch_array($query)) {
  36.         $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
  37.         $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
  38.         $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
  39.                 $rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
  40.         $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
  41.         if($rthread['highlight']) {
  42.                 $string = sprintf('%02d', $rthread['highlight']);
  43.                 $stylestr = sprintf('%03b', $string[0]);
  44.                 $rthread['highlight'] = 'style="';
  45.                 $rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  46.                 $rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  47.                 $rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  48.                 $rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  49.                 $rthread['highlight'] .= '"';
  50.         } else {
  51.                 $rthread['highlight'] = '';
  52.         }
  53.         $new_reply_threadlist[] = $rthread;
  54. }
  55. //一周熱門帖
  56. $hack_cut_str = 50; //標題字數
  57. $hack_cut_strauthor = 10;
  58. $new_hot_threadlist = array();
  59. $mthread = array();
  60. $ctime=$timestamp-3600*24*7;//最后7是天數為本周  
  61. $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 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
  62. while($mthread = $db->fetch_array($query)) {
  63.         $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
  64.         $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
  65.         $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
  66.                 $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
  67.         $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
  68.         if($mthread['highlight']) {
  69.                 $string = sprintf('%02d', $mthread['highlight']);
  70.                 $stylestr = sprintf('%03b', $string[0]);
  71.                 $mthread['highlight'] = 'style="';
  72.                 $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  73.                 $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  74.                 $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  75.                 $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  76.                 $mthread['highlight'] .= '"';
  77.         } else {
  78.                 $mthread['highlight'] = '';
  79.         }
  80.         $new_hot_threadlist[] = $mthread;
  81. }
  82. //隨機精華帖
  83. $hack_cut_str = 50; //標題字數
  84. $hack_cut_strauthor = 10;
  85. $new_digest_threadlist = array();
  86. $dthread = array();
  87. $dtime=$timestamp-3600*24*30;//最后30是天數為本月  
  88. $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 AND t.dateline>$dtime AND t.digest in (1,2,3) AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
  89. while($dthread = $db->fetch_array($query)) {
  90.         $dthread['forumname'] = ereg_replace('<[^>]*>','',$dthread['name']);
  91.         $dthread['view_subject'] = cutstr($dthread['subject'],$hack_cut_str);
  92.         $dthread['view_lastposter'] = cutstr($dthread['lastposter'],$hack_cut_strauthor);
  93.                 $dthread['date']= gmdate("$dateformat $timeformat", $dthread['dateline'] + $timeoffset * 3600);
  94.         $dthread['lastreplytime']= gmdate("$dateformat $timeformat", $dthread[lastpost] + ($timeoffset * 3600));
  95.         if($dthread['highlight']) {
  96.                 $string = sprintf('%02d', $dthread['highlight']);
  97.                 $stylestr = sprintf('%03b', $string[0]);
  98.                 $dthread['highlight'] = 'style="';
  99.                 $dthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  100.                 $dthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  101.                 $dthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  102.                 $dthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  103.                 $dthread['highlight'] .= '"';
  104.         } else {
  105.                 $dthread['highlight'] = '';
  106.         }
  107.         $new_digest_threadlist[] = $dthread;
  108. }
  109. //本月發帖排行
  110. $today = array();
  111. $query = $db->query("SELECT uid, username, posts FROM {$tablepre}members ORDER BY posts DESC LIMIT 10");
  112. while($variable = $db->fetch_array($query)) {
  113.         $today[] = array('uid'=>$variable['uid'], 'username'=>$variable['username'], 'posts'=>$variable[posts]);
  114. }
  115. //----WOWO首頁六格代碼結束BY:WOWO
複製代碼
2.打開discuz.htm
找到:
  1. <div id="ad_text"></div>
複製代碼
在下方加入:

  1. {template foruminfo}
複製代碼
這裡需要特別注意一下:
DZ6.1版本在以上此段下方必須還有個

<!--{/if}-->
注意不要覆蓋了或刪除了!也就是說必須在上方這段代碼之內!!

DZ6.0則沒有~~不必理會~~!!




3.上傳附件包內模板foruminfo.htm

templates/default/之內

這裡請選擇您喜歡的WOWO双星版本其中一款上傳即可!
以後更換模板或是修改也都在此!!



4.上傳圖檔附件包wowo資料夾到 images資料夾之內!!
如你需要不定時使用或更換双星版?
兩款式圖檔壓縮包WOWO之內的檔案及資料夾都可同時上傳存放一起!
以後方便更換!!



5.編輯FLASH圖檔並上傳

注意!!~~圖檔副檔名必須為 jpg 非 JPG 否則圖片將無法顯示!!

第一款:
將圖檔命名為:
pic1.jpg
pic2.jpg
pic3.jpg
pic4.jpg
pic5.jpg
pic6.jpg

編輯好後上傳到
images/wowo/ab/之內

圖檔大小: 須注意!!
350X210

第二款:
將圖檔命名為:
toplist_1.jpg
toplist_2.jpg
toplist_3.jpg
toplist_4.jpg
toplist_5.jpg

編輯好後上傳到
images/wowo/toplist/之內

圖檔大小: 須注意!!
306X200


最後>>>>更新緩存!!



安裝完成!!!!

=======================
第一款式請下載附件包 NO.1
第二款式請下載附件包 NO.2


GBK語言編碼請下載附件模板 NO.GBK
其他按照一樓修改即可!


如您的檔案從未修改過?本人提供已經修改好的檔案!
語言編碼: Discuz!6.1(Big5繁體中文)其他編碼請自行轉碼!!
第一款式請下載附件 NO.01
第二款式請下載附件 NO.02
上傳覆蓋即可~~請注意必須先備份原檔喔!!


**********************************

[ 本帖最後由 dlalden 於 2008-11-16 17:50 編輯 ]
附件: 你需要登錄才可以下載或查看附件。沒有帳號?快速註冊
Alta Multimedia - Facebook:http://www.facebook.com/altahkmm

七級帝王會員

☆Prince★}+}|電腦王子

Rank: 7Rank: 7Rank: 7

帖子
3799
EXP
6040 點
金幣
4990 個
好友
0
註冊時間
2008-3-27

友誼之星勳章

2
發表於 2008-11-16 17:51:02 |只看該作者
更新
新增UTF-8繁體中文双模板



更新
新增標題文字高亮版本
為了讓此版能更完美~並讓喜歡本人修改的支持者有更多的選擇!
特別新增!!
有空將會不斷做更新~請時常查看此帖最後更新!
謝謝支持!!

截圖演示:

說明:
1.一樓款式將維持原樣~為了讓大家有耕多的選擇!

2.如您喜歡此高亮版?
僅需要下載附件>>選擇您所安裝的款式>>將模板覆蓋替換即可實現!!
3.語言支持(Big5+GBK+UTF-8 X 双款式模板)


1.繁體BIG5中文版
第一款請下載附件NO.11.rar
第二款請下載附件NO.22.rar

2.GBK簡體中文
附件中包含雙版本~~已轉碼!



3.UTF-8繁體中文版
第一款請下載附件NO1.UTF-8.rar
第二款請下載附件NO2.UTF-8.rar



[ 本帖最後由 dlalden 於 2008-11-16 17:54 編輯 ]
附件: 你需要登錄才可以下載或查看附件。沒有帳號?快速註冊
您需要登錄後才可以回帖 登錄 | 快速註冊

Archiver|手機版|AGAMES 討論區

GMT+8, 2024-9-20 06:32 , Processed in 0.050209 second(s), 12 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回頂部