PHPBB论坛首页显示 论坛新帖 及 本周五大
原作者IO 大 - [url=http://phpbbchina.com/forum/viewtopic.php?f=23&t=3534:3alghy1m]viewtopic.php?f=23&t=3534[/url:3alghy1m])
MOD Title: Latest & Weekly Top 5 Topics MOD
MOD Description: Display latest topics in forum index
演示DEMO: http://web.dhjh.tcc.edu.tw/~gzqbyr/phpBB/forum/
Download: http://web.dhjh.tcc.edu.tw/~gzqbyr/downloads/latest.zip]
------------------------------------------
1,复制解压出来的 includes/functions_extra.php
到你论坛的 includes目录
2,复制解压出来的 styles/prosilver/theme/latest.css
到你论坛的 styles/prosilver/theme/目录
------------------------------------------
用文本编辑器 如记事本 打开index.php文件
1,搜索
[code]include($phpbb_root_path . 'common.' . $phpEx);[/code]
插入下面的代码
[code]include($phpbb_root_path . 'includes/functions_extra.' . $phpEx);[/code]
2,搜索
[code]$user->setup('viewforum');[/code]
插入下面的代码
[code]fill_mini_panel(5, 5);[/code]
------------------------------------------
用文本编辑器 如记事本 打开styles/prosilver/template/目录下的overall_header.html文件
搜索
[code]<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />[/code]
插入下面的代码
[code]<link href="{T_THEME_PATH}/latest.css" rel="stylesheet" type="text/css" media="screen, projection" />[/code]
------------------------------------------
用文本编辑器 如记事本 打开styles/prosilver/template/目录下的index_body.html文件
1,搜索
[code]<!-- IF U_MCP --><p>{CURRENT_TIME} <br />[ <a href="{U_MCP}">{L_MCP}</a> ]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->[/code]
插入下面的代码
[code]<div id="extras1">
<div id="latest">
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>{L_LATESTTOPICS1}</dt>
</dl>
</li>
</ul>
<ul class="topiclist topics">
<!-- BEGIN topicsrow -->
<li class="row bg1"><a href="{topicsrow.U_FORUMLINK}" title="{topicsrow.FORUMTITLE}"><img src="{T_IMAGESET_PATH}/icon_topic_latest.gif" alt="" /></a> <a href="{topicsrow.U_TOPICLINK}" title="{topicsrow.TOPICTIME} {topicsrow.TOPICPOSTER}">{topicsrow.TOPICTITLE}</a>({topicsrow.TOPICREPLIES}/{topicsrow.TOPICVIEWS})</li>
<!-- END topicsrow -->
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
<div id="weekly">
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>{L_HOTESTTOPICS1}</dt>
</dl>
</li>
</ul>
<ul class="topiclist topics">
<!-- BEGIN hopicsrow -->
<li class="row bg1"><a href="{hopicsrow.U_FORUMLINK}" title="{hopicsrow.FORUMTITLE}"><img src="{T_IMAGESET_PATH}/icon_topic_latest.gif" alt="" /></a> <a href="{hopicsrow.U_TOPICLINK}" title="{hopicsrow.TOPICTIME} {hopicsrow.TOPICPOSTER}">{hopicsrow.TOPICTITLE}</a>({hopicsrow.TOPICREPLIES}/{hopicsrow.TOPICVIEWS})</li>
<!-- END hopicsrow -->
</ul>
<span class="corners-bottom"><span></span></span></div>
</div>
</div>
</div>[/code]
2,搜索
[code]<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->[/code]
插入下面的代码
[code]<div id="extras2">[/code]
3,搜索
[code]<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>[/code]
插入下面的代码
[code]</div>[/code]
-----------------------------------------
打开language/zh_cmn_hans/目录下的viewforum.php文件
搜索
[code]));[/code]
插入下面的代码
[code]
$lang = array_merge($lang, array(
'LATESTTOPICS1' => '论坛新帖',
'HOTESTTOPICS1' => '本周五大'
));[/code]