Modify the file include/arc.archives.class.php file.
1. Search
function Getprenext ($gtype= ")
2. Replace all the contents of this function with
functionGetprenext ($gtype= ' ') { $rs= ' '; if(Count($this->prenext) <2) { $aid=$this-Arcid; $preR=$this->dsql->getone ("Select id from ' #@__arctiny ' where id<$aidand arcrank>-1 and Typeid= ' {$this->fields[' typeid '} ' ORDER by id DESC '); $nextR=$this->dsql->getone ("Select id from ' #@__arctiny ' where id>$aidand arcrank>-1 and Typeid= ' {$this->fields[' typeid '} ' ORDER by ID ASC '); $next= (Is_array($nextR) ? "Where arc.id={$nextR[' ID ']} ": ' Where 1>2 '); $pre= (Is_array($preR) ? "Where arc.id={$preR[' ID ']} ": ' Where 1>2 '); $query= "Select Arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money, Arc.filename,arc.litpic, T.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl, T.sitepath from ' #@__archives ' arc left joins #@__arctype T on Arc.typeid=t.id"; $nextRow=$this->dsql->getone ($query.$next); $preRow=$this->dsql->getone ($query.$pre); if(Is_array($preRow)) { $mlink= Getfileurl ($preRow[' ID '],$preRow[' typeID '],$preRow[' Senddate '],$preRow[' title '],$preRow[' Ismake '],$preRow[' Arcrank '],$preRow[' Namerule '],$preRow[' Typedir '],$preRow[' Money '],$preRow[' filename '],$preRow[' Moresite '],$preRow[' SiteURL '],$preRow[' SitePath ']); $mobile _mlink= "/m/view.php?aid=".$preRow[' ID ']; $this->prenext[' pre '] = "prev: <a href="$mlink' >{$preRow[' title ']} </a> "; $this->prenext[' mobile_pre ' = "prev: <a href= '$mobile _mlink' >{$preRow[' title ']} </a> "; $this->prenext[' preimg '] = "<a href="$mlink' >$preRow[' Litpic ']} \ "Alt=\" {$preRow[' title ']} \ "/></a>"; } Else { $this->prenext[' pre '] = "prev: no"; $this->prenext[' mobile_pre ' = "prev: no"; $this->prenext[' preimg ' = "; } if(Is_array($nextRow)) { $mlink= Getfileurl ($nextRow[' ID '],$nextRow[' typeID '],$nextRow[' Senddate '],$nextRow[' title '],$nextRow[' Ismake '],$nextRow[' Arcrank '],$nextRow[' Namerule '],$nextRow[' Typedir '],$nextRow[' Money '],$nextRow[' filename '],$nextRow[' Moresite '],$nextRow[' SiteURL '],$nextRow[' SitePath ']); $mobile _mlink= "/m/view.php?aid=".$nextRow[' ID ']; $this->prenext[' Next ' = ' Next: <a href= '$mlink' >{$nextRow[' title ']} </a> "; $this->prenext[' mobile_next '] = "Next: <a href= '$mobile _mlink' >{$nextRow[' title ']} </a> "; $this->prenext[' nextimg '] = "<a href="$mlink' >$nextRow[' Litpic ']} \ "Alt=\" {$nextRow[' title ']} \ "/></a>"; } Else { $this->prenext[' Next ' = "Next: No More"; $this->prenext[' mobile_next '] = "Next: No"; $this->prenext[' nextimg ' = "<a href= ' javascript:void (0) ' alt=\" \ "></a>"; } } if($gtype= = ' Pre ') { $rs=$this->prenext[' pre ']; } Else if($gtype= = ' Preimg '){ $rs=$this->prenext[' preimg ']; } Else if($gtype= = ' Mobile_pre '){ $rs=$this->prenext[' Mobile_pre ']; } Else if($gtype= = ' Next ') { $rs=$this->prenext[' Next ']; } Else if($gtype= = ' Mobile_next ') { $rs=$this->prenext[' Mobile_next ']; } Else if($gtype= = ' Nextimg '){ $rs=$this->prenext[' nextimg ']; } Else { $rs=$this->prenext[' pre ']. " ".$this->prenext[' Next ']; } return $rs; }
3, in the Mobile Site Details page template, will call the previous page, the next page label inserted.
<ulclass= "Am-pagination blog-pagination"> <Li>{dede:prenext get= ' mobile_pre '/}</Li><Divstyle= "Clear:both;"></Div> <Li>{dede:prenext get= ' mobile_next '/}</Li> </ul>
Finished, detailed introduction please visit the site, Chongqing old farmers
DEDECMS Mobile Website Add Details page page up/down page function