今天 开始使用帝国7.0,安装 了帝国CMS[官方插件]-内容页评论插件,一开始提示找不到表,后来参照论坛的里的帮助搞了,结果错误提示没有了,但调用不出来任何数据,请问高手,有成功的不!或者说我错在哪里?
第一步:
/e/extend/infocomment/index.php 82行改为 $n_r=$empire->fetch1("select * from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' limit 1"); 95行改为 $totalquery="select count(*) as total from {$dbtbpre}enewspl_".$n_r['restb']." where id='$id' and classid='$classid' and checked=0"; 103行改为 $query="select * from {$dbtbpre}enewspl_".$n_r['restb']." where id='$id' and classid='$classid' and checked=0";
/e/extend/infocomment/template/index.temp.php 27行改为 $fr=$empire->fetch1("select saytext from {$dbtbpre}enewspl_".$n_r['restb']." where plid='$r[plid]'");
第二步:
将下面的替换ajax插件的index.temp.php
<?php if(!defined('InEmpireCMS')) { exit(); } if($returnshowplnum==1)//返回总评论数显示 { echo $num."<!--empirecms.infocomment-->"; } ?> <?php $plstep=$num-$page*$line;//起始楼层 while($r=$empire->fetch($sql)) { $plusername=$r[username]; if(empty($r[username])) { $plusername='匿名'; } if($r[userid]) { $plusername="<a href='$public_r[newsurl]e/space/?userid=$r[userid]' target='_blank'>$r[username]</a>"; } //ip $sayip=ToReturnXhIp($r[sayip]); //副表 $fr=$empire->fetch1("select saytext from {$dbtbpre}enewspl_".$n_r['restb']." where plid='$r[plid]'"); $saytext=RepPltextFace(stripSlashes($fr['saytext']));//替换表情 $includelink=" onclick=\"javascript:document.saypl.saytext.value+='".$r[plid]." ';document.saypl.repid.value='".$r[plid]."';document.saypl.saytext.focus();\""; ?> <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" style="word-break:break-all; word-wrap:break-all;"> <tr> <td height="30"><span class="name">本站网友 <?=$plusername?> </span> <font color="#666666">ip: <?=$sayip?> </font></td> <td><div align="right"><font color="#666666"> <?=date("Y-m-d H:i:s",$r[saytime])?> 发表</font> [<?=$plstep?> 楼]</div></td> </tr> <tr valign="top"> <td height="50" colspan="2" class="text"> <?=$saytext?> </td> </tr> <tr> <td height="30"> </td> <td><div align="right" class="re"><a href="#tosaypl"<?=$includelink?>>回复</a> <a href="JavaScript:makeRequest('<?=$public_r[newsurl]?>e/enews/?enews=DoForPl&plid=<?=$r[plid]?>&classid=<?=$classid?>&id=<?=$id?>&dopl=1&doajax=1&ajaxarea=zcpldiv<?=$r[plid]?>','EchoReturnedText','GET','');">支持</a>[<span id="zcpldiv<?=$r[plid]?>"> <?=$r[zcnum]?> </span>] <a href="JavaScript:makeRequest('<?=$public_r[newsurl]?>e/enews/?enews=DoForPl&plid=<?=$r[plid]?>&classid=<?=$classid?>&id=<?=$id?>&dopl=0&doajax=1&ajaxarea=fdpldiv<?=$r[plid]?>','EchoReturnedText','GET','');">反对</a>[<span id="fdpldiv<?=$r[plid]?>"> <?=$r[fdnum]?> </span>] </div></td> </tr> </table> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td background="<?=$public_r[newsurl]?>skin/default/images/plhrbg.gif"></td> </tr> </table> <?php //楼层 $plstep=$plstep-1; } ?> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td><div class="epages" align="right"><?=$listpage?></div></td> </tr> </table>
|