您当前的位置: 主页 > 优化教程
第一步:在图集模板里加入分页代码:{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)

dedecms织梦会员中心调用会员最后登录时间和IP的方法在做织梦会员中心开发的时候,有的时候需要在更多的模板中调用会员最后登录... 2021-07-22
织梦标签不能嵌套的2种解决方法我们用织梦建站时,嵌套标签,标签原封不动的被展示了出来而未被解析,举个... 2021-07-27
DEDE实现三级栏目_二级栏目_一级栏目_网站名称用这个办法,可以实现三级栏目_二级栏目_一级栏目_网站名称,即优化,对... 2021-07-22
dedecms织梦模板栏目列表添加统计文档数量调用标签dedecms在栏目列表中添加统计文档数量调用标签,实现的方法还是非常... 2021-07-22
Dedecms教程:批量替换文章中的超链接AB模板网在自己php空间中的一个网站由以前采集里面有很多连接没有过滤... 2021-07-30
怎样查看织梦数据库信息在用织梦dedecms制作网站时,有时我们需要查数据库的相关信息,例如... 2021-07-27
dedecms怎么实现文章标题-栏目名称-网站名导航本文介绍了在dedecms中,实现文章标题-栏目名称-网站名 导航的方... 2021-07-27
织梦dedecms当前文章关键词相同的文章最近在做一个站,想做一个功能,就是有一个div块里显示的是与当前文章关... 2021-07-30
织梦DEDECMS调用栏目地址(非标签)的代码调动栏目的地址,静态时为静态访问地址,动态浏览时为动态访问地址。 $s... 2021-07-22
彩色tags热门关键字代码刷新一次变换一次此代码优点: ◎ 无需修改任何源文件 ◎ CSS+JS文件控制,简单更... 2021-08-14
Dedecms关于文章上一篇和下一篇标题长度的设置方法使用织梦建站的确有很多需要注意的细节,小编今天同样是遇到了一个关于织梦... 2021-08-14
织梦搜索页提示信息修改在include/common.func.php文件中有两处提示信息,... 2021-07-22
让DEDECMS会员中,留言,订单等模板支持系统标签最近在仿员中心的时候发现默认会员模板中无法调用系统标签,记得之前有人教... 2021-07-27
织梦dedecms注册会员时增加字段步骤: 1、找到根目录下的/member/templets/reg-n... 2021-07-27
{dede:field name='softlinks'/}下载页dedecms标签修改织梦Dedecms的软件模型中,{dede:field name=so... 2021-08-09

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