关键字描述:方法 进入 图片 点击 &quot this-&gt .&quot &lt body

dede点击图片进入下一页方法:

打开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=’https://www.freexyz.cn/cms/".$this->NameFirst."_".$lPage.".".$this->ShortName."’>"."\${0}"."</a>",$body);
//$body="<a href=’https://www.freexyz.cn/cms/".$this->NameFirst."_".$lPage.".".$this->ShortName."’>".$body."</a> ";
}else{
if($this->GetNext()){
$body=preg_replace("/<(img|IMG)(.*)(src|SRC)=[\&;|’| ]{0,}((.*)>)/isU","<a href=’https://www.freexyz.cn/cms/".$this->GetNext()."’>"."\${0}"."</a>",$body);
//$body="<a href=’https://www.freexyz.cn/cms/".$this->GetNext()."’>".$body."</a> ";

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

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。