Find the following beginning on line 66 of forum.asp:Select Case strtopicsortord
Case "asc"
strSortOrd = " ASC"
Case Else
strSortOrd = " DESC"
strtopicsortord = "desc"
End Select
Select Case strtopicsortfld
Case "topic"
strSortCol = "T_SUBJECT" & strSortOrd
Case "author"
strSortCol = "M_NAME" & strSortOrd
Case "replies"
strSortCol = "T_REPLIES" & strSortOrd
Case "views"
strSortCol = "T_VIEW_COUNT" & strSortOrd
Case "lastpost"
strSortCol = "T_LAST_POST" & strSortOrd
Case Else
strtopicsortfld = "lastpost"
strSortCol = "T_LAST_POST" & strSortOrd
End Select
strQStopicsort = "FORUM_ID=" & Forum_ID
And nest another select statement within the "else" case of both to check what the Forum_ID is and set the variable accordingly, where x is the ID of your forum:Select Case strtopicsortord
Case "asc"
strSortOrd = " ASC"
Case Else
Select Case FORUM_ID
Case x
strSortOrd = " ASC"
strtopicsortord = "asc"
Case Else
strSortOrd = " DESC"
strtopicsortord = "desc"
End Select
End Select
Select Case strtopicsortfld
Case "topic"
strSortCol = "T_SUBJECT" & strSortOrd
Case "author"
strSortCol = "M_NAME" & strSortOrd
Case "replies"
strSortCol = "T_REPLIES" & strSortOrd
Case "views"
strSortCol = "T_VIEW_COUNT" & strSortOrd
Case "lastpost"
strSortCol = "T_LAST_POST" & strSortOrd
Case Else
Select Case FORUM_ID
Case x
strtopicsortfld = "topic"
strSortCol = "T_SUBJECT" & strSortOrd
Case Else
strtopicsortfld = "lastpost"
strSortCol = "T_LAST_POST" & strSortOrd
End Select
End Select
I've used a select statement rather than an if statement as it makes it more efficient if you want to set different criteria for other forums at some stage in the future.