This is not a MOD persay... but rather an upgrade to some code.
Currently, when you edit a forum and try to edit members in an "Allowed Members" list, those members are shown in the order in which they were added to the list.
Simple JOIN query to the rescue... change the following SQL statement (in RED) and you should be on your way. I've added some surrounding code to better show where this is located. It starts on line 1463 in my post.asp file but will probably differ on yours.
File to edit: post.asp
Change this:
strSql = "SELECT MEMBER_ID "
strSql = strSql & " FROM " & strTablePrefix & "ALLOWED_MEMBERS "
strSql = strSql & " WHERE FORUM_ID = " & strRqForumID
To this:
strSql = "SELECT "& strTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID, "& strTablePrefix &"MEMBERS.M_NAME "
strSql = strSql & " FROM " & strTablePrefix & "ALLOWED_MEMBERS INNER JOIN " & strTablePrefix & "MEMBERS ON " & strTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID = " & strTablePrefix & "MEMBERS.MEMBER_ID "
strSql = strSql & " WHERE (((" & strTablePrefix & "ALLOWED_MEMBERS.FORUM_ID)=" & strRqForumID & ")) "
strSql = strSql & " ORDER BY " & strTablePrefix & "MEMBERS.M_NAME "
Surrounding Code For Reference
if rsMember.EOF then
recMemberCount = ""
else
allMemberData = rsMember.GetRows(adGetRowsRest)
recMemberCount = UBound(allMemberData,2)
meMEMBER_ID = 0
meM_NAME = 1
end if
rsMember.close
set rsMember = nothing
tmpStrUserList = ""
if strRqMethod = "EditForum" or strRqMethod = "EditURL" then
strSql = "SELECT "& strTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID, "& strTablePrefix &"MEMBERS.M_NAME "
strSql = strSql & " FROM " & strTablePrefix & "ALLOWED_MEMBERS INNER JOIN " & strTablePrefix & "MEMBERS ON " & strTablePrefix & "ALLOWED_MEMBERS.MEMBER_ID = " & strTablePrefix & "MEMBERS.MEMBER_ID "
strSql = strSql & " WHERE (((" & strTablePrefix & "ALLOWED_MEMBERS.FORUM_ID)=" & strRqForumID & ")) "
strSql = strSql & " ORDER BY " & strTablePrefix & "MEMBERS.M_NAME "
set rsAllowedMember = Server.CreateObject("ADODB.Recordset")
rsAllowedMember.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsAllowedMember.EOF then
recAllowedMemberCount = ""
else
allAllowedMemberData = rsAllowedMember.GetRows(adGetRowsRest)
recAllowedMemberCount = UBound(allAllowedMemberData,2)
amMEMBER_ID = 0
end if
I'm fairly new to the Snitz code.... so use this at your own expense.
Gandiel