优晟SEO

您现在的位置是:首页 > CMS教程 > 帝国cms > 正文

帝国cms

帝国cms调用信息按收藏数排序SQL

帝国   收藏   信息  
佚名 2024-08-26帝国cms
整理了下我的修改步骤(实现留言板增加qq、留言主题字段)要改的文件有:eenewsgbookfun.phpeoolgbookindex.phpeadminoolgbook.phpeadminoolReGbook.phpedataemplategbooktemp.txteclassfunctions.php1、进入phpmyadmin后……

帝国cms调用信息按收藏数排序SQL

整理了下我的修改步骤(实现留言板增加qq、留言主题字段)

要改的文件有:eenewsgbookfun.phpeoolgbookindex.phpeadminoolgbook.phpeadminoolReGbook.phpedataemplategbooktemp.txteclassfunctions.php

1、进入phpmyadmin后台,在数据库enewsgbook表(留言板数据表)中增加字段,比如: qq、theme,2、打开eenewsgbookfun.php,1、在13行左右的地方插入下面代码:

$theme=RepPostStr($add[theme]);//myadd$qq=RepPostStr($add[qq]);//myadd

2、在60行左右找到 $empire->query("insert into 的语句中的相应的位置加入相应的代码。3、打开eoolgbookindex.php,1、在51行左右找到“$query="select …”查询语句中适当位置加入字段,如:,theme,qq2、在135行左右找到“发布者: <?=$r[name]?>……”, 在要显示字段的地方加入<?=$r[theme]?> ,<?=$r[qq]?> 调用显示就行了。3、在170行左右找到“

公司名称:性别: 先生

4、后台:打开eadminoolgbook.php,在50行左右找到“$query="select”查询语句,在末尾加入字段:,theme,qq在119行左右的找到“

发布者:……”, 在要显示字段的地方加入“<?=$r[theme]?> ,<?=$r[qq]?>调用显示就行了。5、后台回复页面:打开eadminoolReGbook.php直接在页面加入<?=$r[theme]?> ,<?=$r[qq]?>就行了。如在51行左右的“留言发表者”该行下面插入两行代码:

QQ:<?=$r[qq]?>留言主题:<?=$r[theme]?>

6、到此前、后台都已经可以了,下面进一步修改:1、打开e/data/template/gbooktemp.txt文件,约51行找到“$query="select…”查询语句,在适当位置加入字段,如:,theme,qq2、打开e/class/functions.php文件,约2940行找到:“$listtemp_center=str_replace("[!--retext--]","<?=$r[retext]?>",$listtemp_center);”,在改行下面插入相应写法的代码,如:

$listtemp_center=str_replace("[!--theme--]","<?=$r[theme]?>",$listtemp_center);$listtemp_center=str_replace("[!--qq--]","<?=$r[qq]?>",$listtemp_center);

3、修改下留言板模板就oK了。