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

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

打开 /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("文档为非指定的类型,请检查你发布内容的表单是否合法!","-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;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/af1924cf4fb6a4c6ccb505f62092dd38.html