只允许客人看到部分帖子主体内容FOR8.2
复制内容到剪贴板代码:
把代码放到这里吧~~~ 希望大家喜欢。。。 如果有高手可以把这个小改动优化一下~~ 谢谢~~
1、打开dispbbs.asp文件,找到:
If InStr(Ubblists,",39,") > 0 Then
TPL_Echo Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,0) )
Else
TPL_Echo Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,1) )
End If
改成:
If InStr(Ubblists,",39,") > 0 Then
dim body
If Dvbbs.userid=0 then
response.write"您还没有登陆,欲知全文内容,请选择[注册]或者[登陆]。"
response.write"
"
response.write"文章简介:"
body=cstr(len(Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,0) )))
j=body/3 '取文章的几分之几
TPL_Echo left(Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,0) ),j)
Else
TPL_Echo Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,0) )
End If
Else
If Dvbbs.userid=0 then
response.write"您还没有登陆,欲知全文内容,请选择[注册]或者[登陆]。"
response.write"
"
response.write"文章简介:"
body=cstr(len(Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,1) )))
j=body/3 '取文章的几分之几
TPL_Echo left(Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,1) ),j)
Else
TPL_Echo Dvbbs.ChkBadWords( Dv_ubb.Dv_UbbCode(G_ItemList(4, G_Floor),i,1,1) )
End If
End If
2、打开TopicOther.asp文件,找到:
Templist=Replace(Templist,"{$body}",SimJsReplace(dv_ubb.Dv_UbbCode(SQL(3,i),SQL(4,i),1,1)))
改为:
If Dvbbs.userid=0 then
Dvbbs.AddErrCode(6)Dvbbs.Showerr()
Else
Templist=Replace(Templist,"{$body}",SimJsReplace(dv_ubb.Dv_UbbCode(SQL(3,i),SQL(4,i),1,1)))
End if
3、修改Xhtml无图版 和 Xslt无图版 打开dv_rss.asp文件,找到:
If InStr(Ubblists,",39,") > 0 Then
ChildNode.appendChild(XmlDom.createNode(1,"description","")).text = Dv_ubb.Dv_UbbCode(postbody,Cint(ChildNode.getAttribute("usergroupid")),1,0)
Else
ChildNode.appendChild(XmlDom.createNode(1,"description","")).text = Dv_ubb.Dv_UbbCode(postbody,Cint(ChildNode.getAttribute("usergroupid")),1,1)
End If
改为:
If InStr(Ubblists,",39,") > 0 Then
dim body,j
If Dvbbs.userid=0 then
body=cstr(len(Server.HtmlEnCode(postbody)))
j=body/3
ChildNode.appendChild(XmlDom.createNode(1,"description","")).text = "您还没有登陆,欲知全文内容,请选择[注册]或者[登陆]。
文章简介:"&left(Dv_ubb.Dv_UbbCode(postbody,Cint(ChildNode.getAttribute("usergroupid")),1,0),j)
Else
ChildNode.appendChild(XmlDom.createNode(1,"description","")).text = Dv_ubb.Dv_UbbCode(postbody,Cint(ChildNode.getAttribute("usergroupid")),1,0)
End If
Else
If Dvbbs.userid=0 then
body=cstr(len(Server.HtmlEnCode(postbody)))
j=body/3
ChildNode.appendChild(XmlDom.createNode(1,"description","")).text = "您还没有登陆,欲知全文内容,请选择[注册]或者[登陆]。
文章简介:"&left(Dv_ubb.Dv_UbbCode(postbody,Cint(ChildNode.getAttribute("usergroupid")),1,1),j)
Else
ChildNode.appendChild(XmlDom.createNode(1,"description","")).text = Dv_ubb.Dv_UbbCode(postbody,Cint(ChildNode.getAttribute("usergroupid")),1,1)
End If
End If