SELECT ReplyIDs, NumReplies, TSCreated, Title, Author, TopicID, Body, Email, Username FROM Threads WHERE ID = #attributes.ID# tries_so_far = tries_so_far + 1; if (tries_so_far GT MaxDBAttempts) { continue_trying = false; } else { if (len(GetThisThread.TopicID) LT 1) { // wait DBAttemptPause milliseconds before trying again start_time = GetTickCount(); while (GetTickCount() LT (start_time + DBAttemptPause)) { wait_and_do_nothing = true; } } else { continue_trying = false; } } if (GetThisThread.TopicID IS 0) { temp = QuerySetCell(GetThisThread, "TopicID", attributes.ID); // removed code: temp = QuerySetCell(GetTopic, "ParentID", attributes.ID); } SELECT ID, ReplyIDs, NumReplies, TSCreated, Title, Author FROM Threads WHERE (TopicID = #GetThisThread.TopicID# OR ID = #GetThisThread.TopicID#) AND Deleted =0 ORDER BY ID topic_thread[GetTopicThreads.ID] = StructNew(); topic_thread[GetTopicThreads.ID].ReplyIDs = GetTopicThreads.ReplyIDs; topic_thread[GetTopicThreads.ID].NumReplies = GetTopicThreads.NumReplies; topic_thread[GetTopicThreads.ID].Title = GetTopicThreads.Title; topic_thread[GetTopicThreads.ID].Author = GetTopicThreads.Author; topic_thread[GetTopicThreads.ID].TSCreated = GetTopicThreads.TSCreated; // are we at topic_level? (this message has a ParentID of 0?) if (GetThisThread.TopicID EQ attributes.ID) {topic_level = true;} else {topic_level = false;} // are there any replies_dsp in this topic? if (GetTopicThreads.RecordCount GT 1) {replies_in_this_topic = true;} else {replies_in_this_topic = false;} this_topic_level = topic_level; this_thread_Title = GetThisThread.Title; this_topic_Title = topic_thread[GetThisThread.TopicID].Title; this_Author = GetThisThread.Author; this_Username = GetThisThread.Username; this_Email = GetThisThread.Email; this_TSCreated = GetThisThread.TSCreated; this_Body = GetThisThread.Body; // show/hide thread table? if(attributes.ShowThreadTable){ show_dsp = "[ #HeaderFont#hide ]"; } else { show_dsp = "[ #HeaderFont#show ]"; }
if (ListLen(topic_thread[GetThisThread.TopicID].ReplyIDs) GT 0) { replies_dsp = " (#ListLen(topic_thread[GetThisThread.TopicID].ReplyIDs)#)"; } else { replies_dsp = ""; } row_num = 1; indent_level = 1; printed_ID_list = ""; // not used here, but used by _dsp_view_all.cfm // setup arrays for "_act_topic_threads.cfm" recursion this_ReplyIDs = ArrayNew(1); this_ReplyIDs[indent_level + 1] = topic_thread[GetThisThread.TopicID].ReplyIDs;
#HeaderFont#  #ThreadLabelPlural# For This #TopicLabel#   #show_dsp#   #HeaderFont#  Posted by   #HeaderFont#  Date  #RowHeight_img#
#HighlightFont#  #topic_thread[attributes.ID].Title##replies_dsp#   #HighlightFont#  #topic_thread[attributes.ID].Author#   #HighlightFont#  #DateFormat(topic_thread[attributes.ID].TSCreated,'mmm d, yyyy')#  #RowHeight_img#
#DefaultFont#  #topic_thread[GetThisThread.TopicID].Title##replies_dsp#   #DefaultFont#  #topic_thread[GetThisThread.TopicID].Author#   #DefaultFont#  #DateFormat(topic_thread[GetThisThread.TopicID].TSCreated,'mmm d, yyyy')#  #RowHeight_img#
//disabled: this_Title = "Re: #GetThisThread.Title#"; this_Submit = " Preview Your Reply "; this_ParentID = attributes.ID; if (GetThisThread.TopicID IS 0) { this_TopicID = attributes.ID; // if TopicID = 0 then means the current thread *is* a topic } else { this_TopicID = GetThisThread.TopicID; } if (topic_level) { this_Header = "Reply To This #TopicLabel#"; } else { this_Header = "Reply To This #ThreadLabel#"; }