Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Excluding replies from Rec. Topics in Pop_Profile?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
ILLHILL Posted - 14 February 2006 : 14:37:30
Hi, can anybody point me in the direction?
I know the following code is the part I need to edit,
but I either end up with "end if" errors or with "missing objects"


				if strRecentTopics = "1" then
					strStartDate = DateToStr(dateadd("d", -30, strForumTimeAdjust))

					'## Forum_SQL - Find all records for the member
					strsql = "SELECT F.FORUM_ID"
					strSql = strSql & ", T.TOPIC_ID"
					strSql = strSql & ", T.T_SUBJECT"
					strSql = strSql & ", T.T_STATUS"
					strSql = strSql & ", T.T_LAST_POST"
					strSql = strSql & ", T.T_REPLIES "
					strSql = strSql & " FROM ((" & strTablePrefix & "FORUM F LEFT JOIN " & strTablePrefix & "TOPICS T"
					strSql = strSql & " ON F.FORUM_ID = T.FORUM_ID) LEFT JOIN " & strTablePrefix & "REPLY R"
					strSql = strSql & " ON T.TOPIC_ID = R.TOPIC_ID) "
					strSql = strSql & " WHERE (T_DATE > '" & strStartDate & "') "
					strSql = strSql & " AND (T.T_AUTHOR = " & ppMember_ID
					strSql = strSql & " OR R.R_AUTHOR = " & ppMember_ID & ")"
					strSql = strSql & " AND (T_STATUS < 2 OR R_STATUS < 2)"
					strSql = strSql & " AND F.F_TYPE = 0"
					strSql = strSql & " ORDER BY T.T_LAST_POST DESC, T.TOPIC_ID DESC"

					set rs2 = my_Conn.Execute(strsql)					

					Response.Write	"                    <tr>" & vbNewLine & _
							"                      <td align=""center"" background=""darkorangegradient.gif"" colspan=""2""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>Recent Topics</font></b></td>" & vbNewLine & _
							"                    </tr>" & vbNewLine
					if rs2.EOF or rs2.BOF then
						Response.Write	"                    <tr>" & vbNewLine & _
								"                      <td bgcolor=""" & strPopUpTableColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> <br /> <b>No Matches Found...<br /> </b></font></td>" & vbNewLine & _
								"                    </tr>" & vbNewLine
					else 
						currTopic = 0
						TopicCount = 0
						Response.Write	"                    <tr>" & vbNewLine & _
								"                      <td bgColor=""" & strPopUpTableColor & """ valign=""top"" colspan=""2"">" & vbNewLine & _
								"                        <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine
						do until rs2.EOF or (TopicCount = 10)
							if chkForumAccess(rs2("FORUM_ID"),MemberID,false) then 
								if currTopic <> rs2("TOPIC_ID") then 
									Response.Write	"                          <tr>" & vbNewLine & _
											"                            <td bgcolor=""" & strPopUpTableColor & """ width=""5%"">" & vbNewLine & _
											"                            <a href=""topic.asp?TOPIC_ID=" & rs2("TOPIC_ID") & """>"
									if rs2("T_STATUS") <> 0 then
										if strHotTopic = "1" then
											if rs2("T_LAST_POST") > Session(strCookieURL & "last_here_date") then
												if rs2("T_REPLIES") >= intHotTopicNum then
													Response.Write	getCurrentIcon(strIconFolderNewHot,"Hot Topic","align=""absmiddle""") & "</a></td>" & vbNewLine
												else
													Response.Write	getCurrentIcon(strIconFolderNew,"New Topic","align=""absmiddle""") & "</a></td>" & vbNewLine
												end if
											else
												if rs2("T_REPLIES") >= intHotTopicNum then
													Response.Write	getCurrentIcon(strIconFolderHot,"Hot Topic","align=""absmiddle""") & "</a></td>" & vbNewLine
												else
													Response.Write	getCurrentIcon(strIconFolder,"","align=""absmiddle""") & "</a></td>" & vbNewLine
												end if
											end if
										else
											if rs2("T_LAST_POST") > Session(strCookieURL & "last_here_date") then
												Response.Write	getCurrentIcon(strIconFolderNew,"New Topic","align=""absmiddle""") & "</a></td>" & vbNewLine
											else
												Response.Write	getCurrentIcon(strIconFolder,"","align=""absmiddle""") & "</a></td>" & vbNewLine
											end if
										end if
									else 
										if rs2("T_LAST_POST") > Session(strCookieURL & "last_here_date") then 
											Response.Write	getCurrentIcon(strIconFolderNewLocked,"Topic Locked","align=""absmiddle""") & "</a></td>" & vbNewLine
										else
											Response.Write	getCurrentIcon(strIconFolderLocked,"Topic Locked","align=""absmiddle""") & "</a></td>" & vbNewLine
										end if
									end if 
									Response.Write	"                            <td bgcolor=""" & strPopUpTableColor & """ align=""left"" valign=""middle"" width=""95%""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """> <a href=""topic.asp?TOPIC_ID=" & rs2("TOPIC_ID") & """>" & ChkString(rs2("T_SUBJECT"),"display") & "</a> </font></td>" & vbNewLine & _
											"                          </tr>" & vbNewLine
									TopicCount = TopicCount + 1
								end if 
								currTopic = rs2("TOPIC_ID")
							end if
							rs2.MoveNext 
						loop 

					end if 
					rs2.close
					set rs2 = nothing
				end if


I tried to remove any recerences to replies, but I think I'm missing
something.
Basically I want the recent topics to only display topics the author
started and not his/her replies to other people's topics.

Greets & thanks, Dominic

<
1   L A T E S T    R E P L I E S    (Newest First)
ILLHILL Posted - 14 February 2006 : 15:15:59
Sorry for wasting your time.
I overlooked something.
I think I was trying to hard.
I left everything intact, except: strSql = strSql & " ORDER BY T.T_LAST_POST DESC, T.TOPIC_ID DESC"
Which I changed into: strSql = strSql & " ORDER BY T.TOPIC_ID DESC"

Dominic<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07