帝国cms网站优化值tags伪静态的实现步骤如下:
1.修改e/class e/class/t_functions.php中的sys_eShowTags函数
代码如下:
//显示标签
函数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 = # 39amp;#39;;
}
$ ln = 0;
if($ cid = = # 39;selfinfo # 39)
{
if(empty($ navinfor[# 39;信息标签# 39;]))
{
返回# 39;#39;;
}
$ jg = # 39#39;;
$ r = explode(# 39;,#39;,$ navinfor[# 39;信息标签# 39;]);
$ count = count($ r);
for($ I = 0;$ ilt$ count$i++)
{
$ ln++;
$ br = # 39#39;;
if(行)
{
if($ln%$line==0)
{
$ br = # 39
#39;;
}
}
$str。=$jg。#39;lt;a href = quot#39;。$public_r[newsurl]。#39;e/tags/?tagname = # 39。urlencode($r[$i])。$cs。#39;quottarget = quot_ blankquotgt;#39;。$r[$i]。#39;lt;/AGT;#39;
。$ br
$jg=$br?#39;#39;:$ showjg
}
}
其他
{
$ and = # 39#39;;
$ where = # 39#39;;
中频(cid)
{
$where=strstr($cid,# 39;,#39;)?quotcid in($ cid)quot;:quotcid = # 39$ cid # 39quot;
$ and = # 39和# 39;;
}
如果($isgood)
{
$哪里。= $和。#39;isgood = 1 # 39;
}
如果($在哪里)
{
$ where = # 39其中# 39;。$ where
}
$order=$order?#39;#39;。$订单:# 39;塔吉德·desc # 39;;
$ limit = # 39#39;;
如果($num)
{
$ limit = # 39限制# 39;。$ num
}
//推荐标准红色
$ gfont1 = # 39#39;;
$ gfont2 = # 39#39;;
if($isgoodshow)
{
if(strstr($isgoodshow,# 39;r # 39))
{
$ gfont1 = # 39lt;font color = quotredquotgt;#39;;
$ gfont2 = # 39lt;/fontgt。#39;;
}
if(strstr($isgoodshow,# 39;s # 39))
{
$gfont1=$gfont1。#39;#39;;
$ gfont2 = # 39#39;。$ gfont2
}
}
$ jg = # 39#39;;
$ snum = # 39#39;;
$ SQL = $ empire -gt;查询(quotselect tagid,tagname,num,is good from { $ dbtbpre } enewstagsquot;。$ where.quot排序依据quot;。$订单。
$限额);
while($ r = $ empire -gt;fetch($sql))
{
if($shownum)
{
$ snum = # 39(#39;。$r[num]。#39;)#39;;
}
$ font1 = # 39#39;;
$ font2 = # 39#39;;
if($ isgoodshoamp;amp$r[isgood])
{
$ font1 = $ gfont1
$ font2 = $ gfont2
}
$ ln++;
$ br = # 39#39;;
if(行)
{
if($ln%$line==0)
{
$ br = # 39
#39;;
}
}
//$str。=$jg。#39;lt;a href = quot#39;。$public_r[newsurl]。#39;e/tags/?tagid = # 39。$r[tagid]。$cs。#39;quottarget = quot_ blankquotgt;#39;。$font1。$ r[标记名]。
$snum。$font2。#39;lt;/AGT;#39;。$ br
$str。=$jg。#39;lt;a href = quot#39;。$public_r[newsurl]。#39;e/tags/# 39;。$r[tagid]。#39;。htmlquottarget = quot_ blankquotgt;#39;。$font1。$ r[标记名]。$snum。
$font2。#39;lt;/AGT;#39;。$ br
$jg=$br?#39;#39;:$ showjg
}
}
echo $ str登录后复制
