AGAMES 討論區

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

首頁三格正式版[圖片+最新帖+新回復]+附件圖片 [複製鏈接]

七級帝王會員

☆Prince★}+}|電腦王子

Rank: 7Rank: 7Rank: 7

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

友誼之星勳章

跳轉到指定樓層
樓主
發表於 2008-11-16 19:57:09 |只看該作者 |倒序瀏覽
*******************************************
原作者:WOWO
適用:DZ6.0正式版(並能搭配正式版六風格)
難度:☆
款式:請參考原帖第二款式
語言支持:BIG5 繁體中文版
備注:
1.此帖僅發表AL8 轉貼或修改時,請務必保留原作者及此帖出處!謝謝
2..附件內附帶詳細安裝說明!
!(安裝前請必讀)

修改模板:1個
修改PHP:1個
**************************************************

最終更新
特別再增加FLASH附件圖片調用版

請參考下列修改

新增修正:
特別版特色:改進兼容螢幕解析度800X600&1024X768像素!
1.版本款式全面更新,插件由本人重新編寫過!
2.修正最後回復無法直接連結到最後回復帖處!
3.修正上方導航欄位,完美搭配論壇風格顯示!
4.修正加入可隱藏不想顯示在三格內的fid論壇板塊!
5.FLASH圖片可自定義宣傳展示~不調用論壇圖片!
6.再修正宣傳圖片顯示大小,加快圖片開啟速度!


演示截圖:



需修改的文件:就兩個~簡單又實用!(對於初學者安裝更容易!)
還是簡單+常用:最新發表+論壇圖片宣傳+最新回復(不再多增加數据庫查詢)
修改:
1: index.php
2: discuz.htm

安裝開始:
1.index.php
找到:
  1. $rsshead = $rssstatus
複製代碼

在這段之上加入:

  1. //----WO WO首頁三格代碼開始BY:WOWO
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //新發表
  4. $hack_cut_str = 20; //標題字數建議值20(盡量勿修改否則螢幕解析度無法兼容)
  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 = 20; //標題字數建議值20(盡量勿修改否則螢幕解析度無法兼容
  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. //----WO WO首頁三格代碼結束BY:WOWO
複製代碼

2.打開discuz.htm
找到:
  1. <div id="ad_text"></div>
複製代碼

再這段下方加入:

  1. {template foruminfo}
複製代碼

3.上傳WOWO首頁三格模板到:
將附件內>>NO.1資料夾內模板foruminfo.htm上傳到
templates/default/之內!!

4.將附件內ab資料夾上傳到論壇根目錄之內!

5.將附件images資料夾(內)檔案上傳到論壇根目錄 images資料夾(之內)!

補充PS:圖檔取名副檔名必須 jpg(小寫)非JPG
並命名為:如下
1.pic1.jpg
2.pic2.jpg
3.pic3.jpg
4.pic4.jpg
5.pic5.jpg
6.pic6.jpg

將圖檔上傳到ab資料夾內即可!
注意;圖檔大小 375x210

安裝完成!!!

========================================
關於:加入可隱藏不想顯示論壇版塊方法
修改index.php

1.找到:
如果不想調用某個版或某個區或者某些版的帖子可在index.php
修改(共2處)新帖+新回復部分

找到;
AND f.fid not in (0)

修改為:
AND f.fid not in (1,2,3)其中1,2,3為 不想調用的 fid

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


如何知道不想顯示在首頁的板塊fid??
答:從網址列最後就可看到了!



===================================
如有相關疑問?
請到原帖爬文找尋答案!!

補充:安裝前~請記得備份原檔喔!!

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

2008.5.12更新
新增GBK模板附件
如您使用的是GBK簡體中文
請下載附件NEW-GBK.rar
其他按照一樓修改即可

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

2008.8.15附件圖片調用修改說明:
請下載附件NO.04解壓縮後找到:(附件編碼為Big5)其他編碼請自行轉換
1.將pic.php檔案上傳到根目錄

2.將模板foruminfo.htm
上傳到templates/default/覆蓋替換

3.上傳WOWO資料夾FLASH檔案以及圖檔
到images/內


更新緩存~~立即實現!
附件: 你需要登錄才可以下載或查看附件。沒有帳號?快速註冊
Alta Multimedia - Facebook:http://www.facebook.com/altahkmm
您需要登錄後才可以回帖 登錄 | 快速註冊

Archiver|手機版|AGAMES 討論區

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

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回頂部