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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Snitz 3.3 Hot Topics
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SweSob
Starting Member

22 Posts

Posted - 27 July 2001 :  07:33:43  Show Profile
For some resond the Hot Topics icon doesn't get displayed on my board.
In Admin Options it's on Yes and it should be displayed after 15 posts..
But it's the same old icon and some of the Topics are way over 15!

Any ideas how to fix this?

dcarmi
Starting Member

United Kingdom
15 Posts

Posted - 27 July 2001 :  09:22:16  Show Profile  Visit dcarmi's Homepage
Ditto

-- Dave
Go to Top of Page

SweSob
Starting Member

22 Posts

Posted - 27 July 2001 :  13:47:13  Show Profile
Hmm, talked to several 3.3 users and they all say the same thing, the Hot Topic icon doesn't show.

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 27 July 2001 :  15:03:31  Show Profile
Yes, that's a bug.

Explanation:
In the ChkIsNew() function you will see this bit of code
if rs("T_REPLIES") >= intHotTopicNum and lcase(strHotTopic) = "1" Then
The code in red, isn't being set to True because the variable intHotTopicNum is a text field and you can't do a comparison between an integer "T_REPLIES" and a text field "intHotTopicNum". So you would need to convert "intHotTopicNum" to an integer so the comparison can be made.

Fix:
There are quite a few places you will need to edit. In forum.asp, line 470 and 475, in the ChkIsNew() function, change it to this(modified code is in red.):
Function ChkIsNew(dt)
if ((CheckForUnModeratedPosts("TOPIC", Cat_ID, Forum_ID, Topic_ID) > 0) and AdminAllowed = 1) or (CheckForUnModeratedPosts("POSTAUTHOR", Cat_ID, Forum_ID, Topic_ID) > 0) then
if Topic_Status <> 3 then
UnApprovedFound = "Y"
ChkIsNew = "<img src='icon_folder_unmoderated.gif' height=15 width=15 border=0 hspace=0 alt='Post(s) Need Approved'>"
elseif Topic_Status = 3 and (AdminAllowed = 1 or rs("T_AUTHOR") = MemberID) then
HeldFound = "Y"
ChkIsNew = "<img src='icon_folder_hold.gif' alt='Post is on hold' height=15 width=15 border=0>"
end if
elseif dt > Session(strCookieURL & "last_here_date") then
if rs("T_REPLIES") >= cint(intHotTopicNum) and lcase(strHotTopic) = "1" Then
ChkIsNew = "<img src='icon_folder_new_hot.gif' height=15 width=15 border=0 hspace=0 alt='Hot Topic'>"
else
ChkIsNew = "<img src='icon_folder_new.gif' height=15 width=15 border=0 hspace=0 alt='New Topic'>"
end if
elseif rs("T_REPLIES") >= cint(intHotTopicNum) and lcase(strHotTopic) = "1" Then
ChkIsNew = "<img src='icon_folder_hot.gif' height=15 width=15 border=0 hspace=0 alt='Hot Topic'>"
else
ChkIsNew = "<img src='icon_folder.gif' height=15 width=15 border=0 hspace=0>"
end if
End Function
Then in active.asp, lines 408, change it to this(modified code in red):
elseif lcase(strHotTopic) = "1" and Topic_Replies >= cint(intHotTopicNum) Then
In pop_profile.asp, lines 259 and 265, change them to this(modified code in red):
if rs2("T_REPLIES") >= cint(intHotTopicNum) then
And in inc_functions.asp, in the chkIsNew(fDateTime) function, make the same changes, lines 858 and 864:
if rs("T_REPLIES") >= cint(intHotTopicNum) then
That should fix it.

- David
Go to Top of Page

SweSob
Starting Member

22 Posts

Posted - 27 July 2001 :  15:22:25  Show Profile
Thanks, worked just perfect. =)

ZilverZtream
http://www.swesob.com



Edited by - swesob on 27 July 2001 15:22:55
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 29 July 2001 :  16:48:52  Show Profile  Visit gor's Homepage
This is caused by the change from CONFIG to CONFIG_NEW
In the old table a number of config-items were numeric values while they now are all strings.
It might be easier to use CInt() in config.asp instead, then all the MODS and all the other codeparts that might use them work.


Pierre
Join a Snitz Mailinglist
Go to Top of Page

dcarmi
Starting Member

United Kingdom
15 Posts

Posted - 30 July 2001 :  05:25:48  Show Profile  Visit dcarmi's Homepage
quote:
It might be easier to use CInt() in config.asp instead, then all the MODS and all the other codeparts that might use them work.


Agreed and it works!

-- Dave
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.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07