您当前的位置: 主页 > 优化教程
第一步:在图集模板里加入分页代码:{dede:pagebreak/}
 
第二步:打开arc_archives_class.php,在include目录下,在结尾处加上以下代码:
 
/**
* 获得动态页面图集中图片缩略列表
*
* @access public
* @param int $totalPage 总页数
* @param int $nowPage 当前页数
* @param int $aid 文档id
* @return string
*/
function GetlitpicDM_list($totalPage,$nowPage,$aid)
{
global $dsql,$sqlCt;
$attlist="desclen|80";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
if(!isset($this->addTableRow['imgurls'])) return ;
$revalue = '';
$dtp = new DedeTagParse();
$dtp->LoadSource($this->addTableRow['imgurls']);
$images = array();
if(is_array($dtp->CTags))
{
$pagenum=1;
foreach($dtp->CTags as $ctag1)
{
if($ctag1->GetName()=="img")
{
$litpic.='<LI>
<DIV class=img><A title="'. $ctag1->GetAtt('text').'"
href="view.php?aid='.$aid.'&pageno='.$pagenum.'"><IMG
style="BACKGROUND-IMAGE: url('.$ctag1->GetAtt('ddimg').')"
src="'.$GLOBALS['cfg_templets_skin'].'/tukustyle/blankBg.gif" ></A></DIV><A
href="view.php?aid='.$aid.'&pageno='.$pagenum.'">'.substr($ctag1->GetAtt('text'), 30).'</A> </LI>';
 
$pagenum++;
}
}
}
 
return $litpic;
}
/**
* 获得静态页面图集中图片缩略列表
*
* @access public
* @param int $totalPage 总页数
* @param int $nowPage 当前页数
* @param int $aid 文档id
* @return string
*/
function Getlitpic_list($totalPage,$nowPage,$aid)
{
global $dsql,$sqlCt;
$attlist="desclen|80";
FillAttsDefault($ctag->CAttribute->Items,$attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
if(!isset($this->addTableRow['imgurls'])) return ;
$revalue = '';
$dtp = new DedeTagParse();
$dtp->LoadSource($this->addTableRow['imgurls']);
$images = array();
if(is_array($dtp->CTags))
{
$pagenum=1;
foreach($dtp->CTags as $ctag1)
{
if($ctag1->GetName()=="img")
{
if($pagenum==1)
{
$litpic.='<LI>
<DIV class=img><A title="'. $ctag1->GetAtt('text').'"
href="'.$this->NameFirst.'.'.$this->ShortName.'"><IMG
style="BACKGROUND-IMAGE: url('.$ctag1->GetAtt('ddimg').')"
src="'.$GLOBALS['cfg_templets_skin'].'/tukustyle/blankBg.gif" ></A></DIV><A
href="'.$this->NameFirst.'_'.$pagenum.'.'.$this->ShortName.'">'.substr($ctag1->GetAtt('text'),0,30).'</A> </LI>';
}
else
{
$litpic.='<LI>
<DIV class=img><A title="'. $ctag1->GetAtt('text').'"
href="'.$this->NameFirst.'_'.$pagenum.'.'.$this->ShortName.'"><IMG
style="BACKGROUND-IMAGE: url('.$ctag1->GetAtt('ddimg').')"
src="'.$GLOBALS['cfg_templets_skin'].'/tukustyle/blankBg.gif" ></A></DIV><A
href="'.$this->NameFirst.'_'.$pagenum.'.'.$this->ShortName.'">'.substr($ctag1->GetAtt('text'),0,30).'</A> </LI>';
}
$pagenum++;
}
}
}
 
return $litpic;
}
 

关键词:dedecms,织梦,5.7,图集,实现,分页,功能,第一步    标签:
    更多资讯请收藏关注 网站模板(www.1yc.cn)

runphp标签dedecmsdedecms直接获取上一篇下一篇的URL网址链接织梦dedecms的上一篇、下一篇调用一般在文章页里面是用{dede:... 2021-08-09
DedeCMS文章添加跳转属性后打开出现空白的解决方法使用DedeCMS发布文章时,如果给文章添加了跳转属性,有时候会出现跳... 2021-07-30
dedecms织梦后台缩略图本地上传图片加水印dedecms织梦后台添加文章时,缩略图有本地上传和站内选择,就算你开... 2021-07-22
织梦dedecms 安装模块(插件)后台空白扥登录不上的解决方法在 织梦模板 网站上安装网站地图模块插件,装完了就再也进不去后台管理界... 2021-07-22
DedeCMS在软件列表页中调用“软件大小”的方法我们都知道,在织梦的软件列表页{dede:list }循环标签中使用[... 2021-07-22
dede织梦实现月排行、日排行列表让dede织梦实现月排行显示列表,周点击排行列表。以及日排行列表; 总... 2021-07-27
织梦底层友情链接模块样式的代码修改最近在接到一个新的网站时遇到了一些问题,该网站要的是把友情链接的模块进... 2021-07-30
织梦DEDECMS教程:去除列表页文章标题加粗标签最近在用DEDECMS搭架网站的时候,我碰到这种情况:就是生成的列表模... 2021-07-22
dedecms列表页文章摘要字数的设置方法本文实例讲述了dedecms列表页文章摘要字数的设置方法。分享给大家供... 2021-07-27
织梦CMS不能上传jpg格式的图片怎么办如何解决织梦CMS不能上传jpg格式的图片怎么办如何解决 到根目录下找到Inc... 2021-07-27
优化织梦提高网页打开速度最近一直在研究如何提高网站的用户体验性,我们知道加快网页的打开速度是提... 2021-08-14
{dede:field name='softlinks'/}下载页织梦标签修改织梦Dedecms的软件模型中,{dede:field name=so... 2021-07-30
织梦DEDECMS用sql命令删除自定义变量如果后台添加变量后不想要了,可删除。有两种方法: 1、直接利用phpm... 2021-07-22
dedecms教程:织梦上传swf文件 文件名不显示为空色DEDE后台上传swf文件所发现的一个小问题,那就是刚上传的文件名不能... 2021-07-22
dedecms使用getall获取当前页面tag标签(超连接)的方法本文实例讲述了dedecms使用getall获取当前页面tag标签(超... 2021-07-27
织梦DedeCMS 5.7图集点击图片进入下一篇的修改方法织梦DedeCMS图集点击到最后一页会提示没有了哦,这样对用户体验不好... 2021-07-30

线
咨询热线:
135-0038-3336
在线客服:
点击这里给我发消息
微信交流:
公司官网: www.1yc.cn