hi
can i use this code to show latest forum post in wwf 8.3 ,
i use this cod in versione 7.9
tnx
<%
'#################################################
'# #
'# MELODIK #
''# #
''#
www.melodik.net #
'# #
'#################################################
Dim strLatestForumPostSubject
Dim strFirstPostMsg
Dim rsLatestPosts
Dim strTopicSubject
Dim NumberOfPosts
Dim rowType
Dim LastLatestPostsDateTime
Dim LastLatestPostsDate
Dim LastLatestPostsTime
Dim rsLatestPosts2
Dim sql2
%>
<%
NumberOfPosts = 0
Set rsLatestPosts = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblTopic.Topic_ID, tblTopic.Subject, tblTopic.Last_entry_date, tblForum.Forum_ID, tblForum.Forum_name, tblForum.[Read] FROM (tblForum INNER JOIN tblTopic ON tblForum.Forum_ID = tblTopic.Forum_ID) WHERE ((tblForum.Password) Is Null) ORDER BY tblTopic.Last_entry_date DESC;"
rsLatestPosts.Open strSQL, adoCon
Response.Write "<table cellpadding=""0"" cellspacing=""0"" width=""100%"">"
If rsLatestPosts.EOF Then
Response.Write "<tr><td class=""smText"">No Forum Posts Made</td></tr>" 'English
'Response.Write "<tr><td class=""smText"">Forumda yeni mesaj yok</td></tr>" ' Turkish
Else
Do while NOT rsLatestPosts.EOF And NumberOfPosts < 20
intForumID = CInt(rsLatestPosts("Forum_ID"))
intForumReadRights = CInt(rsLatestPosts("Read"))
Call forumPermisisons(intForumID, intGroupID, intForumReadRights, 0, 0, 0, 0, 0, 0, 0, 0, 0)
If rowType = strTableOddRowColour Then
rowType = strTableEvenRowColour
Else
rowType = strTableOddRowColour
end if
'If the user has no read rights then skip the post
If blnRead = True Then
If len(rsLatestPosts("Subject"))>40 then
strTopicSubject = left(rsLatestPosts("Subject"),40) & "..."
Else
strTopicSubject = rsLatestPosts("Subject")
strFirstPostMsg = removeHTML(strFirstPostMsg)
strFirstPostMsg = Mid(Trim(strFirstPostMsg), 1, 250)
End If
NumberOfPosts = NumberOfPosts + 1
LastLatestPostsDateTime = rsLatestPosts("Last_entry_date")
LastLatestPostsDate = DateFormat(LastLatestPostsDateTime, saryDateTimeData)
LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime, saryDateTimeData)
Set rsLatestPosts2 = Server.CreateObject("ADODB.Recordset")
sql2 = "SELECT tblThread.Thread_ID, tblThread.Topic_ID, tblAuthor.Username, tblAuthor.Author_ID FROM (tblAuthor INNER JOIN tblThread ON tblAuthor.Author_ID = tblThread.Author_ID) WHERE Topic_ID= "&rsLatestPosts("Topic_ID")&" order by Message_date desc"
rsLatestPosts2.Open sql2, adoCon
Response.Write("<tr bgcolor="""&rowType&"""><td class=""Text""><a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & "&get=last#"&rsLatestPosts2("Thread_ID")&""" target=""_blank"" class=""smLink"" title=""" & strFirstPostMsg & """ - ("&rsLatestPosts("Forum_name")&")"">" & strTopicSubject & "</a></td><td class=""smText"" >"&rsLatestPosts2("Username") &"</td><td class=""Text"" align=""right"" >" & LastLatestPostsDate & "-" & LastLatestPostsTime & "</td>")
End If
rsLatestPosts.MoveNext
If blnRead = True Then
If NOT rsLatestPosts.EOF Then Response.Write("</tr>")
End If
Loop
If NumberOfPosts = 0 Then
Response.Write "<tr><td class=""smText"">No Sufficient Permission to View Latest Forum Posts</td></tr>" 'English
'Response.Write "<tr><td class=""smText"">Son mesajlar gِrme yetkiniz yok</td></tr>" ' Turkish
End If
End If
Response.Write "</table>"
rsLatestPosts2.Close
Set rsLatestPosts2 = Nothing
rsLatestPosts.Close
Set rsLatestPosts = Nothing
%>