Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Jump to Last Post Permalink
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 5

Astralis
Senior Member

USA
1218 Posts

Posted - 24 April 2008 :  05:33:12  Show Profile  Send Astralis a Yahoo! Message  Reply with Quote
Shaggy,

I never did figure out what that green line is for, whether that is the only line that needs changed or something else.

When I looked around line 202 of topic.asp, I found the following code. Are you saying I should replace it entirely with everything you have?


if mypage = -1 and Request.QueryString("REPLY_ID") <> "" then
	strSql1 = "SELECT REPLY_ID "
	strSql2 = "FROM " & strActivePrefix & "REPLY "
	strSql3 = "WHERE TOPIC_ID = " & Topic_ID & " "
	' DEM --> if not a Moderator, all unapproved posts should not be viewed.
	if AdminAllowed = 0 then
		strSql3 = strSql3 & "AND (R_STATUS < "
		if Moderation = "Y" then
			' Ignore unapproved/rejected posts
			strSql3 = strSql3 & "2 "
		else
			' Ignore any previously rejected topic
			strSql3 = strSql3 & "3 "
		end if
		strSql3 = strSql3 & "OR R_AUTHOR = " & MemberID & ") "
	end if
	strSql4 = "ORDER BY R_DATE ASC "

	if strDBType = "mysql" then
		set rsReplies = Server.CreateObject("ADODB.Recordset")

		rsReplies.open strSql1 & strSql2 & strSql3 & strSql4, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

		if rsReplies.EOF then
			iReplyCount = ""
		else
			arrReplyData = rsReplies.GetRows(adGetRowsRest)
			iReplyCount = UBound(arrReplyData, 2)
			rREPLY_ID = 0
		end if

		LastPostReplyID = cLng(Request.QueryString("REPLY_ID"))

		if iReplyCount <> "" then
			for iReply = 0 to iReplyCount
				intReplyID = arrReplyData(rREPLY_ID,iReply)
				if LastPostReplyID = intReplyID then
					intPageNumber = ((iReply+1)/strPageSize)
					if intPageNumber > cLng(intPageNumber) then
						intPageNumber = cLng(intPageNumber) + 1
					end if
					strwhichpage = "whichpage=" & intPageNumber & "&"
					exit for
				end if
			next
		else
			strwhichpage = ""
		end if

		rsReplies.Close
		set rsReplies = nothing
	else
		set rsReplies = Server.CreateObject("ADODB.Recordset")
		rsReplies.cachesize = strPageSize
		rsReplies.pagesize = strPageSize

		rsReplies.open strSql1 & strSql2 & strSql3 & strSql4, my_Conn, adOpenStatic, adLockReadOnly, adCmdText

		LastPostReplyID = cLng(Request.QueryString("REPLY_ID"))
		rsReplies.Find = "REPLY_ID=" & LastPostReplyID & ""

		if not (rsReplies.EOF or rsReplies.BOF) then
			if rsReplies.absolutepage > 1 then strwhichpage = "whichpage=" & rsReplies.absolutepage & "&"
		else
			strwhichpage = ""
		end if

		rsReplies.Close
		set rsReplies = nothing
	end if

	Response.Redirect("topic.asp?" & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "")
	Response.End
end if
<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 24 April 2008 :  05:47:40  Show Profile  Reply with Quote
Me either, but it was a while ago now I think Davio added that line in when adding this to the base code. But, yeah, just replace that chunk of code with mine, taking care to back up topic.asp first, just in case.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 24 April 2008 :  05:53:16  Show Profile  Send Astralis a Yahoo! Message  Reply with Quote
Excellent! It's working great! Thank you for helping me.

I figured that green line was probably a leftover from some other discussion.<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 24 April 2008 :  05:55:11  Show Profile  Reply with Quote
You're welcome, buddy

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07