/U'
, '',$this->Fields['body2']);
$this->SplitFields = explode("#p2222#",$this->Fields['body2']);
$this->Fields['tmptitle'] = (emptyempty($this->Fields['tmptitle']) ? $this->Fields['title'] : $this->Fields['tmptitle']);
$this->Fields['title'] = $this->Fields['tmptitle'];
$this->TotalPage = count($this->SplitFields);
$this->Fields['totalpage'] = $this->TotalPage;
$TRUEfilenameall = $this->GetTruePath().$fileFirst."_all.".$this->ShortName;
$this->ParseDMFields(1,0);
$this->dtp->SaveTo($TRUEfilenameall);
if($cfg_remote_site=='Y' && $isremote == 1)
{
$remotefile = str_replace(DEDEROOT, '', $TRUEfilename);
$localfile = '..'.$remotefile;
$remotedir = preg_replace("#[^\/]*\.html#", '', $remotefile);
$this->ftp->rmkdir($remotedir);
$this->ftp->upload($localfile, $remotefile, 'ascii');
}
}
第三步:查找 获得静态页面分页列表,代码如下:
-
-
-
-
-
-
-
-
-
- function GetPagebreak($totalPage, $nowPage, $aid)
- {
- if($totalPage==1)
- {
- return "";
- }
-
- $PageList = "";
- $nPage = $nowPage-1;
- $lPage = $nowPage+1;
- if($nowPage==1)
- {
- $PageList.="<a href='javascript:void(0);'><</a>";
- }
- else
- {
- if($nPage==1)
- {
- $PageList.="<a href='".$this->NameFirst.".".$this->ShortName."' target='_self'><</a>";
- }
- else
- {
- $PageList.="<a href='".$this->NameFirst."_".$nPage.".".$this->ShortName."' target='_self'><</a>";
- }
- }
- for($i=1;$i<=$totalPage;$i++)
- {
- if($i==1)
- {
- if($nowPage!=1)
- {
- $PageList.="<a href='".$this->NameFirst.".".$this->ShortName."' target='_self'>1</a>";
- }
- else
- {
- $PageList.="<a class=\"here\" href='javascript:void(0);' target='_self'>1</a>";
- }
- }
- else
- {
- $n = $i;
- if($nowPage!=$i)
- {
- $PageList.="<a href='".$this->NameFirst."_".$i.".".$this->ShortName."' target='_self'>".$n."</a>";
- }
- else
- {
- $PageList.="<a class=\"here\" href='javascript:void(0);' target='_self'>{$n}</a>";
- }
- }
- }
- if($lPage <= $totalPage)
- {
- $PageList.="<a href='".$this->NameFirst."_".$lPage.".".$this->ShortName."' target='_self'>></a>";
- }
- else
- {
- $PageList.= "<a href='javascript:void(0);'>></a>";
- }
- $PageList.= "<a href='".$this->NameFirst."_all.".$this->ShortName."'>阅读全文</a>";
- return $PageList;
- }
也就是在return $PageList 上一行添加了一行代码:
$PageList.= "<a href='".$this->NameFirst."_all.".$this->ShortName."'>阅读全文</a>";
修改完成后,保存文件,更新一下页面就可以看到效果了.