NowPage = $pageNo; //获得当前页面编号 $this->Fields['cpagenum'] = $this->NowPage; if($this->SplitPageField!="" && isset($this->Fields[$this->SplitPageField])) { $this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1]; }
Fields['cpagenum'] = $this->NowPage;
函数,修改为:
TotalPage = count($this->SplitFields); } //获得当前页面总数 $this->Fields['totalpage'] = $this->TotalPage; $this->LoadTemplet(); $this->ParseTempletsFirst(); }增加了如下代码用来获得总页码:
Fields['totalpage'] = $this->TotalPage;
页面和动态页面以及向下翻页 显示的模板,增加如下js代码:
0){ if(npage==1) filename = curl.substr(0,r); else filename = curl.substr(0,r1); if(npage==totalpage){ location.href = filename+".html"; } else{ location.href = filename+"_"+(npage+1)+".html"; } }else{ if(npage==totalpage){ location.href = "view.PHP?aid={dede:field/}"; } else{ location.href = "view.PHP?aid={dede:field/}&pageno="+(npage+1); } } }方法goNextPic用来切换到下一个图片。
修改图片输出代码,完成goNextPic方法调用
修改include/inc_channel_unit.PHP
分页式图集”的部分。
修改类似(仔细看代码,需要修改好几个地方):
$alt
\r\n";
$alt
";
原文链接:https://www.f2er.com/dedecms/403999.html