Dede article click on the image automatically into the next page of the method, before looking for a lot of code, found that are not very good, find this code today, pro-test feasible, so posted out to share with you:
modifying/include/arc.archives.class.php files
1. Find "Parse template, assign value to changes in content" Add the following code to the phrase above.
function Clickpicnext ($ismake =1, $aid,& $body)
{
Global $cfg _rewrite;
if ($this->nowpage!= $this->totalpage)
{
$lPage = $this->nowpage+1;
if ($ismake =0)
{
$body =preg_replace ("/<" (img| IMG) (. *) (src| SRC) =[\ "| ' |] {0,} ((. *) >)/isu "," Click on the picture to go to the next page <br/><a href= ' ". $this->namefirst." _ ". $lPage.". $this->shortname. "' > "." \${0} "." </a> ", $body);
}
Else
{
Used in cases where static pages are generated
$PageList = "<a href= '". $this->namefirst. " _ ". $lPage.". $this->shortname. "' > "." \${0} "." </a> ";
For dynamic page use, I use static here, so the following line of code comments, if you are a dynamic page, the above line of code comments, use the following line.
$PageList = "<a href= ' view.php?aid= $aid &pageno= $lPage ' > '." \${0} "." </a> ";
if ($cfg _rewrite = = ' Y ')
{
$PageList = Str_replace (". php?aid=", "-", $PageList);
$PageList = Preg_replace ("/&pageno= (\d+)/i", '-\\1.html ', $PageList);
}
$body =preg_replace ("/<" (img| IMG) (. *) (src| SRC) =[\ "| ' |] {0,} ((. *) >)/isu ", $PageList, $body);
}
}
Else
{
$body =preg_replace ("/<" (img| IMG) (. *) (src| SRC) =[\ "| ' |] {0,} ((. *) >)/isu ", $this->getprenext (' Imgnext '), $body);
}
return $body;
}
2, look for "$this->fields[$this->splitpagefield] = $this->splitfields[$pageNo –1];", add the following code under this code:
if ($ClickPicNext) {
$this->fields[$this->splitpagefield]= $this->fields[$this->splitpagefield];
}else{
$this->fields[$this->splitpagefield]= $this->clickpicnext ($ismake, $this->fields[' id '), $this-> fields[$this->splitpagefield]);
}
3, find "$this->prenext[' next"] = "Next: <a href= ' $mlink ' >{$nextRow [' title ']}</a> ';" Under this code, add the following code:
$this->prenext[' imgnext '] = "<a href= ' $mlink ' > '." \${0} "." </a> ";
4, look for "$this->prenext[' next"] = "Next: No"; Under this code, add the following code:
$this->prenext[' imgnext '] = "\${0}";
5, find the following code:
else if ($gtype = = ' Next ')
{
$rs = $this->prenext[' Next '];
}
Add the following code below it:
else if ($gtype = = ' Imgnext ')
{
$rs = $this->prenext[' Imgnext '];
}
and then save. Regenerate the article!