帝国cms搜索页模板关键字结果标题加红的方法
在搜索列表模板列表内容模板(list.var) (*)加上以下代码$searchid = $_GET['searchid'];$search=$empire->fetch1("select keyboard from {$dbtbpre}enewssearch where searchid=……
在搜索列表模板列表内容模板(list.var) (*)加上以下代码
$searchid = $_GET['searchid'];$search=$empire->fetch1("select keyboard from {$dbtbpre}enewssearch where searchid='$searchid' limit 1");$keyboard = $search['keyboard'];$title=str_replace($keyboard,"<font color='red'>$keyboard</font>",$r[title]);$smalltext=str_replace($keyboard,"<font color='red'>$keyboard</font>",$r[smalltext]);$listtemp='<li><a href="[!--titleurl--]" title="[!--oldtitle--]" target="_blank">'.$title.'</a><div class="media-box-note">'.$smalltext.'</div></li>';
在使用程序代码前打钩,如下图所示:
- 上一篇
帝国cms7.5版本内容页和会员中心调用是否实名认证的会员
在会员中心页面里加上以下代码即可<?php$userr=sys_ShowMemberInfo(0,'');?><?phpif($userr[isern]==1){?>已认证<?php}else{?>未认证<?php}?>
- 下一篇
帝国CMS内容上下页页码调用方法集合
帝国CMS自带的内容页上下页模板变量上一篇:[!--info.pre--]下一篇:[!--info.next--]缺点:[!--info.pre--] 和 [!--info.next--] 中封装的 <a>标签的内容无法定制灵动标签+SQL语句[e:loop={"select