高手请帮我,关于动网论坛博客

发布时间:2024-05-11 19:22 发布:上海旅游网

问题描述:

我是想把博客首页里面最新信息里面的显示作者改成显示文章所在的博客名,博客名和文章是存不在同表的。

bokeindex.aspjfdfddffdsff
'最新主题
Function Page_NewTopicList()
Dim Nodes,ChildNode
Dim TempHtml,TempStr
DvBoke_Sys.GetNode = "topiclist"
DvBoke_Sys.SqlStr = "Select Top 8 TopicID,CatID,sCatID,UserID,UserName,Title,PostTime,Child,Hits,IsView,IsLock,sType,LastPostTime,IsBest From [Dv_Boke_Topic] where sType<>2 and IsLock<3 Order By TopicID desc "
'DvBoke_Sys.SqlStr = "Select BokeName From [Dv_Boke_User] where UserID='select UserID From [Dv_Boke_topic] where sType<>2 and IsLock<3 Order By TopicID desc'"
DvBoke_Sys.GetData()
Dim Title,LastPostTime,iLastPostTime
For Each ChildNode In DvBoke_Sys.Nodes.selectNodes("rs:data/z:row")
TempHtml = DvBoke.Page_Strings(22).text
Title = ChildNode.getAttribute("title")
If Len(Title)>16 Then
Title = Left(Title,16) &"..."
ElseIf Title="" Then
Title = "..."
End If
Title = Dvbbs.HTMLEncode(Title)
LastPostTime = ChildNode.getAttribute("lastposttime")
iLastPostTime = "20" & Right(Year(LastPostTime),2) & "-"
If Len(Month(LastPostTime))=1 Then
iLastPostTime = iLastPostTime & "0" & Month(LastPostTime) & "-"
Else
iLastPostTime = iLastPostTime & Month(LastPostTime) & "-"
End If
If Len(Day(LastPostTime))=1 Then
iLastPostTime = iLastPostTime & "0" & Day(LastPostTime)
Else
iLastPostTime = iLastPostTime & Day(LastPostTime)
End If
TempHtml = Replace(TempHtml,"{$CatName}",DvBoke.SysChatCat.selectSingleNode("rs:data/z:row[@scatid = '"&ChildNode.getAttribute("scatid")&"']").getAttribute("scattitle"))
TempHtml = Replace(TempHtml,"{$TopicID}",ChildNode.getAttribute("topicid"))
TempHtml = Replace(TempHtml,"{$UserID}",ChildNode.getAttribute("userid"))
TempHtml = Replace(TempHtml,"{$Title}",Title)
TempHtml = Replace(TempHtml,"{$PostTitle}",Dvbbs.HtmlEncode(ChildNode.getAttribute("username")))
TempHtml = Replace(TempHtml,"{$LastPostTime}",iLastPostTime)
TempStr = TempStr & TempHtml
Next
Page_NewTopicList = TempStr
End Function
index.xslt页里的相关代码:
<xsl:variable name="String_12" title="Page_NewPostList">
<![CDATA[
<!-- 最新评论 -->
<table cellSpacing="0" cellPadding="2" border="0" width="98%" align="center">
<tr>
<td class="t_left" width="8px" height="25px"><img src="{$skinpath}images/reply_left.gif"/></td>
<td class="t_title1" width="94px"><img src="{$skinpath}images/new_reply.gif" align="absMiddle"/> 最新评论</td>
<td class="t_title1" width="*"><span style="float:right;">|</span>标    题</td>
<td class="t_title1" width="85px"><span style="float:right;">|</span>作者</td>
<td class="t_title1" width="100px">更新时间</td>
<td class="t_right" width="8px"><img src="{$skinpath}images/reply_right.gif"/></td>
</tr>
{$Page_NewPostList}
</table>
]]>
</xsl:variable>

问题解答:

高手请帮我,关于动网论坛博客这个旅游问答期待您的解答,请登录账号或关注微信公众号回答这个问题。

热点新闻