某栏目名称:
<?=$class_r[ID]['classname']?>
某栏目URL:
<?=$public_r['newsurl']?><?=$class_r[ID]['classpath']?>
某栏目别名:
<?=$class_r[ID]['bname']?>
导航栏产品分类:
[showclasstemp]父栏目ID,标签模板ID,是否显示栏目信息数,显示栏目数[/showclasstemp]
[showclasstemp]1,13,0,0[/showclasstemp]
导航栏子栏目分类的标签模板13:
[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
<li><a href='[!--classurl--]'>[!--classname--]</a></li>
栏目链接[!--classurl--],栏目名称[!--classname--],栏目id[!--classid--],栏目图片[!--classimg--]
全局调用网站名称:
<?=$public_r[sitename]?>
分页导航(下拉式=列表分页模板[!--show.page--]):
[!--pagelink--] <a class="current">共[!--pagenum--]页</a>
<a class="current">首页</a> <a class="current">上一页</a> <a href="/" class="tcdNumber">下一页</a> <a href="/" class="tcdNumber">末页</a>
修改了样式:e/class/t_functions.php
列表页模板[!--show.page--]:分页导航(下拉式) 大概在10-98行;
列表页模板[!--show.listpage--]:分页导航(列表式) 在101-169行
公共语言修改:
/e/data/language/gb/pub/fun.php
如修改上一页 为 上页 或英文
自定义页面的内容首页调用(并截取字数和过滤英文符号):
一:调用自定义页面的内容,不截取字数,也不过滤符号
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=$bqr[pagetext]?>
[/e:loop]
其他说明:
自定义页面的连接:<?=$path?> 由于在数据库中显示的地址是../../ 所以我们需要使用<?=substr($bqr[path],5)?>就可以过滤掉../../
自定义页面的页面名称:<?=$bqr[pagetitle]?> 注意:这个自定义页中不是必填
自定义页面的网页标题:<?=$bqr[title]?>
如:
[e:loop={'select * from [!db.pre!]enewspage where id=5',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<a href='<?=substr($bqr[path],5)?>' class='site-nav__link'><?=$bqr[pagetitle]?></a>
[/e:loop]
二:截取字符但不过滤英文符号
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=esub($bqr[pagetext],1000)?>
[/e:loop]
三:截取字符并过滤单个英文符号为空
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=esub(str_replace("<br />"," ",$bqr[pagetext]),1000)?>
[/e:loop]
四:截取字符同时过滤多个英文符号为空
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=esub(str_replace(array('<br />','“','”','‘','’'),"",$bqr[pagetext]),1000)?>
[/e:loop]
客户案例或产品展示首页调用:
[ecmsinfo]1,6,40,0,0,15,0[/ecmsinfo]
客户案例或产品展示列表首页调用标签模板15:
页面模板内容:
[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
列表内容模板(list.var):
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6 wow fadeInUp">
<a class="cardbox" href="[!--titleurl--]">
<div class="imagebox"><img src="[!--titlepic--]"></div>
<div class="namebox"><p>[!--title--]</p></div>
</a>
</div>
列表内容模板(list.var)(没有缩略图时指定图片为缩略图,list.var中勾选 使用程序代码):
if (empty($r[titlepic])) {
$r[titlepic] = '/imagespiis/img.jpg';
}
$listtemp = '<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6 wow fadeInUp">
<a class="cardbox" href="[!--titleurl--]">
<div class="imagebox"><img src="[!--titlepic--]"></div>
<div class="namebox"><p>[!--title--]</p></div>
</a>
</div>';
灵动标签对内容页上一页、下一页的调用:
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' order by id desc limit 1",1,24,0}]
<a href='<?=$bqsr[titleurl]?>' class='btn btn-default btn-prev'>上一篇</a>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news where id>'$navinfor[id]' and classid='$navinfor[classid]' order by id limit 1",1,24,0}]
<a href='<?=$bqsr[titleurl]?>' class='btn btn-default btn-next'>下一篇</a>
[/e:loop]
说明:<?=$bqr[title]?>为标题
友情链接灵动标签调用:
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and classid=1 order by myorder',20,24,0}]
<a href="<?=$bqr[lurl]?>" title="<?=$bqr[lname]?>" target="_blank"><?=$bqr[lname]?></a>
[/e:loop]
classid=1 为友情链接分类ID,checkde=1 为审核过的链接。
如果希望不需要指定分类,则去掉 and classid=1 即可
行业解决方案首页调用:
解决方案列表首页调用标签模板16:
页面模板内容:
[ecmsinfo]2,3,32,0,0,16,0[/ecmsinfo]
[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
列表内容模板(list.var):
<div class="item">
<div class="cardbox">
<div class="imagebox"><a href="[!--titleurl--]"><img src="[!--titlepic--]"></a></div>
<div class="namebox">
<h4>[!--title--]</h4>
<p>[!--smalltext--]</p>
<a href="[!--titleurl--]">查看更多 +</a>
</div>
</div>
</div>
列表内容模板(list.var)(没有缩略图时指定图片为缩略图,list.var中勾选 使用程序代码):
if (empty($r[titlepic])) {
$r[titlepic] = '/imagespiis/img.jpg';
}
$listtemp = '<div class="item">
<div class="cardbox">
<div class="imagebox"><a href="[!--titleurl--]"><img src="[!--titlepic--]"></a></div>
<div class="namebox">
<h4>[!--title--]</h4>
<p>[!--smalltext--]</p>
<a href="[!--titleurl--]">查看更多 +</a>
</div>
</div>
</div>';
新闻资讯首页调用:
[ecmsinfo]3,6,48,0,0,17,0[/ecmsinfo]
新闻资讯列表首页调用标签模板17:
页面模板内容:
[!--empirenews.listtemp--] <div class="col-lg-6 col-md-6">
<!--list.var1-->
<!--list.var3-->
<!--list.var5-->
</div>
<div class="col-lg-6 col-md-6">
<!--list.var2-->
<!--list.var4-->
<!--list.var6-->
</div>[!--empirenews.listtemp--]
列表内容模板(list.var)(没有缩略图时指定图片为缩略图,list.var中勾选 使用程序代码):
if (empty($r[titlepic])) {
$r[titlepic] = '/imagespiis/img.png';
}
$listtemp = '<a class="row listbox cardbox wow fadeInLeft" href="[!--titleurl--]">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-5">
<div class="list-imagebox"><img src="[!--titlepic--]"></div>
</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-7">
<div class="list-article">
<h4 class="new-title">[!--title--]</h4>
<p class="new-text">[!--smalltext--]</p>
</div>
</div>
</a>';
正文自动截取缩略图和本地保存图片:
后台-系统设置-数据表管理-管理字段-修改 newstext 字段:
取第 <input name="getfirsttitlepic" type="text" id="getfirsttitlepic" value="1" size="1"> 张上传图为标题图片
说明:value="几" 就是第几张,一般写1
同理 远程保存图片 也是这样设置,去找相对于的代码设置,增加checked:
<input name="copyimg" type="checkbox" id="copyimg" value="1" checked>
帝国CMS留言提交后的返回页面的修改方法:
帝国CMS的留言提交后默认返回的是一个动态的留言地址,有时候我们在静态页面引用这个留言表单之后,就需要返回到一个静态的页面,那么该如何修改呢?
只需要在留言的表单中加入如下所示的代码即可:
<input type="hidden" name="ecmsfrom" value="返回地址路径">
value="返回地址路径"的返回地址的路径即是我们做需要的设置的路径,添加后就能够返回到我们需要的一个页面了。
这个代码对对于留言板和信息反馈都是同样的适用,是非常有效的。
想要返回上一页(刚才提交留言的页面)的话,可以添加下面的代码:<input type="hidden" name="ecmsfrom" value="9">
<?=$class_r[ID]['classname']?>
某栏目URL:
<?=$public_r['newsurl']?><?=$class_r[ID]['classpath']?>
某栏目别名:
<?=$class_r[ID]['bname']?>
导航栏产品分类:
[showclasstemp]父栏目ID,标签模板ID,是否显示栏目信息数,显示栏目数[/showclasstemp]
[showclasstemp]1,13,0,0[/showclasstemp]
导航栏子栏目分类的标签模板13:
[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
<li><a href='[!--classurl--]'>[!--classname--]</a></li>
栏目链接[!--classurl--],栏目名称[!--classname--],栏目id[!--classid--],栏目图片[!--classimg--]
全局调用网站名称:
<?=$public_r[sitename]?>
分页导航(下拉式=列表分页模板[!--show.page--]):
[!--pagelink--] <a class="current">共[!--pagenum--]页</a>
<a class="current">首页</a> <a class="current">上一页</a> <a href="/" class="tcdNumber">下一页</a> <a href="/" class="tcdNumber">末页</a>
修改了样式:e/class/t_functions.php
列表页模板[!--show.page--]:分页导航(下拉式) 大概在10-98行;
列表页模板[!--show.listpage--]:分页导航(列表式) 在101-169行
公共语言修改:
/e/data/language/gb/pub/fun.php
如修改上一页 为 上页 或英文
自定义页面的内容首页调用(并截取字数和过滤英文符号):
一:调用自定义页面的内容,不截取字数,也不过滤符号
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=$bqr[pagetext]?>
[/e:loop]
其他说明:
自定义页面的连接:<?=$path?> 由于在数据库中显示的地址是../../ 所以我们需要使用<?=substr($bqr[path],5)?>就可以过滤掉../../
自定义页面的页面名称:<?=$bqr[pagetitle]?> 注意:这个自定义页中不是必填
自定义页面的网页标题:<?=$bqr[title]?>
如:
[e:loop={'select * from [!db.pre!]enewspage where id=5',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<a href='<?=substr($bqr[path],5)?>' class='site-nav__link'><?=$bqr[pagetitle]?></a>
[/e:loop]
二:截取字符但不过滤英文符号
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=esub($bqr[pagetext],1000)?>
[/e:loop]
三:截取字符并过滤单个英文符号为空
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=esub(str_replace("<br />"," ",$bqr[pagetext]),1000)?>
[/e:loop]
四:截取字符同时过滤多个英文符号为空
[e:loop={'select * from [!db.pre!]enewspage where id=8',20,24,0}]
<?php
$pageurl=$public_r['newsurl'].str_replace('../../','',$bqr['path']);
?>
<?=esub(str_replace(array('<br />','“','”','‘','’'),"",$bqr[pagetext]),1000)?>
[/e:loop]
客户案例或产品展示首页调用:
[ecmsinfo]1,6,40,0,0,15,0[/ecmsinfo]
客户案例或产品展示列表首页调用标签模板15:
页面模板内容:
[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
列表内容模板(list.var):
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6 wow fadeInUp">
<a class="cardbox" href="[!--titleurl--]">
<div class="imagebox"><img src="[!--titlepic--]"></div>
<div class="namebox"><p>[!--title--]</p></div>
</a>
</div>
列表内容模板(list.var)(没有缩略图时指定图片为缩略图,list.var中勾选 使用程序代码):
if (empty($r[titlepic])) {
$r[titlepic] = '/imagespiis/img.jpg';
}
$listtemp = '<div class="col-lg-4 col-md-4 col-sm-6 col-xs-6 wow fadeInUp">
<a class="cardbox" href="[!--titleurl--]">
<div class="imagebox"><img src="[!--titlepic--]"></div>
<div class="namebox"><p>[!--title--]</p></div>
</a>
</div>';
灵动标签对内容页上一页、下一页的调用:
[e:loop={"select * from [!db.pre!]ecms_news where id<'$navinfor[id]' and classid='$navinfor[classid]' order by id desc limit 1",1,24,0}]
<a href='<?=$bqsr[titleurl]?>' class='btn btn-default btn-prev'>上一篇</a>
[/e:loop]
[e:loop={"select * from [!db.pre!]ecms_news where id>'$navinfor[id]' and classid='$navinfor[classid]' order by id limit 1",1,24,0}]
<a href='<?=$bqsr[titleurl]?>' class='btn btn-default btn-next'>下一篇</a>
[/e:loop]
说明:<?=$bqr[title]?>为标题
友情链接灵动标签调用:
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and classid=1 order by myorder',20,24,0}]
<a href="<?=$bqr[lurl]?>" title="<?=$bqr[lname]?>" target="_blank"><?=$bqr[lname]?></a>
[/e:loop]
classid=1 为友情链接分类ID,checkde=1 为审核过的链接。
如果希望不需要指定分类,则去掉 and classid=1 即可
行业解决方案首页调用:
解决方案列表首页调用标签模板16:
页面模板内容:
[ecmsinfo]2,3,32,0,0,16,0[/ecmsinfo]
[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--]
列表内容模板(list.var):
<div class="item">
<div class="cardbox">
<div class="imagebox"><a href="[!--titleurl--]"><img src="[!--titlepic--]"></a></div>
<div class="namebox">
<h4>[!--title--]</h4>
<p>[!--smalltext--]</p>
<a href="[!--titleurl--]">查看更多 +</a>
</div>
</div>
</div>
列表内容模板(list.var)(没有缩略图时指定图片为缩略图,list.var中勾选 使用程序代码):
if (empty($r[titlepic])) {
$r[titlepic] = '/imagespiis/img.jpg';
}
$listtemp = '<div class="item">
<div class="cardbox">
<div class="imagebox"><a href="[!--titleurl--]"><img src="[!--titlepic--]"></a></div>
<div class="namebox">
<h4>[!--title--]</h4>
<p>[!--smalltext--]</p>
<a href="[!--titleurl--]">查看更多 +</a>
</div>
</div>
</div>';
新闻资讯首页调用:
[ecmsinfo]3,6,48,0,0,17,0[/ecmsinfo]
新闻资讯列表首页调用标签模板17:
页面模板内容:
[!--empirenews.listtemp--] <div class="col-lg-6 col-md-6">
<!--list.var1-->
<!--list.var3-->
<!--list.var5-->
</div>
<div class="col-lg-6 col-md-6">
<!--list.var2-->
<!--list.var4-->
<!--list.var6-->
</div>[!--empirenews.listtemp--]
列表内容模板(list.var)(没有缩略图时指定图片为缩略图,list.var中勾选 使用程序代码):
if (empty($r[titlepic])) {
$r[titlepic] = '/imagespiis/img.png';
}
$listtemp = '<a class="row listbox cardbox wow fadeInLeft" href="[!--titleurl--]">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-5">
<div class="list-imagebox"><img src="[!--titlepic--]"></div>
</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-7">
<div class="list-article">
<h4 class="new-title">[!--title--]</h4>
<p class="new-text">[!--smalltext--]</p>
</div>
</div>
</a>';
正文自动截取缩略图和本地保存图片:
后台-系统设置-数据表管理-管理字段-修改 newstext 字段:
取第 <input name="getfirsttitlepic" type="text" id="getfirsttitlepic" value="1" size="1"> 张上传图为标题图片
说明:value="几" 就是第几张,一般写1
同理 远程保存图片 也是这样设置,去找相对于的代码设置,增加checked:
<input name="copyimg" type="checkbox" id="copyimg" value="1" checked>
帝国CMS留言提交后的返回页面的修改方法:
帝国CMS的留言提交后默认返回的是一个动态的留言地址,有时候我们在静态页面引用这个留言表单之后,就需要返回到一个静态的页面,那么该如何修改呢?
只需要在留言的表单中加入如下所示的代码即可:
<input type="hidden" name="ecmsfrom" value="返回地址路径">
value="返回地址路径"的返回地址的路径即是我们做需要的设置的路径,添加后就能够返回到我们需要的一个页面了。
这个代码对对于留言板和信息反馈都是同样的适用,是非常有效的。
想要返回上一页(刚才提交留言的页面)的话,可以添加下面的代码:<input type="hidden" name="ecmsfrom" value="9">
文章来源:
网络小编D
版权声明:
本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站立刻删除。
