主页我们在管理后台评价加上一个自定字段名,例如[!--kwpf--]字段名,那麼怎样在前台接待网页页面启用到王国评价的自定字段名了。下边便是启用方式:
改动/e/class/t_functions.php
1、检索:functionsys_ShowPlInfo($line,$tempid,$classid=0,$id=0,$isgood=0,$enews=0)。源代码未修改得话大约在2016行
寻找:
1 | $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 ); |
改为
1 | $sql = $empire ->query( "select * from {$dbtbpre}enewspl_" . $public_r [ 'pldeftb' ]. " where checked=0" . $a . " order by " . $order . " limit " . $line ); |
或是改为
1 | $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、检索:functionReplaceShowPlVars($no,$listtemp,$r,$formatdate,$subnews=0)
寻找:$listtemp=str_replace("[!--fdnum--]",$r['fdnum'],$listtemp);
在其下边提升一行:
1 | $listtemp = str_replace ( "[!--kwpf--]" , $r [ 'kwpf' ], $listtemp ) |