分享帝国cms网站优化使tags伪静态的实现方法 - 广告联盟评测网
  1. 广告联盟评测网 > 流量运营 >

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

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

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

代码如下:

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

这篇流量运营《分享帝国cms网站优化使tags伪静态的实现方法》,目前已阅读次,本文来源于php中文,在2024-08-21发布,该文旨在普及流量运营知识,如果你有任何疑问,请通过网站底部联系方式与我们取得联系

  • 上一篇:分享帝国CMS后台fckeditor编辑器兼容IE10的方法汇总
  • 下一篇:总结帝国CMS在反馈信息页面调用万能标签的方法