设为首页 - 加入收藏
广告 1000x90
您的当前位置:主页 > 网站运营 > 正文

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

来源:网络分享 编辑:引流技巧 时间:2026-05-10

首页我们在后台 管理评论 添加一个自定义字段,比如 [!--kwpf--]字段,那么怎么在前台页面调用到帝国评论的自定义字段了。下面就是调用方法:

修改/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)

相关推荐:

栏目分类

微商引流技巧网 www.yinliujiqiao.com 联系QQ:1716014443 邮箱:1716014443@qq.com

Copyright © 2019-2024 强大传媒 吉ICP备19000289号-9 网站地图 rss地图

Top