(1)找到function ParseDMFields,修改为:
function ParseDMFields($pageNo,$ismake=1)
{
$this->NowPage = $pageNo;
//获得当前页面编号
$this->Fields['cpagenum'] = $this->NowPage;
if($this->SplitPageField!="" &&
isset($this->Fields[$this->SplitPageField]))
{
$this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1];
}
$this->Fields['cpagenum'] = $this->NowPage;
$this->TotalPage = count($this->SplitFields);
}
//获得当前页面总数
$this->Fields['totalpage'] = $this->TotalPage;
$this->LoadTemplet();
$this->ParseTempletsFirst();
}
$this->Fields['totalpage'] = $this->TotalPage;
<script language="javascript">
var npage = {dede:field/};
var totalpage = {dede:field/};
var filename="";
var curl=location.href;
function goNextPic(){
str1 = /\.html/ig;
str2 = /_/ig;
r = curl.search(str1);
r1 = curl.search(str2);
if(r>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);
}
}
}
</script>
$revalue = "<center><a rel="nofollow noopener noreferrer" href='$src' target='_blank'><img src='$src' alt="$alt" $iw/></a><br/>$alt<br/></center>\r\n";
$revalue = "<center><a rel="nofollow noopener noreferrer" href='javascript:goNextPic();'><img src='$src' alt="$alt" $iw/></a><br/>$alt<br/></center> ";
本文织梦DEDECMS如何实现图集单击图片翻页的功能到此结束。人的才能像挂钟一样,如果停止了摆动,就要落后了。小编再次感谢大家对我们的支持!