original post discussing this bug here:
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=45658
here is the fix:
pop_moderate.asp
find the following (around line #206 and #269):
UpdateUser LoopMemberID, LoopPostDate
replace both of those lines with this:
UpdateUser LoopMemberID, LoopForumID, LoopPostDate
find the following (around line #535):
' ## UpdateUser - This will update the members table by adding to the total
' ## posts (and total topics if appropriate), and will also update
' ## the last forum post date and poster if appropriate.
sub UpdateUser(MemberID, PostDate)
dim UpdateLastPost
' -- Check to see if this post is the newest one for the member...
strSql = " SELECT M_LASTPOSTDATE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
set RsCheck = my_Conn.Execute (strSql)
if RsCheck("M_LASTPOSTDATE") < PostDate then
UpdateLastPost = "Y"
end if
rsCheck.Close
set rsCheck = nothing
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = (M_POSTS + 1)"
if UpdateLastPost = "Y" then
strSql = strSql & ", M_LASTPOSTDATE = '" & PostDate & "'"
end if
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end sub
and replace all of it with this:' ## UpdateUser - This will update the members table by adding to the total
' ## posts (and total topics if appropriate), and will also update
' ## the last forum post date and poster if appropriate.
sub UpdateUser(MemberID, LForumID, PostDate)
dim UpdateLastPost
' -- Check to see if this post is the newest one for the member...
set rsCheck = my_Conn.Execute("SELECT M_LASTPOSTDATE FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & MemberID)
if rsCheck("M_LASTPOSTDATE") < PostDate then
UpdateLastPost = "Y"
end if
rsCheck.Close
set rsCheck = nothing
set rsFCountMP = my_Conn.Execute("SELECT F_COUNT_M_POSTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & LForumID)
ForumCountMPosts = rsFCountMP("F_COUNT_M_POSTS")
rsFCountMP.close
set rsFCountMP = nothing
if UpdateLastPost = "Y" then
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LASTPOSTDATE = '" & PostDate & "'"
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
if ForumCountMPosts <> 0 then
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_POSTS = (M_POSTS + 1)"
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
end sub