Discuz板块横排显示图片的实现方法

yipeiwu_com6年前PHP代码库
到你目前在使用的模板中寻找 discuz.htm
找到这一段代码:
复制代码 代码如下:

<td width="$cat[forumcolwidth]" class="altbg2" onMouseOver="this.className='altbg1'" onMouseOut="this.className='altbg2'"> 
                                 <a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a><br> 
                                 <span class="smalltxt"><div style="float:left;width: 33%; padding-top: 6px;">{lang forum_threads}: $forum[threads]</div><div style="float:left;width: 33%; padding-top: 6px;">{lang forum_posts}: $forum[posts]</div><div style="float:left;width: 33%; padding-top: 6px;">{lang forum_todayposts}: $forum[todayposts]</div></span> 
                                 </td> 

修改为: 

复制代码 代码如下:

<td class="altbg1">$forum[folder]</td> 
                     <td width="$cat[forumcolwidth]" onMouseOver="this.className='altbg1'" onMouseOut="this.className='altbg2'"> 

                 $forum[icon]<a href="forumdisplay.php?fid=$forum[fid]"><span class="bold">$forum[name]</span></a><br> 
                 <span class="smalltxt">$forum[description]</span><br> 
                 <!--{if $forum['permission'] == 1}--> 
                 {lang private_forum} 
                 <!--{else}--> 
                         <!--{if is_array($forum['lastpost'])}--> 
                 <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="$forum[lastpost][dateline]" > 
                          {lang forum_lastpost_in}:   {$forum[lastpost][subject]}</a>   
                  {lang forum_lastpost_by}<!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--> 
                 <!--{else}--> 
                         {lang never} 
<!--{/if}--> 
<!--{/if}--></td>

相关文章

CI框架中site_url()和base_url()的区别

在使用CI框架的使用经常碰到跳转和路径方面的问题,site_url()和base_url()很容易混淆,下面来说说他们的区别! 假如你config文件里面的base_url和index_...

在项目中寻找代码的坏命名

在项目中寻找代码的坏命名

常做的和常想的事情 晦涩的if条件 1)对于||的处理                   &...

php中的Base62类(适用于数值转字符串)

Base62类源码:复制代码 代码如下:class Base62 {    private $string = "vPh7zZwA2LyU4bGq5tcVf...

深入理解PHP中mt_rand()随机数的安全

前言 在前段时间挖了不少跟mt_rand()相关的安全漏洞,基本上都是错误理解随机数用法导致的。这里又要提一下php官网manual的一个坑,看下关于mt_rand()的介绍:中文版^c...

用php实现的获取网页中的图片并保存到本地的代码

复制代码 代码如下:<?php header("Content-type:image/jpeg"); function read_url($str) { $file=fopen($...