首页 技术 正文
技术 2022年11月10日
0 收藏 638 点赞 14,674 浏览 2489 个字

<ul>{dede:list pagesize=’30’}
<li><a
href=”[field:arcurl/]”>[field:title/]</a>([field:click/]
次阅读)</li>
{/dede:list} </ul>
<div id=”pageNav”>

<ul>{dede:pagelist listitem=”info,index,end,pre,next,pageno”
listsize=”5″/}</ul></div>  

样式:
#pageNav {
font: 12px/24px Tahoma;
height: 30px;
margin: 15px auto 0;
text-align: center;
width: 500px;
}
#pageNav ul {
list-style-type: none;
overflow: hidden;
}
#pageNav ul li {
background-color: #FFFFFF;
border: 1px solid #CCDBE4;
color: #0B3B8C;
display: block;
height: 22px;
margin: 0 2px;
padding: 0 3px;
float: left;
}
#pageNav ul li a {
background-color: #FFFFFF;
color: #0B3B8C;
padding: 0 3px;
}
#pageNav ul li a:hover {
color: #D87D08;
}
#pageNav ul li.hover {
border: 0 none;
color: #000000;
font-weight: bold;
}
#pageNav ul li.hover a {
color: #000000;
}

  =======================================================

不啰嗦了,下面是修改步骤:

1.找到根目录下的“include”文件夹下的“arc.listview.class.php”文件,打开。
        网站根目录/include/arc.listview.class.php

2.ctrl+f找到“//获取静态的分页列表”。
        把“//获取静态的分页列表”到“//获取动态的分页列表”之间的代码(GetPageListST函数)修改为以下:

function GetPageListST($list_len,$listitem=”index,end,pre,next,pageno”)
 {
  $prepage = $nextpage = ”;
  $prepagenum = $this->PageNo-1;
  $nextpagenum = $this->PageNo+1;
  if($list_len==” || ereg(“[^0-9]”,$list_len))
  {
   $list_len=2;
  }
  $totalpage = ceil($this->TotalResult/$this->PageSize);
  if($totalpage<=1 && $this->TotalResult>0)
  {

return “”;
  }
  if($this->TotalResult == 0)
  {
   return “”;
  }
  $purl = $this->GetCurUrl();
  $maininfo = “”;
  $tnamerule = $this->GetMakeFileRule($this->Fields[‘id’],”list”,$this->Fields[‘typedir’],$this->Fields[‘defaultname’],$this->Fields[‘namerule2’]);
  $tnamerule = ereg_replace(‘^(.*)/’,”,$tnamerule);
        //分页第一页链接 12.15 李楠修改
  $typedir= ereg_replace(‘{cmspath}’,$GLOBALS[‘cfg_cmspath’],$this->Fields[‘typedir’]);
        //变量:默认文档名称,比如index.html $defaultname= ereg_replace(‘{cmspath}’,$GLOBALS[‘cfg_cmspath’],$this->Fields[‘defaultname’]);
  
  //获得上一页和主页的链接
  if($this->PageNo != 1)
  {
   if($this->PageNo == 2)
   {
        $prepage.=”<a href=\””.$typedir.”/\” class=\”pageNum prepage\”>上一页”;
   }
   else
   {
     $prepage.=”<a href='”.str_replace(“{page}”,$prepagenum,$tnamerule).”‘ class=\”pageNum prepage\”>上一页”;
   }
   if($totalpage <= 10)
   {
    $indexpage=”<A class=\ href=”http://edit.jfsky.com/” pageNum\?? ?.$typedir.? _xhe_href=”\” \??>1″;
   }
   else
   {
    if($this->PageNo < $list_len*2+1)
    {
       $indexpage=”<A class=\ href=”http://edit.jfsky.com/” pageNum\?? ?.$typedir.? _xhe_href=”\” \??>1″;
    }
    else
    {
       $indexpage=”<A class=\ href=”http://edit.jfsky.com/” pageNum\?? ?.$typedir.? _xhe_href=”\” \??>1<SPAN class=\ pageBreak\??>…”;
   &nbs

 

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,907
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,432
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,247
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,058
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,690
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,727