分享帝国cms网站优化使tags伪静态的实现方法

   2025-07-05 admin00110

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

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

代码如下:

//显示TAGSfunction 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 href="'.$public_r[newsurl].'e/tags/?tagname='.urlencode($r[$i]).$cs.'" 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.'';$gfont2=''.$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 href="'.$public_r[newsurl].'e/tags/?tagid='.$r[tagid].$cs.'" target="_blank">'.$font1.$r[tagname].$snum.$font2.'</a>'.$br;$str.=$jg.'<a href="'.$public_r[newsurl].'e/tags/'.$r[tagid].'.html" target="_blank">'.$font1.$r[tagname].$snum.$font2.'</a>'.$br;$jg=$br?'':$showjg;}}echo $str;
 
举报收藏 0打赏 0评论 0
 
更多>同类资讯
推荐图文
推荐资讯
点击排行
网站首页  |  关于我们  |  联系方式  |  用户协议  |  隐私政策  |  版权声明  |  网站地图  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报
Powered By DESTOON