1、在数据库的前缀名_enewsgbook表中添加您要显示的字段,比如我要加标题"gtitle"字段,可以用工具添加,也可以执行sql添加:ALTER TABLE 前缀名_enewsgbook ADD gtitle VARCHAR(100);
 
2、修改e/enews/gbookfun.php,第11行左右:
 
 $name=RepPostStr(trim($add[name]));
        $email=RepPostStr($add[email]);
        $call=RepPostStr($add[call]);
        $lytext=RepPostStr($add[lytext]);
        $gtitle=RepPostStr(trim($add[gtitle]));  //增加的gtitle
        if(emptyempty($bid)||emptyempty($gtitle)||emptyempty($name)||emptyempty($email)||!trim
($lytext))  //gtitle字段检测不允许为空
第56行左右:
 
$sql=$empire->query("insert into {$dbtbpre}enewsgbook(name,gtitle,email,`call`,lytime,lytext,retext,bid,ip,checked,userid,username) values('$name','$gtitle','$email','$call','$lytime','$lytext','','$bid','$ip','$br[checked]','$userid','$username');"); //插入字段记录
3、修改e/data/template/gbooktemp.txt,第50行左右:
 
$query="select lyid,name,gtitle,email,`call`,lytime,lytext,retext from {$dbtbpre}enewsgbook where bid='$bid' and checked=0";   //查询字段中添加gtitle
4、修改e/class/t_functions.php,第2106行左右:
 
$listtemp=str_replace("[!--lyid--]",$r['lyid'],$listtemp);//id
    $listtemp=str_replace("[!--lytext--]",nl2br($r['lytext']),$listtemp);//留言内容
    $listtemp=str_replace("[!--retext--]",nl2br($r['retext']),$listtemp);//回复
    $listtemp=str_replace("[!--lytime--]",format_datetime($r['lytime'],$formatdate),$listtemp);
    $listtemp=str_replace("[!--name--]",$r['name'],$listtemp);
    $listtemp=str_replace("[!--gtitle--]",$r['gtitle'],$listtemp);
5、修改e/class/functions.php,第2934行左右添加
 
$listtemp_center=str_replace("[!--lyid--]","

帝国CMS-留言板加字段和验证码

dawei

【声明】:邵阳站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。