dede點(diǎn)擊圖片進(jìn)入下一頁(yè)方法

字號(hào):


    關(guān)鍵字描述:方法 進(jìn)入 圖片 點(diǎn)擊 " this-> ." < body dede點(diǎn)擊圖片進(jìn)入下一頁(yè)方法: 打開(kāi)include/inc_archives_view.php 大概在444行左右,找到 $this->Fields[$this->SplitPageField]=$this->Fields[$this->SplitPageField]; 注釋掉,改
    關(guān)鍵字描述:方法 進(jìn)入 圖片 點(diǎn)擊 " this-> ." < body
    dede點(diǎn)擊圖片進(jìn)入下一頁(yè)方法:
    打開(kāi)include/inc_archives_view.php
    大概在444行左右,找到
    $this->Fields[$this->SplitPageField]=$this->Fields[$this->SplitPageField];
    注釋掉,改為
    $this->Fields[$this->SplitPageField]=$this->ClickPicNext($this->Fields[$this->SplitPageField]);
    然后,最后加上函數(shù),注重在最后一個(gè)括號(hào)里面!
    //把圖片替換成鏈接
    //----------------------------
    function ClickPicNext(&$body)
    {
    if($this->NowPage!=$this->TotalPage){
    $lPage=$this->NowPage 1;
    $body=preg_replace("/<(img|IMG)(.*)(src|SRC)=[\"|'| ]{0,}((.*)>)/isU","<a href='".$this->NameFirst."_".$lPage.".".$this->ShortName."'>"."\${0}"."</a>",$body);
    //$body="<a href='".$this->NameFirst."_".$lPage.".".$this->ShortName."'>".$body."</a> ";
    }else{
    if($this->GetNext()){
    $body=preg_replace("/<(img|IMG)(.*)(src|SRC)=[\"|'| ]{0,}((.*)>)/isU","<a href='".$this->GetNext()."'>"."\${0}"."</a>",$body);
    //$body="<a href='".$this->GetNext()."'>".$body."</a> ";
    }
    }
    return $body;
    }
    自動(dòng)地把文章中的圖片替換為下一頁(yè)的鏈接,假如是最后一頁(yè),則為下一篇!
    注重:先要按下面的改法,把上一篇下一篇分開(kāi)才行!