開啟 : portal.php
找到 :
代碼: 選擇全部
//
// Generate the page
代碼: 選擇全部
$hotforum_sql="SELECT * FROM phpbb_forums ORDER BY `hot_views` DESC LIMIT 0,5";
$hotforum_result = $db->sql_query($hotforum_sql);
while (($line = mysql_fetch_array($hotforum_result)))
{
$template->assign_block_vars('hot_forum', array(
'FORUM_ID' => $line['forum_id'],
'FORUM_NAME' =>$line['forum_name'],
'FORUM_HOTVIEWS' => $line['hot_views'],
));
}
找到 : (在你順眼的地方加入)
代碼: 選擇全部
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="row2" height="25"colspan="2"><b>熱門看板</b></td>
</tr>
<!-- BEGIN hot_forum -->
<td class="row1" onMouseOver="this.style.backgroundColor='#e2e2e2'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#efefef';" align="left" valign="middle"><span class="gensmall"><a href="viewforum.php?f={hot_forum.FORUM_ID}">{hot_forum.FORUM_NAME}</a></span></td>
<td class="row1" onMouseOver="this.style.backgroundColor='#e2e2e2'; this.style.cursor='hand';" onMouseOut="this.style.backgroundColor='#efefef';" align="left" valign="middle"><span class="gensmall">{hot_forum.FORUM_HOTVIEWS}</span></td>
</tr>
<!-- END hot_forum -->
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />