花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來到素材無憂網(wǎng),按 + 收藏我們
登錄 注冊 退出 找回密碼

dedecms織夢采集相同標(biāo)題文章跳過采集方法

時間: 2018-12-05 08:31 閱讀: 作者:素材無憂網(wǎng)

采集到相同文章時,織夢會重復(fù)添加文章,我們要讓相同的文章跳過采集

 

打開 /dede/article_add.php 找到

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

 

在它的下面加入

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 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("文檔為非指定的類型,請檢查你發(fā)布內(nèi)容的表單是否合法!","-1");                             exit();                    }                    if(!CheckChannel($typeid,$channelid))                    {                             ShowMsg("你所選擇的欄目與當(dāng)前模型不相符,請選擇白色的選項!","-1");                             exit();                    }                    if(!TestPurview('a_New'))                    {                             CheckCatalog($typeid,"對不起,你沒有操作欄目 {$typeid} 的權(quán)限!");                    }                                                            //對保存的內(nèi)容進(jìn)行處理                    $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里的內(nèi)容                    $body = AnalyseHtmlBody($body,$description,$litpic,$keywords,'htmltext');                       //分析處理附加表數(shù)據(jù)                    $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]},$description,$litpic,$keywords,$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("

版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!

轉(zhuǎn)載請注明: dedecms織夢采集相同標(biāo)題文章跳過采集方法

標(biāo)簽:  
相關(guān)文章
模板推薦