Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Changes to "jump to last post" in topic.asp

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
Shaggy Posted - 09 March 2006 : 05:16:38
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

<
6   L A T E S T    R E P L I E S    (Newest First)
Shaggy Posted - 25 August 2006 : 08:50:46
Confusing l'il git, ain't I?!

<
Davio Posted - 25 August 2006 : 08:49:47
Oh ok. You have code all over the place contradicting with one another! <
Shaggy Posted - 25 August 2006 : 06:26:34
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.

<
Shaggy Posted - 25 August 2006 : 05:17:42
I'll have look at that later on today

<
Davio Posted - 25 August 2006 : 04:57:52
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.<
Shaggy Posted - 09 March 2006 : 05:30:26
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
<

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