帝国CMS7.5搜索页面模板不支持灵动标签和万能标签的解决方法
1,打开 /e/search/result/index.php 文件
查找
require("../../class/connect.php");require("../../class/db_sql.php");require("../../data/dbcache/class.php");require("../../class/q_functions.php");require "../".LoadLang("pub/fun.php");
修改为:
require('../../class/connect.php');require('../../class/db_sql.php');require('../../class/functions.php');require('../../class/t_functions.php');require('../../data/dbcache/class.php');require "../".LoadLang("pub/fun.php");
2,再查找
//替换公共模板变量$listtemp=$tempr[temptext];
在上面添加如下代码
//新增支持灵动标签和万能标签$tempr[temptext]=DtNewsBq('list'.$tempid,$tempr[temptext],0);
修改完成,这样就可以在搜索模板中灵活使用帝国CMS强大的灵动和万能标签了
定要刷新一下:清除临时文件和数据
- 上一篇
帝国CMS首页调用会员数/留言数/评论数的方法
其实就是用SQL语句的count来统计数据表里面的信息数,具体代码如下:(直接模板里用PHP输出即可)会员数量:<?=$empire->gettotal("select count(*) as total from phome_enewsmember");?>留言数量:<?=$empire->gettotal("selec
- 下一篇
帝国cms灵动标签常用的变量
[e:loop={栏目ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}]<?=$bqno?><a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a>(<?=date('Y-m-d',$bqr[newstime])?>)[/e:l