修改templates/default/forumdisplay_subforum.htm模版,将forumdisplay_subforum模版全选后替换成如下内容:
{eval $count=4;}
{eval $wid=’25%’;}
{eval $incompact=array(52);}
<!–{if in_array($forum[fid],$incompact)}–>
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
<tr><td colspan="$count" class="header"><table cellspacing="0" cellpadding="0" width="100%">
<tr class="smalltxt"><td class="bold"><a href="forumdisplay.php?fid=$forum[fid]">$forum[name]</a> 子论坛列表</td><td align="right"><a href="###" onclick="toggle_collapse(’category_$forum[fid]’);"><img id="category_$forum[fid]_img" src="{IMGDIR}/collapsed_no.gif" border="0"></a></td></tr></table></td></tr>
<tbody id="category_$forum[fid]" style="$collapserules">
<tr class="altbg2">{eval $fcount = $count;}
<!–{else}–>
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="{TABLEWIDTH}" align="center" class="tableborder">
<tr class="header" align="center">
<td width="5%"> </td>
<td width="51%">{lang forum_name}</td>
<td width="5%">{lang forum_threads}</td>
<td width="5%">{lang forum_posts}</td>
<td width="5%">{lang forum_todayposts}</td>
<td width="13%">{lang forum_lastpost}</td>
<td width="16%">{lang forum_moderators}</td>
</tr>
<!–{/if}–><!–{loop $sublist $sub}–>
<!–{if $sub[’permission’]}–><!–{if in_array($sub[fup],$incompact)}–> {eval $fcount–;}
<!–{if $fcount == -1}–></tr><tr class="altbg2">{eval $fcount = $count-1;}<!–{/if}–>
<td width="$wid" class="altbg2" align="left" onMouseOver ="this.style.backgroundColor=’{ALTBG1}’" onMouseOut ="this.style.backgroundColor=’{ALTBG2}’">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="left" width="40">$sub[folder]</td>
<td align="left" style="word-break: keep-all"><a href="forumdisplay.php?fid=$sub[fid]" title="$sub[description]"><span class="bold">$sub[name]</span></a>
<br><a title="{lang forum_lastpost}: $sub[lastpost][subject] 最后回复: $sub[lastpost][dateline]">{lang forum_threads}: $sub[threads] {lang forum_posts}: $sub[posts] {lang forum_todayposts}:$sub[todayposts]</a>
<br><SPAN class=smalltxt>{lang forum_moderators}: </SPAN>$sub[moderators]</td></tr>
</table></td>
<!–{else}–>
<tr><td class="altbg1" align="center">$sub[folder]</td>
<td class="altbg2" align="left" onMouseOver="this.className=’altbg1′" onMouseOut="this.className=’altbg2′">
$sub[icon] <a href="forumdisplay.php?fid=$sub[fid]"><span class="bold">$sub[name]</span></a>
<br><span class="smalltxt">$sub[description]</span></td>
<td class="altbg1" align="center">$sub[threads]</td>
<td class="altbg2" align="center">$sub[posts]</td>
<td class="altbg2" align="center">$sub[todayposts]</td>
<!–{if $sub[’permission’] == 1}–>
<td class="altbg1" align="center"><span class="smalltxt">{lang private_forum}</span></td>
<!–{else}–>
<!–{if is_array($sub[’lastpost’])}–>
<td class="altbg1"><table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td align="right" class="smalltxt" title="{lang forum_lastpost_in}: $sub[lastpost][subject]" nowrap>
$sub[lastpost][dateline] <br>{lang forum_lastpost_by} <!–{if $sub[’lastpost’][’author’]}–>$sub[’lastpost’][’author’]<!–{else}–>{lang guest}<!–{/if}–></td>
<td nowrap> <a href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"><img src="{IMGDIR}/lastpost.gif" border="0"></a></td>
</tr></table></td>
<!–{else}–>
<td class="altbg1" align="center"><span class="smalltxt">{lang never}</span></td>
<!–{/if}–>
<!–{/if}–>
<td class="altbg2" align="center" style="word-break: keep-all">$sub[moderators]</td>
</tr>
<!–{/if}–>
<!–{/if}–>
<!–{/loop}–>
<!–{if $fcount}–><td colspan="$fcount" bgcolor="{ALTBG2}"> </td><!–{/if}–>
</tr></tbody></table><br>
需要设置的参数分别为:
{eval $count=4;} //横版(表格)个数
{eval $wid=’25%’;} //对应每个横版(表格)的宽度
{eval $incompact=array(52);} //要以非标准方式(紧凑方式)显示的父论坛id(这个要填的ID是父论坛的$fid,而不是子论坛,多个需要紧凑排列的父论坛ID用,隔开)
将Discuz的子论坛设置成横版紧凑排列方式
上一篇:PHP 4.1.0 的 php.ini 的全文翻译
下一篇:DreamHost优惠码
- Discuz论坛防止机器人注册的方法
- 服务器支持易采需要开启iconv函数
- Windows服务器不支持WordPress插件WP-Cache的解决方法
- AV终结者病毒可关闭防火墙
- PHP5的php.ini文件在PHP的安装目录下
- 做垃圾站每天收入100刀其实很容易
- 58.61.164.*IP段是腾讯SOSO的爬虫
- 谁能在两年之间平均每小时赚近100万美元
- 一个提供VB优化服务的站点
- 伊莱克斯石靖
- Google、FireFox之死!流氓推广的恶果?
- 关于最近 Google Adsense 价格持续走低的原因
- 每天1万美元是这样赚来的
- 股票基本名词术语
- Discuz论坛防止暴力营销等发帖软件注册的方法
- Google天价收购YouTube
- 巴菲特的投资理念
- 托福网考GMAT因海底光缆受损暂停报名
- Google AdSense 西联汇款被取消了
- zanox