加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

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

发布时间:2020-12-14 03:55:15 所属栏目:Dedecms 来源:网络整理
导读:复制代码 代码如下: Fields['userip'] = $this->addTableRow['userip']; 复制代码 代码如下: Fields['body2'] = $this->addTableRow['body']; 复制代码 代码如下: dsql->ExecuteNoneQuery("Update `dede_archives` SET ismake=1 WHERE id='".$this->ArcID."'

复制代码
代码如下:
Fields['userip'] = $this->addTableRow['userip'];

复制代码
代码如下:
Fields['body2'] = $this->addTableRow['body'];

复制代码
代码如下:
dsql->ExecuteNoneQuery("Update `dede_archives` SET ismake=1 WHERE id='".$this->ArcID."'");

复制代码
代码如下:
TotalPage > 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'); } } //阅读全文结束

复制代码
代码如下:
ShortName."' target='_self'><"; } 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; }

复制代码
代码如下:
ShortName."'>阅读全文";

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读