帝国cms网站优化使tags伪静态的实现


本文整理自网络,侵删。

帝国cms网站优化值tags伪静态的实现步骤如下:

1.修改e/class/t_functions.php中的sys_eShowTags函数


代码如下:
//显示TAGS
function sys_eShowTags($cid,$num=0,$line=0,$order='',$isgood='',$isgoodshow='',$showjg='',$shownum=0,$cs=''){
global $empire,$dbtbpre,$public_r,$navinfor;
$str='';
if(empty($showjg))
{
$showjg='   ';
}
$ln=0;
if($cid=='selfinfo')
{
if(empty($navinfor['infotags']))
{
return '';
}
$jg='';
$r=explode(',',$navinfor['infotags']);
$count=count($r);
for($i=0;$i<$count;$i++)
{
$ln++;
$br='';
if($line)
{
if($ln%$line==0)
{
$br='
';
}
}
$str.=$jg.'<a target="_blank">'.$r[$i].'</a>'.$br;
$jg=$br?'':$showjg;
}
}
else
{
$and='';
$where='';
if($cid)
{
$where=strstr($cid,',')?"cid in ($cid)":"cid='$cid'";
$and=' and ';
}
if($isgood)
{
$where.=$and.'isgood=1';
}
if($where)
{
$where=' where '.$where;
}
$order=$order?' '.$order:' tagid desc';
$limit='';
if($num)
{
$limit=' limit '.$num;
}
//推荐标红
$gfont1='';
$gfont2='';
if($isgoodshow)
{
if(strstr($isgoodshow,'r'))
{
$gfont1='<font color="red">';
$gfont2='</font>';
}
if(strstr($isgoodshow,'s'))
{
$gfont1=$gfont1.'<b>';
$gfont2='</b>'.$gfont2;
}
}
$jg='';
$snum='';
$sql=$empire->query("select tagid,tagname,num,isgood from {$dbtbpre}enewstags".$where." order by".$order.$limit);
while($r=$empire->fetch($sql))
{
if($shownum)
{
$snum='('.$r[num].')';
}
$font1='';
$font2='';
if($isgoodshow&&$r[isgood])
{
$font1=$gfont1;
$font2=$gfont2;
}
$ln++;
$br='';
if($line)
{
if($ln%$line==0)
{
$br='
';
}
}
//$str.=$jg.'<a target="_blank">'.$font1.$r[tagname].$snum.$font2.'</a>'.$br;
$str.=$jg.'<a target="_blank">'.$font1.$r[tagname].$snum.$font2.'</a>'.$br;
$jg=$br?'':$showjg;
}
}
echo $str;
}

阅读剩余部分

相关阅读 >>

帝国CMS7.5使用tagsid实现伪静态调用方法

帝国CMS实现用户自定义标签函数输出图片集大小图的方法

帝国CMS后台启用session验证增加安全性

bootstrap table支持高度百分比的实例代码

帝国CMS商城系统实现在线支付后发送订单邮件提醒功能

帝国CMS 搜索关键字调用标签(showsearch)使用说明

帝国CMS运行环境和帝国CMS安装图文教程

fateextella阿提拉阵营人物伊斯坎达尔图鉴及资料介绍

帝国CMS 刷新数据表news 比较卡的解决方法

帝国CMS 解决后台登录次数不得超过5次限制的方法

更多相关阅读请进入《帝国CMS》频道 >>



打赏

取消

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

扫码支持
扫码打赏,您说多少就多少

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

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...