Mark,
When I posted my previous reply I had to post and run (was time for dinner).
After a nice dinner I looked a bit longer at the code in post.asp
If you make the blue code changes in post.asp it will only show the newest X replies (sorted descending, meaning newest first). The number of replies shown is the same as the number of posts normally shown on one page (set in the Admin Options).
The code shown below starts at about line 1012 in post.asp:
'## Forum_SQL - Get all replies to Topic from the DB
strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "REPLY.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR "
strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE DESC"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn, 3
strI = 0
intRecordcount = 1
if rs.EOF or rs.BOF then
Response.Write ""
else
Response.Write("<tr>")
Response.Write("<td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>")
Response.Write("L A T E S T R E P L I E S (Newest First)</font></b></td></tr>")
rs.movefirst
do until (rs.EOF or (intRecordCount > strPageSize))
if strI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <TR>" & vbCrLf & _
" <TD bgcolor='" & CColor & "' valign='top'"
if lcase(strTopicNoWrapLeft) = "1" then
Response.Write " nowrap"
end if
Response.Write "><b><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & ChkString(rs("M_NAME"),"display") & "</font></b></td>" & vbCrLf & _
" <TD bgcolor='" & CColor & "' valign='top'"
if lcase(strTopicNoWrapRight) = "1" then
Response.Write " nowrap"
end if
Response.Write "><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & formatStr(rs("R_MESSAGE")) & "</font></td>" & vbCrLf & _
" </tr>" & vbCrLf
rs.MoveNext
intRecordcount = intRecordcount + 1
strI = strI + 1
if strI = 2 then
strI = 0
end if
loop
end if
Seeing the large number of replies on some of the Mod-topics this might be something to add to the source code..... (Mike ?)
Pierre<