arc.listview.class.php
function GetPageListST($list_len,$listitem="index,end,pre,next,pageno,spurl") // ,spurl新增的
,spurl新境的
1 2 3 4 5 | $purl = $this ->GetCurUrl(); $maininfo = "<li><span class="pageinfo">共 <strong>{$totalpage}</strong>頁<strong>" . $this ->TotalResult. "</strong>條</span></li> " ; $tnamerule = $this ->GetMakeFileRule( $this ->Fields[ 'id' ], "list" , $this ->Fields[ 'typedir' ], $this ->Fields[ 'defaultname' ], $this ->Fields[ 'namerule2' ]); $tnamerule = preg_replace( "/^(.*)//" , '' , $tnamerule ); $typedir = ereg_replace ( '{cmspath}' , $GLOBALS [ 'cfg_cmspath' ], $this ->Fields[ 'typedir' ]); //新增的 |
1 2 3 4 5 6 7 8 9 | if ( $this ->PageNo != 1) { $prepage .= "<li><a href='" . str_replace ( "{page}" , $prepagenum , $tnamerule ). "'>上一頁</a></li> " ; $indexpage = "<li><a href='" . str_replace ( "{page}" ,1, $tnamerule ). "'>首頁</a></li> " ; } else { $indexpage = "<li>首頁</li> " ; $spurlpage = $GLOBALS [ 'cfg_basehost' ]. $typedir . "/" ; //新增的 |
1 2 3 4 5 6 7 8 9 10 11 12 13 | } $plist = '' ; if (preg_match( '/index/i' , $listitem )) $plist .= $indexpage ; if (preg_match( '/pre/i' , $listitem )) $plist .= $prepage ; if (preg_match( '/pageno/i' , $listitem )) $plist .= $listdd ; if (preg_match( '/next/i' , $listitem )) $plist .= $nextpage ; if (preg_match( '/end/i' , $listitem )) $plist .= $endpage ; if (preg_match( '/option/i' , $listitem )) $plist .= $optionlist ; if (preg_match( '/info/i' , $listitem )) $plist .= $maininfo ; if (preg_match( '/spurl/i' , $listitem )) $plist .= $spurlpage ; //新增的 return $plist ; } |
list_article.htm 調用 {dede:pagelist listitem="spurl" listsize="0"/}
當第一頁則顯示列表的網址,第二頁往后則不顯示。用于百度移動適配,因為移動版與PC版條數不一樣,二頁往后內容完全不對應。適配失敗。所以只能適配第一頁。
新聞熱點
疑難解答