第一步、打开/e/class/connect.php文件,找到
//返回TAGS列表伪静态
function eReturnRewriteTagsUrl
此函数整个修改为:
//返回TAGS列表伪静态
function eReturnRewriteTagsUrl($tagid,$tagname,$ecms=0){
global $public_r,$empire,$dbtbpre;
if(!$tagid){
$tagname=RepPostVar($tagname);
if(!$tagname){
$r['pageurl']=$public_r['newsurl'];
$r['rewrite']=0;
return $r;
}
$tagr=$empire->fetch1("select tagid,num from {$dbtbpre}enewstags where tagname='$tagname' limit 1");
if(!$tagr['tagid']){
$r['pageurl']=$public_r['newsurl'];
$r['rewrite']=0;
return $r;
}
$tagid=$tagr['tagid'];
}
if(empty($public_r['rewritetags'])){
$r['pageurl']=$public_r['newsurl']."e/tags/?tagid=".$tagid;
$r['rewrite']=0;
}else{
if($ecms==1){
$r['pageurl']=$public_r['newsurl'].str_replace(array('[!--tagname--]','[!--page--]'),array($tagid,0),$public_r['rewritetags']);
}else{
$r['pageurl']=$public_r['newsurl'].str_replace('[!--tagname--]',$tagid,$public_r['rewritetags']);
}
$r['rewrite']=1;
}
return $r;
}
第二步、打开/e/tags/index.php文件
1、17 18行左右 找到:
修改为://TAGS
$tagid=(int)$_GET['tagid'];
//TAGS
$tagid=(int)$_GET['tagname'];
2、分页修改:
修改为:193行左右找到 $listpage=page1($num,$line,$page_line,$start,$page,$search);//分页
至此即可实现按ID伪静态。//伪静态
$pagefunr=eReturnRewriteTagsUrl($tagid,$tagname,0);
$pagefunr['repagenum']=0;
if($pagefunr['rewrite']==1){
$listpage=InfoUsePage($num,$line,$page_line,$start,$page,$search,$pagefunr);
}else{
$listpage=page1($num,$line,$page_line,$start,$page,$search);//分页
}