帝国cms列表页评论说说内容模板说说

内容模板评论

评论说说的实现需要把newstext转化为主表,然后模型勾选列表页能够搜索。
第一步:修改列表内容模板(list.var) (*) 
代码如下:


[!--newstext--]'.$titlepic.' [!--newstime--]评论()

第二步,修改模板,公共模板,评论js调用模板


    [!--empirenews.listtemp--]
  • [!--username--][!--pltext--][!--pltime--]
  • [!--empirenews.listtemp--]

第三步:评论时间修改,匿名文字修改成“游客”,会员取消链接

/e/data/template/  修改两个文件:pljstemp.txt pltemp.txt

增加图片,并且判断多图可以使用图片集
代码如下:
 


$titlepic='';
$morepic='';
if($r[morepic])
{
$fr=$empire->fetch1("select * from {$dbtbpre}ecms_shuoshuo where id='$r[id]'");
$rexp="\r\n";
$fexp="::::::";
$rr=explode($rexp,$fr[morepic]);
$count=count($rr);
if ($count>2){
for($i=1;$i<$count+1;$i++)
{
$frt=explode($fexp,$rr[$i-1]);
$listtemps.=('
  • '); } $titlepic.=('
      '.$listtemps.'
    '); } else if ($count>1){ for($i=1;$i<$count+1;$i++) { $frt=explode($fexp,$rr[$i-1]); $listtemps.=('
  • '); } $titlepic.=('
      '.$listtemps.'
    '); } else if ($count>0){ for($i=1;$i<$count+1;$i++) { $frt=explode($fexp,$rr[$i-1]); $listtemps.=('
  • '); } $titlepic.=('
      '.$listtemps.'
    '); } } $listtemp='
    [!--newstext--]'.$titlepic.' [!--newstime--]评论()
    ';

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用 * 标注