Corrected 6 Jun 2003
We have found it useful to show the original topic post date when topics are listed, as shown below:
This requires changes to FORUM.ASP in four places, and (optionally) changes to ACTIVE.ASP in four places. The line numbers given are for a forum with several mods, so your line numbers may be different.
===== START OF MOD CHANGE LIST =====
FORUM.ASP
Around line 240
Where the SQL Select statement is built, add the T.T_DATE field between T.T_LAST_POST and T.T_LAST_POST_AUTHOR as shown in red (note: I also have the Poll mod installed so your code may not match mine exactly)
'## Forum_SQL - Get all topics from DB
'################### Poll Mod - Added T.T_ISPOLL to next line ###################
strSql ="SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, T.T_ISPOLL,"
'## MOD TOPIC POST DATE - added T.T_DATE
strSql = strSql & "T.T_AUTHOR, T.T_STICKY, T.T_REPLIES, T.T_UREPLIES, T.T_LAST_POST, T.T_DATE, T.T_LAST_POST_AUTHOR, "
strSql = strSql & "T.T_LAST_POST_REPLY_ID, M.M_NAME, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME "
Around line 465
Assign a field sequence number to the variable tT_TOPIC_POST and renumber the subsequent entries. Note that your field numbers may vary, and that you must increment all the field numbers following the inserted field so that the definitions are all sequential and consecutive
tT_AUTHOR = 7
tT_STICKY = 8
tT_REPLIES = 9
tT_UREPLIES = 10
tT_LAST_POST = 11
'## MOD TOPIC POST DATE
tT_TOPIC_POST = 12
tT_LAST_POST_AUTHOR = 13
tT_LAST_POST_REPLY_ID = 14
tM_NAME = 15
tLAST_POST_AUTHOR_NAME = 16
Around line 480, find the code indicated, and add the two lines in red:
Topic_Status = arrTopicData(tT_STATUS, iTopic)
Topic_CatID = arrTopicData(tCAT_ID, iTopic)
Topic_ForumID = arrTopicData(tFORUM_ID, iTopic)
Topic_ID = arrTopicData(tTOPIC_ID, iTopic)
Topic_ViewCount = arrTopicData(tT_VIEW_COUNT, iTopic)
Topic_Subject = arrTopicData(tT_SUBJECT, iTopic)
Topic_Author = arrTopicData(tT_AUTHOR, iTopic)
Topic_Sticky = arrTopicData(tT_STICKY, iTopic)
Topic_Replies = arrTopicData(tT_REPLIES, iTopic)
Topic_UReplies = arrTopicData(tT_UREPLIES, iTopic)
Topic_LastPost = arrTopicData(tT_LAST_POST, iTopic)
'## MOD TOPIC POST DATE
Topic_TopicPost = arrTopicData(tT_TOPIC_POST, iTopic)
Topic_LastPostAuthor = arrTopicData(tT_LAST_POST_AUTHOR, iTopic)
Topic_LastPostReplyID = arrTopicData(tT_LAST_POST_REPLY_ID, iTopic)
Topic_MName = arrTopicData(tM_NAME, iTopic)
Topic_LastPostAuthorName = arrTopicData(tLAST_POST_AUTHOR_NAME, iTopic)
Around line 565, find the line indicated and replace it with the three lines in red
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewLine
is replaced by
'## MOD TOPIC POST DATE
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a><br />" & vbNewline & _
"<font size=""" & strFooterFontSize & """> Begun " & ChkDate(Topic_TopicPost,"",false) & "</font></span> </font>" & vbNewLine
ACTIVE.ASP
Around line 248 add the lines indicated in red, in the positions shown
'## MOD TOPIC POST DATE added T.T_DATE
strSql = "SELECT F.FORUM_ID, " & _
"F.F_SUBJECT, " & _
"F.F_SUBSCRIPTION, " & _
"F.F_STATUS, " & _
"C.CAT_ID, " & _
"C.CAT_NAME, " & _
"C.CAT_SUBSCRIPTION, " & _
"C.CAT_STATUS, " & _
"T.T_STATUS, " & _
"T.T_VIEW_COUNT, " & _
"T.TOPIC_ID, " & _
"T.T_ISPOLL, " &_
"T.T_SUBJECT, " & _
"T.T_AUTHOR, " & _
"T.T_REPLIES, " & _
"T.T_UREPLIES, " & _
"M.M_NAME, " & _
"T.T_LAST_POST_AUTHOR, " & _
"T.T_LAST_POST, " & _
"T.T_DATE, " & _
"T.T_LAST_POST_REPLY_ID, " & _
"MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME, " & _
"F.F_PRIVATEFORUMS, " & _
"F.F_PASSWORD_NEW " & _
"FROM " & strMemberTablePrefix & "MEMBERS M, " & _
strTablePrefix & "FORUM F, " & _
strTablePrefix & "TOPICS T, " & _
strTablePrefix & "CATEGORY C, " & _
strMemberTablePrefix & "MEMBERS MEMBERS_1 " & _
"WHERE T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID "
Around line 444, find the code indicated, and add the code in red. Note that your field numbers may vary, and that you must increment all the field numbers following the inserted field so that the definitions are all sequential and consecutive:
fT_SUBJECT = 12
fT_AUTHOR = 13
fT_REPLIES = 14
fT_UREPLIES = 15
fM_NAME = 16
fT_LAST_POST_AUTHOR = 17
fT_LAST_POST = 18
'## MOD TOPIC POST DATE
fT_POST_DATE = 19
fT_LAST_POST_REPLY_ID = 20
fLAST_POST_AUTHOR_NAME = 21
fF_PRIVATEFORUMS = 22
fF_PASSWORD_NEW = 23
Around line 480, add the lines shown in red:
Topic_Last_Post_Author = allActiveTopics(fT_LAST_POST_AUTHOR,RowCount)
Topic_Last_Post = allActiveTopics(fT_LAST_POST,RowCount)
'## MOD TOPIC POST DATE
Topic_Post_Date = allActiveTopics(fT_POST_DATE,RowCount)
Topic_Last_Post_Reply_ID = allActiveTopics(fT_LAST_POST_REPLY_ID,RowCount)
Finally, around line 599, find the code indicated and replace it with the three lines in red:
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a></span> </font>" & vbNewline
is replaced by
'## MOD TOPIC POST DATE
Response.Write "<span class=""spnMessageText""><a href=""topic.asp?TOPIC_ID=" & Topic_ID & """>" & ChkString(Topic_Subject,"title") & "</a><br />" & vbNewline & _
"<font size=""" & strFooterFontSize & """> Begun " & ChkDate(Topic_Post_Date,"",false) & "</font></span> </font>" & vbNewLine
===== END OF MOD CHANGE LIST =====
Edited 31 May by author to add line 480 change to ACTIVE.ASP omitted in original post.
Edited 6 Jun by author to add line 240 and line 465 changes to FORUM.ASP omitted in original post.
Edited 9 Jun by author to change misleading reference (TOPIC.ASP) to FORUM.ASP in 6 Jun correction footnote.