Author |
Topic |
|
suona
Junior Member
Taiwan
121 Posts |
Posted - 31 January 2004 : 04:54:17
|
I added an MOD to change the topic.asp , the sort order of posts, and found some problem.
If there's only the original post, without any reply, then the variable " maxpages " will be NULL , and the MOD for sortorder will make wrong judgement.
thus I added a line, first find these two lines ------------------------ else '## No replies found in DB iReplyCount = "" ------------------------ then add this below them ------------------------ maxpages = 1
------------------------
This solves my MOD's problem, but I don't know this is correct way or not ....... Anyway, report this to everybody. |
I'm a amateur WWW site builder.
And Sorry for my poor english .....
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 31 January 2004 : 05:01:29
|
moved this from the Bug Reports forum...
No, this isn't a bug in the forum.
Sounds like that MOD you installed would need to be modified with your findings if it's getting an error. |
|
|
suona
Junior Member
Taiwan
121 Posts |
Posted - 31 January 2004 : 09:38:52
|
my MOD will decide the order of posts, count on three variables:
sortorder : new added, the type of order selected by user mypage : snitz original maxpages : snitz original
mypage and maxpages , their diferrent combinations will determine how to deal with the first post, that is:when to call GetFirst()
but during the test, if there is only the original post(topic), without any reply, the variable "maxpages" will return a NULL value, so the program cannot determine correctly.
I don't know this NULL condition is normal or not, and it seems have no harm to snitz now, but if the next version of snitz added sort post function, maybe this condition should be noticed. |
I'm a amateur WWW site builder.
And Sorry for my poor english .....
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 31 January 2004 : 10:00:03
|
Well, when there is only the topic, there is nothing to sort anyway. So why don't you only have the options to sort, when there is at least 1 reply? |
|
|
suona
Junior Member
Taiwan
121 Posts |
Posted - 31 January 2004 : 10:37:52
|
I see. the MOD I got runs well in snitz3.1sr4 but some error in 3.4.04. maybe the original writer can find out another way instead of modify snitz3.4.04's code. |
I'm a amateur WWW site builder.
And Sorry for my poor english .....
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 31 January 2004 : 11:10:40
|
in your post above you said "my MOD". I took that to mean it was a MOD that you were writing. |
|
|
suona
Junior Member
Taiwan
121 Posts |
Posted - 31 January 2004 : 11:40:14
|
sorry for that.
I just made some arrangements to run in 3.4.04. since the code of 3.1sr4 is different with 3.4.04 ..... |
I'm a amateur WWW site builder.
And Sorry for my poor english .....
|
|
|
|
Topic |
|