<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

dedecms点击图片进入下一页教程

时间:2020-12-10

打开include/inc_archives_view.php

大概在444行左右,找到
 

$this->Fields[$this->SplitPageField]=$this->Fields[$this->SplitPageField];
 

注释掉,改为
 

$this->Fields[$this->SplitPageField]=$this->ClickPicNext($this->Fields[$this->SplitPageField]);
 

然后,最后加上函数,注重在最后一个括号里面!

//把图片替换成链接 //---------------------------- 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; }

自动地把文章中的图片替换为下一页的链接,假如是最后一页,则为下一篇!
注重:先要按下面的改法,把上一篇下一篇分开才行!

0
首页
案例
关于
联系