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)
 Changes to "jump to last post" in topic.asp
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 March 2006 :  05:16:38  Show Profile  Reply with Quote
Not a bug, per se, which is why I'm posting here rather than the bug reports forum but, when jumping to the last post in an archive, the code in topic.asp (line 273) that redirects to the correct page when whichpage=-1 redirects to the live topic which then requires an additional redirect to the archived topic when the live topic isn't found in the database (line 162).

To get around this, find the following on line 273 of topic.asp:
Response.Redirect("topic.asp?" & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "")
And replace it with the following:
Response.Redirect("topic.asp?" & ArchiveLink & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "")
It's a trifling issue but saves the processing of 162 lines of code

<

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.”

Edited by - Shaggy on 09 March 2006 05:31:01

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 09 March 2006 :  05:30:26  Show Profile  Reply with Quote
Also, just spotted that there is no check made to see if the value of the REPLY_ID variable passed through the querystring is numeric. This would cause problems on lines 233 and 260 of topic.asp when that variable is passed through the clng function.

To add the check, find the following on line 202 of topic.asp:
if mypage = -1 and Request.QueryString("REPLY_ID") <> "" then
And replace it with the following:
if mypage = -1 and Request.QueryString("REPLY_ID") <> "" and isNumeric(Request.QueryString("REPLY_ID")) then
<

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

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 25 August 2006 :  04:57:52  Show Profile  Reply with Quote
Shaggy if the reply id is not numeric, what happens then? Seems to me your code changes would continue the rest of the script. So the check would need to be higher up.

Just bumping this so I can come back to it later.<

Support Snitz Forums
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 August 2006 :  05:17:42  Show Profile  Reply with Quote
I'll have look at that later on today

<

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

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 August 2006 :  06:26:34  Show Profile  Reply with Quote
Davio, that shouldn't be an issue using this code; if the REPLY_ID in the quesrystring is not numeric, it's ignored and it jumps to the last reply in the topic instead. In fact, if you're using that code, you can ignore both these changes completely.

<

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.”

Edited by - Shaggy on 25 August 2006 06:28:00
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 25 August 2006 :  08:49:47  Show Profile  Reply with Quote
Oh ok. You have code all over the place contradicting with one another! <

Support Snitz Forums
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 August 2006 :  08:50:46  Show Profile  Reply with Quote
Confusing l'il git, ain't I?!

<

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
  Previous Topic Topic Next Topic  
 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.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07