aspcms采集的内容导入到列表里,前台不显示,非要编辑保存才显示

需要修改plug/collect/AspCms_CollectFun.asp这个文件中的addContent函数
修改前

  1. Sub addContent

  2. dim id : id=getForm("id","both")

  3. if isnul(id) then alertMsgAndGo "请选择要操作的内容","-1"

  4. dim SortID: SortID=getForm("moveSortID","both")

  5. if not isnum(SortID) or SortID="0" then alertMsgAndGo"请选择分类","-1"

  6. LanguageID=cint(session("languageID")) 

  7. dim isdel:isdel=getForm("isdel","both")

  8. sql="insert into {prefix}Content(Title,[Content],LanguageID, SortID, GroupID, Exclusive, TitleColor, ContentStatus, IsTop, IsRecommend, IsImageNews, IsHeadline, IsFeatured, IsGenerated, ContentOrder, Visits,AddTime,IsOutlink) select C_Title,C_Content,"&LanguageID&","& SortID &",2,'>=','#000000',1,0,0,0,0,0,0,0,0,'"& now() &"',0 from {prefix}Collect_Content where C_ContentID in("&id&",)"

  9. conn.exec sql,"exe"

  10. if isdel="del" then

  11. sql="delete from {prefix}Collect_Content where C_ContentID in("&id&")"

  12. conn.exec sql,"exe"

  13. end if

  14. sortType=getForm("sortType", "post")

  15. alertMsgAndGo"添加成功", getPageName()&"?sortType="&sortType&"&sortid="&sortid&"&keyword="&keyword&"&page="&page&"&psize="&psize&"&order="&order&"&ordsc="&ordsc

  16. End Sub

复制代码


增加了红色的字体
修改后
Sub addContent
dim id : id=getForm("id","both")
if isnul(id) then alertMsgAndGo "请选择要操作的内容","-1"
dim SortID: SortID=getForm("moveSortID","both")
if not isnum(SortID) or SortID="0" then alertMsgAndGo"请选择分类","-1"
LanguageID=cint(session("languageID")) 
dim isdel:isdel=getForm("isdel","both")
sql="insert into {prefix}Content(Title,[Content],LanguageID, SortID, GroupID, Exclusive, TitleColor, ContentStatus, IsTop, IsRecommend, IsImageNews, IsHeadline, IsFeatured, IsGenerated, ContentOrder, Visits,AddTime,IsOutlink,TimeStatus) select C_Title,C_Content,"&LanguageID&","& SortID &",2,'>=','#000000',1,0,0,0,0,0,0,0,0,'"& now() &"',0,0 from {prefix}Collect_Content where C_ContentID in("&id&",)"
conn.exec sql,"exe"
if isdel="del" then
  sql="delete from {prefix}Collect_Content where C_ContentID in("&id&")"
  conn.exec sql,"exe"
end if
sortType=getForm("sortType", "post")
alertMsgAndGo"添加成功", getPageName()&"?sortType="&sortType&"&sortid="&sortid&"&keyword="&keyword&"&page="&page&"&psize="&psize&"&order="&order&"&ordsc="&ordsc
End Sub


皖公网安备 34182202000128号