dedecms5.7文章二次开发实现阅读全文功能的方法

dedecms5.7文章二次开发实现阅读全文功能的方法,第1张

概述本文实例讲述了dedecms5.7文章二次开发实现阅读全文功能的方法。分享给大家供大家参考。具体分析如下: 阅读全文功能其实在很多的流行站点都有的,比如网易,新浪等,随着文章内容的增加,当一个页面有多个分页的时候,就会显示出这个“在本页阅读全文”的链接

addtableRow['userip'];

addtableRow['body'];

ExecuteNonequery("Update `dede_archives` SET ismake=1 WHERE ID='".$this->ArcID."'");

1) { //用正则匹配把分页符去掉 $this->FIElds['body2'] = preg_replace('/# p#副标题# e#/U','',$this->FIElds['body2']); $this->SplitFIElds = explode("#p2222#",$this->FIElds['body2']); $this->FIElds['tmpTitle'] = (emptyempty($this->FIElds['tmpTitle']) ? $this->FIElds['Title'] : $this->FIElds['tmpTitle']); $this->FIElds['Title'] = $this->FIElds['tmpTitle']; $this->TotalPage = count($this->SplitFIElds); $this->FIElds['totalpage'] = $this->TotalPage; $TRUEfilenameall = $this->GetTruePath().$fileFirst."_all.".$this->Shortname; $this->ParseDMFIElds(1,0); $this->dtp->Saveto($TRUEfilenameall); if($cfg_remote_site=='Y' && $isremote == 1) { //分析远程文件路径 $remotefile = str_replace(DEDEROOT,$TRUEfilename); $localfile = '..'.$remotefile; //创建远程文件夹 $remotedir = preg_replace("#[^/]*.HTML#",$remotefile); $this->ftp->rmkdir($remotedir); $this->ftp->upload($localfile,$remotefile,'ascii'); }} //阅读全文结束

<"; } else { $PageList.="NameFirst."_".$nPage.".".$this->Shortname."' target='_self'><"; } } for($i=1;$i<=$totalPage;$i++) { if($i==1) { if($nowPage!=1) { $PageList.="NameFirst.".".$this->Shortname."' target='_self'>1"; } else { $Pagelist.="1"; } } else { $n = $i; if($NowPage!=$i) { $Pagelist.="nameFirst."_".$i.".".$this->Shortname."' target='_self'>".$n.""; } else { $Pagelist.="{$n}"; } } } if($lPage <= $totalPage) { $PageList.="NameFirst."_".$lPage.".".$this->Shortname."' target='_self'>>"; } else { $Pagelist.= ">"; } $Pagelist.= "nameFirst."_all.".$this->Shortname."'>阅读全文"; return $Pagelist; }

阅读全文";

以上是内存溢出为你收集整理的dedecms5.7文章二次开发实现阅读全文功能的方法全部内容,希望文章能够帮你解决dedecms5.7文章二次开发实现阅读全文功能的方法所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zz/1008993.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存