刚才在商业区看到的,可能对你有帮助
如果是自带采集器不想重复标题入库,可以打开
admin/collect/Collect_ItemCollecFast.asp
找到入库部分代码
Sub SaveArticle()
on error resume next
Dim FsoType
FsoType = conn.Execute("select FsoType from KS_class where id='" & ClassID & "'")(0)
ArticleID = KS.GetInfoID(ChannelID) '取文章的唯一ID
Set Rs = Server.CreateObject("adodb.recordset")
Sql = "select top 1 * from "& KS.C_S(ChannelID,2) & " where Title='" & Title & "' and Tid='" & ClassID & "'"
If IntoBase = 1 Then '直接插入数据库
Rs.Open Sql, conn, 1, 3
Else
Rs.Open Sql, ConnItem, 1, 3
End If
' If Rs.EOF Then
Rs.AddNew
Rs("NewsID") = ArticleID
Rs("Tid") = ClassID
Rs("Keywords") = Key
Rs("TitleType") = ""
Rs("Title") = Title
Rs("ShowComment") = ShowComment
Rs("TitleFontColor") = ""
Rs("TitleFontType") = ""
Rs("ArticleContent") = Content
Rs("Intro")=KS.GotTopic(KS.LoseHtml(Content),200)
Rs("Author") = Author
Rs("Origin") = KS.GotTopic(CopyFrom,50)
Rs("Rank") = Stars '阅读星级
Rs("Hits") = Hits
Rs("AddDate") = UpDateTime '更新时间
Rs("SpecialID") = SpecialID
Rs("JSID") = ""
Rs("TemplateID") = TemplateID '模板
Rs("Fname") = KS.GetFileName(FsoType, UpDateTime, FnameType)
Rs("ArticleInput") = KS.GotTopic(Inputer,50)
Rs("Changes") = 0
Rs("Recommend") = Recommend
Rs("Rolls") = Rolls
If ThumbType=1 Then
Rs("PicUrl")=ThumbUrl
Rs("PicNews")=1
Else
If PicNews=1 And DefaultPicUrl<>"" Then
Rs("PicUrl")=DefaultPicUrl
Rs("PicNews")=1
Else
Rs("PicNews") = 0
End If
End If
Rs("Strip")=0
Rs("Popular") = Popular
Rs("Verific") = Verific '审核与否
Rs("Slide") = 0
Rs("Comment") = Comment
' Rs("OrderID") = 1
If IsArray(Arr_Field) Then
For StepID=0 To Ubound(Arr_Field,2)
Dim CBody:Cbody=KMCObj.GetBody(NewsCode, Arr_Field(2,StepID),Arr_Field(3,StepID), False, False)
If Cbody <> "Error" and Cbody <> "" Then
rs(Arr_Field(1,StepID))=KMCObj.FpHtmlEnCode(Cbody)
End If
Next
End IF
Rs.Update
rs.movelast
if rs("fname")="ID" Then
rs("fname")=rs("id") & fnametype
rs.update
end if
' End If
Rs.Close
Set Rs = Nothing
上面两次加红色前面的单张号删除,这样同一个栏目下如果相同就不会入库