首页多格实现自由管理化
优化前
优化后
将下面的程序包覆盖到对应文件夹 html\portal
GBK下载
bbsindex_gbk.rar (3 K) 下载次数:164 UTF-8下载
bbsindex_utf8.rar (3 K) 下载次数:90 并可以随意变化成首页N格,如我们想实现首页6格,(也就是我们想在原来的基础上再多添加一项)修改方法如下:
(1)首先打开 :html\portal\bbsindex\main.htm
找见
- <td width="20%"><h4 class="tac h">=热门主题=</h4></td>
下面添加一列
- <td width="20%"><h4 class="tac h">=精华主题=</h4></td>
* 注意 width="20%" 要根据自己拆分成多少列来决定的,(我们现在是6列,那么每个应该是13%)
(2)找见
- <td valign="top"><pw id="热门主题@论坛首页" /></td>
下面添加
- <td valign="top"><pw id="精华主题@论坛首页" /></td>
修改好后的代码如图
(3)我们再打开html\portal\bbsindex\config.htm
找见
- <pw id="热门主题@论坛首页" />
- <table width="100%">
- <tr>
- <td width="24" valign="top"><img border="0" src="images/list.gif" width="22" height="220" align="absbottom"></td>
- <td valign="top">
- <ul class="cc" style="index1">
- <list num="10" action="subject" cachetime="1800" ifpushonly="0" title="帖子列表1" />
- <loop>
- <li style="height:22px;width:100%;overflow:hidden;display:block;line-height:22px;background:url(images/listbg.gif) no-repeat -1px bottom;"><a href="{url}" target="_blank">{title,30}</a></li>
- </loop>
- </ul>
- </td>
- </tr>
- </table>
下面添加
- <pw id="精华主题@论坛首页" />
- <table width="100%">
- <tr>
- <td width="24" valign="top"><img border="0" src="images/list.gif" width="22" height="220" align="absbottom"></td>
- <td valign="top">
- <ul class="cc" style="index1">
- <list num="10" action="subject" cachetime="1800" ifpushonly="0" title="帖子列表1" />
- <loop>
- <li style="height:22px;width:100%;overflow:hidden;display:block;line-height:22px;background:url(images/listbg.gif) no-repeat -1px bottom;"><a href="{url}" target="_blank">{title,30}</a></li>
- </loop>
- </ul>
- </td>
- </tr>
- </table>
(4),再找见
- <pw id="热门主题@论坛首页" />
- 热门主题
下面添加
- <pw id="精华主题@论坛首页" />
- 精华主题
添加后的效果为
整个实现的过程很简单吧,
使用中有有什么问题请留言,我会及时帮大家解答的