修改方法:
找到include/inc_archives_view.php中的function GetPreNext()函數(shù),修改為:
復(fù)制代碼 代碼如下:
//--------------------------
//獲取上一篇,下一篇鏈接
//--------------------------
function GetPreNext()
{
$rs = "";
$aid = $this->ArcID;
$rid = $this->Fields['typeid'];
$next = " dede_archives.ID>'$aid' and dede_archives.typeID='$rid' order by dede_archives.ID asc ";
$pre = " dede_archives.ID<'$aid' and dede_archives.typeID='$rid' order by dede_archives.ID desc ";
//$next = " dede_archives.ID>'$aid' order by dede_archives.ID asc ";
//$pre = " dede_archives.ID<'$aid' order by dede_archives.ID desc ";
$query = "Select dede_archives.ID,dede_archives.title,
dede_archives.typeid,dede_archives.ismake,dede_archives.senddate,dede_archives.arcrank,dede_archives.money,
dede_arctype.typedir,dede_arctype.typename,dede_arctype.namerule,dede_arctype.namerule2,dede_arctype.ispart,
dede_arctype.moresite,dede_arctype.siteurl
from dede_archives left join dede_arctype on dede_archives.typeid=dede_arctype.ID
where ";
$nextRow = $this->dsql->GetOne($query.$next);
$preRow = $this->dsql->GetOne($query.$pre);
if(is_array($preRow)){
$mlink = GetFileUrl($preRow['ID'],$preRow['typeid'],$preRow['senddate'],$preRow['title'],$preRow['ismake'],$preRow['arcrank'],$preRow['namerule'],$preRow['typedir'],$preRow['money'],true,$preRow['siteurl']);
$rs .= "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";
}
else{
$rs .= "上一篇:沒有了 ";
}
if(is_array($nextRow)){
$mlink = GetFileUrl($nextRow['ID'],$nextRow['typeid'],$nextRow['senddate'],$nextRow['title'],$nextRow['ismake'],$nextRow['arcrank'],$nextRow['namerule'],$nextRow['typedir'],$nextRow['money'],true,$nextRow['siteurl']);
$rs .= " 下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
}
else{
$rs .= " 下一篇:沒有了 ";
}
return $rs;
}
如果你不會修改,還可以下載修改后的:inc_archives_view.php。