您的位置:首页 > 技术分享 > 帝国CMS

帝国cms 动态留言页,搜索页支持标签调用方法

admin2021-03-31 11:26:08次浏览

留言模板支持动态标签调用的方法


由于帝国cms的留言板是动态页面,不支持万能标签、灵动标签等等一些标签。帝国cms 动态留言页面支持标签调用方法如下
 

一、查找e/class/functions.php这个文件里面的这段代码:
$gbtemp=str_replace("",$listtemp_r[2],$gbtemp);

 

增加下面两句代码:
$gbtemp=DoRepEcmsLoopBq($gbtemp);
$gbtemp=RepBq($gbtemp);

 

二、再打开e/data/template/gbooktemp.txt文件

在头部require("../../class/connect.php");这串代码后面添加下面两串代码:

require("../../class/t_functions.php");
require("../../data/dbcache/class.php");


最后更新一下,标签就可以生效了!
 

搜索模板支持动态标签调用的方法

 

打开 /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");

找到
//替换公共模板变量
$listtemp=$tempr[temptext];

在其上边添加以下代码
//页面支持标签
$tempr[temptext]=DtNewsBq('list'.$tempid,$tempr[temptext],0);
 


Tags:个人博客  网站

取消

感谢您的支持,我会继续努力!

扫码支持
扫码打赏,建议金额1-10元

打开支付宝扫一扫,即可进行扫码打赏哦

随机图文

文章评论