zoukankan      html  css  js  c++  java
  • DedeCMS系统的pagebreak文章页面分页显示设置

    效果展示:

     修改方法:

    在include/arc.archives.class.php这个类,这个主是来解析文章内容的类
    找到   function GetPagebreak($totalPage,$nowPage,$aid)

    function GetPagebreak($totalPage, $nowPage, $aid)
        {
            if($totalPage==1)
            {
                return "";
            }
            // $PageList = "<li><a>共".$totalPage."页: </a></li>";
            $nPage = $nowPage-1;
            $lPage = $nowPage+1;
            if($nowPage==1)
            {
                // $PageList.="<a href='#'>上一页</a>";
            }
            else
            {
                if($nPage==1)
                {
                    // $PageList.="<a href='".$this->NameFirst.".".$this->ShortName."'>上一页</a>";
                }
                else
                {
                    // $PageList.="<a href='".$this->NameFirst."_".$nPage.".".$this->ShortName."'>上一页</a>";
                }
            }
            for($i=1;$i<=$totalPage;$i++)
            {
                if($i==1)
                {
                    if($nowPage!=1)
                    {
                        $PageList.="<a href='".$this->NameFirst.".".$this->ShortName."'  >1</a>";
                    }
                    else
                    {
                        $PageList.="<a href='#'  class="on">1</a>";
                    }
                }
                else
                {
                    $n = $i;
                    if($nowPage!=$i)
                    {
                        $PageList.="<a href='".$this->NameFirst."_".$i.".".$this->ShortName."' >".$n."</a>";
                    }
                    else
                    {
                        $PageList.="<a href='#' class="on">{$n}</a>";
                    }
                }
            }
            if($lPage <= $totalPage)
            {
                // $PageList.="<a href='".$this->NameFirst."_".$lPage.".".$this->ShortName."'>下一页</a>";
            }
            else
            {
                // $PageList.= "<a href='#'>下一页</a>";
            }
            return $PageList;
        }
  • 相关阅读:
    原型prototype
    this
    作用域、闭包、模块
    嵌入式面试资料
    一些嵌入式面试题目的集锦
    优先级反转
    struct和union的区别
    (转)typedef和#define的用法与区别
    const 和 #define区别
    白话经典算法系列之 快速排序 快速搞定
  • 原文地址:https://www.cnblogs.com/lsyy/p/11475167.html
Copyright © 2011-2022 走看看