织梦采集跳过相同标题文章采集

织梦采集跳过相同标题文章采集,第1张

概述织梦采集到相同文章时,织梦会重复添加文章,我们要让相同的文章跳过采集 打开 /dede/article_add.php 找到 if(empty($click)) $click = ($cfg_arc_click==-1 ? mt_rand(50, 200) : $cfg_arc_click); 在它的下面加入 if(!empty($title) $cfg_check_title==Y)

织梦采集到相同文章时,织梦会重复添加文章,我们要让相同的文章跳过采集

打开 /dede/article_add.PHP 找到

if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50,200) : $cfg_arc_click);

在它的下面加入

if(!empty($Title) && $cfg_check_Title=='Y'){$row = $dsql->Getone("SELECT ID FROM `dede_archives` WHERE Title liKE '$Title' ");if(is_array($row)){if(empty($typeID)){ShowMsg("请指定文档的栏目!","-1");exit();}if(empty($channelID)){ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1");exit();}if(!CheckChannel($typeID,$channelID)){ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1");exit();}if(!TestPurvIEw('a_New')){CheckCatalog($typeID,"对不起,你没有 *** 作栏目 {$typeID} 的权限!");}//对保存的内容进行处理$ID = $row['ID'];$pubdate = GetMkTime($pubdate);$sortrank = AddDay($pubdate,$sortup);$ismake = $isHTML==0 ? -1 : 0;$autokey = 1;$Title = dede_HTMLspecialchars(cn_substrR($Title,$cfg_Title_maxlen));$shortTitle = $shortTitle;$color =  cn_substrR($color,7);$writer =  $writer;$source = $source;$description = cn_substrR($description,250);$keywords = trim(cn_substrR($keywords,60));$filename = trim(cn_substrR($filename,40));$isremote  = (empty($isremote)? 0  : $isremote);$serviterm=empty($serviterm)? "" : $serviterm;if(!TestPurvIEw('a_Check,a_AccCheck,a_MyCheck')){$arcrank = -1;}$adminID = $cuserLogin->getUserID();//处理上传的缩略图if(empty($ddisremote)){$ddisremote = 0;}$litpic = GetDDImage('none',$picname,$ddisremote);//分析body里的内容$body = AnalyseHTMLBody($body,$description,$litpic,$keywords,'HTMLtext');//分析处理附加表数据$inadd_f = '';$inadd_v = '';if(!empty($dede_addonfIElds)){$addonfIElds = explode(';',$dede_addonfIElds);$inadd_f = '';$inadd_v = '';if(is_array($addonfIElds)){foreach($addonfIElds as $v){if($v==''){continue;}$vs = explode(',',$v);if($vs[1]=='HTMLtext'||$vs[1]=='textdata') //HTML文本特殊处理{${$vs[0]} = AnalyseHTMLBody(${$vs[0]},$vs[1]);}else{if(!isset(${$vs[0]})){${$vs[0]} = '';}${$vs[0]} = GetFIEldValueA(${$vs[0]},$vs[1],$ID);}$inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'";}}}//处理图片文档的自定义属性if($litpic!='' && !preg_match("

总结

以上是内存溢出为你收集整理的织梦采集跳过相同标题文章采集全部内容,希望文章能够帮你解决织梦采集跳过相同标题文章采集所遇到的程序开发问题。

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

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

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

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

发表评论

登录后才能评论

评论列表(0条)

保存