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 DEV-Group
 DEV Discussions (General)
 whichpage value . two questions.
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 28 January 2004 :  09:55:56  Show Profile
[3.4.04, mySQL]
I have made two observations regarding 'whichpage'. it is hard to explain but here goes:

I have a topic that is two pages long.

from forum.asp i choose the "jump to last post" link. when i hover over this link, the status bar says:

http://localhost/forum/topic.asp?whichpage=-1&TOPIC_ID=4&REPLY_ID=14

but when i load up that page, the URL address bar states:

http://localhost/forum/topic.asp?whichpage=1.66666666666667&TOPIC_ID=4#14

is this normal ? There are no errors, but i'm wondering if there are some integer / float values getting mixed.

My forum is still only on my localhost but i could replicate it on Davios forum [ hope you dont mind!]
http://www.dsilvera.com/forum/forum.asp?FORUM_ID=6
see thread called "archiving error message". now click on "jump to last post". you'll see that whichpage=1.6
NB: this cant be replicated at this forum on snitz.com

which brings me to my second related query.

line #367 of topic.asp:
arrReplyData = rsReplies.GetRows(intGetRows)

shouldnt this be wrapped in a

if not rsReplies.eof then
>>arrReplyData = rsReplies.GetRows(intGetRows)
else
iReplyCount = ""
End if


if there is an invalid "whichpage" value, then there is a server error generated. Unfotunately whoever wrote that code didnt put any comments with it, so it is hard to figure out what is going on. Part of the problem seems to be that iPageTotal is always > 0.

This only applies to mySQL, other db users just get a blank page such as:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=33760&whichpage=99

Edited by - ruirib on 28 January 2004 10:26:37

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 28 January 2004 :  13:08:16  Show Profile
I had actually posted about this in the help forum a month back: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=50104

Didn't really look into it as it didn't cause any problems. Now that you mention that it is mysql only problem, it might give a good clue as what's the cause.

I'll take a look at it.

Support Snitz Forums
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 28 January 2004 :  19:26:40  Show Profile
Around line 230 to 290 in topic.asp, you will find this bit of code. Add the code in red. That should solve it.
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
		else
			intPageNumber = cLng(intPageNumber)
		end if
		strwhichpage = "whichpage=" & intPageNumber & "&"
		exit for
	end if
next

Support Snitz Forums
Go to Top of Page

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 29 January 2004 :  04:24:17  Show Profile
Thanks Davio.
I missed your original thread about this issue.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07