建站教学网,让你建站更便捷和轻松!QQ交流群:78085540
您当前的位置:首页 > CMS建站

帝国CMS列表模板过滤简介字段里面的空格方法

来源:  时间:2017-10-21 16:21:22

 $qian=array(" "," ","t","n","r");

$hou=array("","","","","");
$smalltext=str_replace($qian,$hou,$r[smalltext]);
 
 
 
$titlepic=$r[titlepic];
if($titlepic=='')
{
$listtemp='<div class="xwt">
<div class="xwt_a"><a href="http://www.jzread.com/cms/2017-10-21/3658.html" target="_blank">[!--title--]</a></div>
<div class="xwt_b">'.$smalltext.' ... <a href="http://www.jzread.com/cms/2017-10-21/3658.html" target="_blank">[更多详细]</a></div>
<div class="xwt_c"><p class="p1">所属分类:<a href="[!--this.classlink--]">[!--this.classname--]</a></p><p class="p1">发布时间:[!--newstime--]</p></div>
<div class="blank15"></div>
</div>';
}
else
{
$listtemp='<div class="xwt">
<div class="xwt_a"><a href="http://www.jzread.com/cms/2017-10-21/3658.html" target="_blank">[!--title--]</a></div>
<div class="xwt_left"><a href="http://www.jzread.com/cms/2017-10-21/3658.html" target="_blank"><img src="[!--titlepic--]"></a></div>
<div class="xwt_right">
<div class="xwt_right_a">'.$smalltext.'...<a href="http://www.jzread.com/cms/2017-10-21/3658.html" target="_blank">[更多详细]</a></div>
<div class="xwt_right_b"><p class="p1">所属分类:<a href="[!--this.classlink--]">[!--this.classname--]</a></p><p class="p1">发布时间:[!--newstime--]</p></div>
</div>
<div class="blank15"></div>
</div>';
}

责任编辑:

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
CopyRight 2008-2009, JZREAD.COM, Inc. All Rights Reserved 联系QQ:568245346
皖ICP备09015033号