Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of realizing thumbnail paging style of atlas with dream weaving CMS

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Dream weaving CMS Atlas thumbnail pagination style to achieve the method? This problem may be our daily study or work often see. I hope you learned something from this question. The following is the reference content brought to you by Xiaobian. Let's take a look together!

How does Dreamweaver CMS implement pagination style for thumbnail images?

Dream weaving CMS secondary development tutorial implementation Atlas thumbnail pagination style

Recommended Learning: Weaving Dreams CMS

Dream Weaving CMS 5.7 comes with three gallery styles by default. The template names are article_image.htm, article_image_cl.htm (Sina style) and article_image_new.htm (this is a graphic slide style only available in 5.7). Recently, when making a woman's atlas template, I found that dede's default atlas template could not achieve pagination style like the article. Many times I asked Du Niang and Gu Ge to no avail, so I carefully studied the dream weaving file and found that dream weaving can achieve this style (as shown below). Now share the method to everyone, this is also the dream weaving forum on everyone's hottest focus oh!

问题分析:

若要实现这种分页方式,第一在要在分页时把缩略图的地址也调用进去,可是打开分页标签文件一看,没有缩略图数据。那怎么办。我们只能通过二次开发进行新建一个专门用来图集分页调用的一个函数,如果要改动{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.=''.substr($ctag1->GetAtt('text'), 30).' ';$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.=''.substr($ctag1->GetAtt('text'),0,30).' ';}else{$litpic.=''.substr($ctag1->GetAtt('text'),0,30).' ';}$pagenum++;}}}return $litpic;}

最后就是模板的调用了,这就不再细说了,当然这只是一种方法!

感谢各位的阅读!看完上述内容,你们对织梦CMS实现图集缩略图分页样式的方法大概了解了吗?希望文章内容对大家有所帮助。如果想了解更多相关文章内容,欢迎关注行业资讯频道。

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report