收藏本页
联系我们
论坛帮助

牛头网络技术论坛网管专区DEDECMS技术 → DEDECMS列表伪静态修改

垃圾帖子的防止方法 动网水印问题 sql里的字符替换方法 2003安全设置大全 短信检测提交问题

  共有257人关注过本帖树形打印

主题:DEDECMS列表伪静态修改

帅哥,在线噢!
牛头

  1楼


头衔:站长
金币:5059
经验:6037
金钱:8971
等级:管理员
文章:563
精华:10
加为好友
发送短信
个性首页
DEDECMS列表伪静态修改  发贴心情 Post By:2008-8-3 1:48:26

打开inc_arclist_view.php
查找
//---------------------------------
//获取动态的分页列表
//---------------------------------

wwW.MB5U_COM

对比以下代码修改
function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno")
{
$prepage="";
$nextpage="";
$prepagenum = $this->PageNo-1;
$nextpagenum = $this->PageNo+1;
if($list_len==""||ereg("[^0-9]",$list_len)) $list_len=3;
$totalpage = ceil($this->TotalResult/$this->PageSize);
if($totalpage<=1 && $this->TotalResult>0) return "共1页/".$this->TotalResult."条记录";
if($this->TotalResult == 0) return "共0页".$this->TotalResult."条记录";
$maininfo = "共{$totalpage}页/".$this->TotalResult."条记录";

$purl = $this->GetCurUrl();
$geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$gettypeid =$this->TypeID."-";
//$hidenform = "<input type='hidden' name='typeid' value='".$this->TypeID."'>\r\n";

MB5U_coM


//$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n";

$purl .= "?".$geturl;

//获得上一页和下一页的链接
if($this->PageNo != 1){
$prepage.="<a href='list-".$gettypeid."$prepagenum.html'>上一页</a>";
$indexpage="<a href='list-".$gettypeid."1.html'>首页</a>";
}
else{
$indexpage="首页";
}

if($this->PageNo!=$totalpage && $totalpage>1){
$nextpage.="<a href='list-".$gettypeid."$nextpagenum.html'>下一页</a>";
$endpage="<a href='list-".$gettypeid."$totalpage.html'>末页</a>";
}
else{
$endpage="末页";
}
//获得数字链接
$listdd="";
$total_list = $list_len * 2 + 1;
if($this->PageNo >= $total_list) {
$j = $this->PageNo-$list_len; www.MB5U_COM
$total_list = $this->PageNo+$list_len;
if($total_list>$totalpage) $total_list=$totalpage;
}else{
$j=1;
if($total_list>$totalpage) $total_list=$totalpage;
}
for($j;$j<=$total_list;$j++){
$listdd.="<a href='list-".$gettypeid."$j.html'>".$j."</a>";
}
$plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage;
return $plist;
}
MB5U_COM

打开inc_channel_unit_functions.php MB5U____COM

查找
$reurl = $GLOBALS["cfg_plus_dir"]."/list.php?tid=".$typeid;

wWw.MB5U_COM

改成
//$reurl = $GLOBALS["cfg_plus_dir"]."/list.php?tid=".$typeid;
$reurl = "/list-".$typeid.".html"; MB5U_coM

增加.htaccess文件 MB5U____COM

内容为
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)list-([0-9]+)\.html$ $1/plus/list.php?tid=$2
RewriteRule ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/plus/list.php?typeid=$2&PageNo=$3
</IfModule>



在线咨询技术 [牛头][早起的鸟儿有虫吃!]
 牛头网电脑学院,尽显英雄本色 支持(0中立(0反对(0回到顶部