一,内容模板,过滤smalltext简介中的空格、换行:(同理也可以过滤title,过滤标题等)
<?
$qian=array(" "," ","\t","\n","\r");
$hou=array("","","","","");
$smalltext=str_replace($qian,$hou,$navinfor[smalltext]);
echo $smalltext;
?>
二,列表模板过滤smalltext简介中的空格、换行:
1,列表内容模板(list.var)右侧,勾选“使用程序代码”
2,采用以下代码:
$r[smalltext]=str_replace(array("\r\n"," "," ", "\r", "\n", "<br />", "</p>"),"",str_replace("<p>","",$r[smalltext]));
$listtemp='<li>
<p><a href="[!--titleurl--]" target="_blank">[!--title--]</a><span>[!--newstime--]</span></p>
<p>[!--smalltext--]</p>
</li>';