婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > dedecms 織夢(mèng)5.7 圖集實(shí)現(xiàn)分頁(yè)功能

dedecms 織夢(mèng)5.7 圖集實(shí)現(xiàn)分頁(yè)功能

POST TIME:2020-04-12 22:25

第一步:在圖集模板里加入分頁(yè)代碼:{dede:pagebreak/}

第二步:打開(kāi)arc_archives_class.php,在include目錄下,在結(jié)尾處加上以下代碼:

/**
* 獲得動(dòng)態(tài)頁(yè)面圖集中圖片縮略列表
*
* @access public
* @param int $totalPage 總頁(yè)數(shù)
* @param int $nowPage 當(dāng)前頁(yè)數(shù)
* @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;
}
/**
* 獲得靜態(tài)頁(yè)面圖集中圖片縮略列表
*
* @access public
* @param int $totalPage 總頁(yè)數(shù)
* @param int $nowPage 當(dāng)前頁(yè)數(shù)
* @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;
}



收縮
  • 微信客服
  • 微信二維碼
  • 電話(huà)咨詢(xún)

  • 400-1100-266
主站蜘蛛池模板: 高密市| 喀喇沁旗| 宜章县| 沂水县| 桂东县| 望城县| 丰顺县| 安丘市| 青河县| 洛扎县| 日照市| 进贤县| 泉州市| 阿坝县| 葫芦岛市| 阿巴嘎旗| 丰都县| 屏南县| 吉木乃县| 松潘县| 开鲁县| 波密县| 顺平县| 广丰县| 鄂州市| 吴桥县| 紫金县| 旬邑县| 六盘水市| 广安市| 兴海县| 临江市| 边坝县| 武威市| 舞阳县| 玛沁县| 潞城市| 萍乡市| 重庆市| 辽宁省| 肇东市|