帝国CMS评论自定义字段调用方法

  帝国CMS评论自定义字段调用方法

  在帝国CMS评论自定义了几个字段,比如 [!–kwpf–]字段,那么怎么在前台页面调用到帝国评论的自定义字段了。

  帝国CMS评论自定义字段调用教程修改/e/class/t_functions.php

  1、搜索:function
sys_ShowPlInfo($line,$tempid,$classid=0,$id=0,$isgood=0,$enews=0)。
源文件未修改的话大概在2016行

  找到:

$sql=$empire->query("select plid,userid,username,saytime,id,classid,zcnum,fdnum,saytext from {$dbtbpre}enewspl_".$public_r['pldeftb']." where checked=0".$a." order by ".$order." limit ".$line);

  改成:$sql=$empire->query("select * from
{$dbtbpre}enewspl_".$public_r['pldeftb']." where checked=0".$a." order by

  ".$order." limit ".$line);

  或改成:

$sql=$empire->query("select plid,userid,username,saytime,id,classid,zcnum,fdnum,saytext,kwpf from {$dbtbpre}enewspl_".$public_r['pldeftb']." where checked=0".$a." order by ".$order." limit ".$line);

  2、搜索:function
ReplaceShowPlVars($no,$listtemp,$r,$formatdate,$subnews=0)

  找到:$listtemp=str_replace("[!–fdnum–]",$r['fdnum'],$listtemp);

  在其下面增加一行:

$listtemp=str_replace("[!--kwpf--]",$r['kwpf'],$listtemp)

© 版权声明
THE END
喜欢就支持以下吧
点赞0赞赏
分享
相关推荐
  • 暂无相关文章
评论 抢沙发