帝国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;
}

阅读剩余部分

相关阅读 >>

火车头wordpress2.9.2,3.0.1免登陆发布接口

帝国CMS列表式分页导航样式修改示例

帝国CMS首页调用内容页下载地址的方法

帝国CMSv4.6功能介绍之内容存文本

帝国CMS整合discuz的多种方法详细介绍

帝国CMS7.5编辑器换行替换为p标记,如何将标签br换成p标签

帝国CMS下在php文件中调用数据库类执行sql语句实例

帝国CMS调用自定义列表名称的方法(简单二次开发实现)

帝国CMS简单实现国-省-市联动菜单的方法

通过syntaxhighlight实现帝国CMS代码高亮语法高亮(二) 在编辑器中加载

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



打赏

取消

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

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

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

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

评论

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