- 最後登錄
- 2012-8-5
- 在線時間
- 978 小時
- UID
- 275
- 閱讀權限
- 140
- 精華
- 71
- 帖子
- 3799
- 日誌
- 0
- EXP
- 6040 點
- 金幣
- 4990 個
- 註冊時間
- 2008-3-27
- 帖子
- 3799
- EXP
- 6040 點
- 金幣
- 4990 個
- 好友
- 0
- 註冊時間
- 2008-3-27
|
插件名稱:小三格-圖片-最新
作 者:TCheung
適用版本:DZ6.0 6.1 6.1F
演 示:http://in-city.coms.hk/bbs
功能說明:圖片-最新主題-最後回覆-娛樂設施連接
1.上傳templates資料夾 及 images資料夾 及 picc.php 到論壇更目錄
2.修改index.php
找:
-
- $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
複製代碼
下加:
-
- //新貼//
- $hack_cut_str = 20; //修改標題顯示字數
- $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 = 20; //修改標題顯示字數
- $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;
- }
- //回覆//
複製代碼
3.修改discuz.htm
找:
-
- <!--{if !empty($insenz['vfstatus'])}--><script type="text/javascript" src="campaign.php?action=list"></script><!--{/if}-->
複製代碼
(或者你想加入3格的位置)
下加:
4:更新緩存 完畢!
需要修改論壇設施連接
1.修改foruminfo.htm
找:
- <td width="395" height="8" align="left" valign="top" scope="col"><div align="center"><span class="style1"><a href="http://in-city.coms.hk/bbs/index.php?showforumlist=default" class="style1">傳統風格</a></span> <span class="style3"><a href="http://in-city.coms.hk/bbs/index.php?showforumlist=straightdisplay" class="style1">直排風格</a></span> <a href="http://in-city.coms.hk/bbs/plugin.php?identifier=chat&module=chat" class="style1">論壇聊天</a> <a href="http://in-city.coms.hk/bbs/game.htm" class="style1">論壇熱舞</a> <a href="http://in-city.coms.hk/bbs/plugin.php?identifier=dance_7ree&module=dance_7ree" class="style1">跳舞賺錢</a> <a href="plugin.php?identifier=bank&module=bank" class="style1">社區銀行</a> <span class="style1"><a href="http://5ybbs.net/upload2.php" class="style1">上傳圖片</a></span></div></td>
複製代碼 |
|