作者:[DST]hnxxwyq
效果图
修改三处地方
1.查找index.php中的- if(forum($forum)) {
- $catlist[$forum['fup']]['forums'][] = $forum['fid'];
- $forum['orderid'] = $catlist[$forum['fup']]['forumscount']++;
- $forum['subforums'] = '';
- $forumlist[$forum['fid']] = $forum;
- }
复制代码 修改成- if(forum($forum)) {
- $catlist[$forum['fup']]['forums'][] = $forum['fid'];
- $forum['orderid'] = $catlist[$forum['fup']]['forumscount']++;
- $forum['subforums'] = '';
- // 最新主题修改开始
- $_query = $db->query("SELECT tid,subject,dateline,author FROM {$tablepre}threads " .
- "WHERE fid='{$forum['fid']}' AND dateline > " . strtotime(date('Y-m-d')) . ' ' .
- "ORDER BY dateline DESC " .
- "LIMIT 0,1");
- if($new = $db->fetch_array($_query)) {
- $new['dateline'] = gmdate($dateformat, $new['dateline'] + $timeoffset * 3600);
- $forum['newthread'] = $new;
- }
- // 最新主题修改结束
- $forumlist[$forum['fid']] = $forum;
- }
复制代码 2.寻找discuz.htm文件中的- <thead class="category">
- <tr>
- <th>{lang forum_name}</th>
- <td class="nums">{lang forum_threads}</td>
- <td class="nums">{lang forum_posts}</td>
- <td class="lastpost">{lang forum_lastpost}</td>
- </tr>
- </thead>
复制代码 修改为- <thead class="category">
- <tr>
- <th>{lang forum_name}</th>
- <!-- 最新主题修改开始 -->
- <td>{最新主题}</td>
- <!-- 最新主题修改完毕 -->
- <td class="nums">{lang forum_threads}</td>
- <td class="nums">{lang forum_posts}</td>
- <td class="lastpost">{lang forum_lastpost}</td>
- </tr>
- </thead>
复制代码 3寻找discuz.htm中- <tbody id="forum$forum[fid]">
- <tr>
- <th$forum[folder]>
- $forum[icon]
- <h2><a href="forumdisplay.php?fid=$forum[fid]">$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em> ({lang index_today}: $forum[todayposts])</em><!--{/if}--></h2>
- <!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}-->
- <!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}-->
- <!--{if $forum['moderators']}--><!--{if $moddisplay == 'flat'}--><p class="moderators">{lang forum_moderators}: $forum[moderators]</p><!--{else}--><span class="dropmenu" id="mod$forum[fid]" onmouseover="showMenu(this.id)">{lang forum_moderators}</span><ul class="moderators popupmenu_popup" id="mod$forum[fid]_menu" style="display: none">$forum[moderators]</ul><!--{/if}--><!--{/if}-->
- </th>
- <td class="nums">{if $forum['redirect']}--{else}$forum[threads]{/if}</td>
- <td class="nums">{if $forum['redirect']}--{else}$forum[posts]{/if}</td>
- <td class="lastpost">
- <!--{if $forum['permission'] == 1}-->
- {lang private_forum}
- <!--{else}-->
- <!--{if $forum['redirect']}-->
- --
- <!--{elseif is_array($forum['lastpost'])}-->
- <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{echo cutstr($forum[lastpost][subject], 40)}</a>
- <cite>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--> - $forum[lastpost][dateline]</cite>
- <!--{else}-->
- {lang never}
- <!--{/if}-->
- <!--{/if}-->
- </td>
- </tr>
- </tbody>
复制代码 修改为:- <tbody id="forum$forum[fid]">
- <tr>
- <th$forum[folder]>
- $forum[icon]
- <h2><a href="forumdisplay.php?fid=$forum[fid]">$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em> ({lang index_today}: $forum[todayposts])</em><!--{/if}--></h2>
- <!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}-->
- <!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}-->
- <!--{if $forum['moderators']}--><!--{if $moddisplay == 'flat'}--><p class="moderators">{lang forum_moderators}: $forum[moderators]</p><!--{else}--><span class="dropmenu" id="mod$forum[fid]" onmouseover="showMenu(this.id)">{lang forum_moderators}</span><ul class="moderators popupmenu_popup" id="mod$forum[fid]_menu" style="display: none">$forum[moderators]</ul><!--{/if}--><!--{/if}-->
- </th>
- <!-- 最新主题修改开始 -->
- <td>
- <!--{if $forum[newthread]}-->
- <a href="redirect.php?tid=$forum[newthread][tid]&goto=lastpost#lastpost">{echo cutstr($forum[newthread][subject], 40)}</a>
- <cite>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['newthread']['author']<!--{else}-->{lang anonymous}<!--{/if}--> - $forum[newthread][dateline]</cite>
- <!--{else}-->
- 没有今日最新主题
- <!--{/if}-->
- </td>
- <!-- 最新主题修改完毕 -->
- <td class="nums">{if $forum['redirect']}--{else}$forum[threads]{/if}</td>
- <td class="nums">{if $forum['redirect']}--{else}$forum[posts]{/if}</td>
- <td class="lastpost">
- <!--{if $forum['permission'] == 1}-->
- {lang private_forum}
- <!--{else}-->
- <!--{if $forum['redirect']}-->
- --
- <!--{elseif is_array($forum['lastpost'])}-->
- <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{echo cutstr($forum[lastpost][subject], 40)}</a>
- <cite>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--> - $forum[lastpost][dateline]</cite>
- <!--{else}-->
- {lang never}
- <!--{/if}-->
- <!--{/if}-->
- </td>
- </tr>
- </tbody>
复制代码 基本上就是把我注释里面的东西添加相应位置即可!这里测试是6.0的!其他版本可以对比替换,原理是一样的!
[ 本帖最后由 伊泽浩 于 2007-10-31 11:34 编辑 ] |