okay so make these adjustments to display only posts from ONE forum...
Change this...
intResults = 10
intAge = 30
lastDate = DateToStr(DateAdd("d",-(intAge),Now()))
strMethod = "last_post"
subjectlength = 122
subjectlengthe = 60
intPage = 1
to this...
intResults = 10
intAge = 30
lastDate = DateToStr(DateAdd("d",-(intAge),Now()))
strMethod = "last_post"
subjectlength = 122
subjectlengthe = 60
intPage = 1
displayForum = 26 'enter the FORUM_ID, put 111111 for display all.
and then change the SQL statements from this...
strSql = "SELECT F.F_SUBJECT, T.TOPIC_ID, T.T_AUTHOR, T.T_SUBJECT, T.T_MESSAGE"
strSql = strSql & ", T.T_LAST_POST, T.T_LAST_POST_REPLY_ID, T.T_REPLIES, T.T_DATE, M.M_NAME"
strSql = strSql & ", MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME"
strSql = strSql & " FROM ((" & strTablePrefix & "FORUM F LEFT JOIN " & strTablePrefix & "TOPICS T"
strSql = strSql & " ON F.FORUM_ID = T.FORUM_ID) LEFT JOIN " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " ON T.T_AUTHOR = M.MEMBER_ID) LEFT JOIN " & strMemberTablePrefix & "MEMBERS MEMBERS_1"
strSql = strSql & " ON T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID"
strSql = strSql & " WHERE T.T_STATUS < 2 ORDER BY T.T_LAST_POST DESC"
to this...
strSql = "SELECT F.F_SUBJECT, T.TOPIC_ID, T.T_AUTHOR, T.T_SUBJECT, T.T_MESSAGE"
strSql = strSql & ", T.T_LAST_POST, T.T_LAST_POST_REPLY_ID, T.T_REPLIES, T.T_DATE, M.M_NAME"
strSql = strSql & ", MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME"
strSql = strSql & " FROM ((" & strTablePrefix & "FORUM F LEFT JOIN " & strTablePrefix & "TOPICS T"
strSql = strSql & " ON F.FORUM_ID = T.FORUM_ID) LEFT JOIN " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " ON T.T_AUTHOR = M.MEMBER_ID) LEFT JOIN " & strMemberTablePrefix & "MEMBERS MEMBERS_1"
strSql = strSql & " ON T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID"
if displayforum <> 111111 then
strSql = strSql & " WHERE T.T_STATUS < 2"
strSql = strSql & " AND F.FORUM_ID = " & displayForum & " ORDER BY T.T_LAST_POST DESC"
else
strSql = strSql & " WHERE T.T_STATUS < 2 ORDER BY T.T_LAST_POST DESC"
end if
<