Author |
Topic |
|
Al
Starting Member
Norway
35 Posts |
Posted - 02 June 2001 : 05:32:18
|
The active topics since last visit-feature doesn't work in my new version of snitz.
The page "active topics" shows the pages updated since my last visit -- but here the month and the day has changed. My last visit was today, 02/06/2001, but the date in this field (but nowhere else in the forum) shows 06/02/2001. I guess this date also happens to be the cookie-date, because the icons for the topics is "icon_folder_new.gif" instead of the "icon_folder.gif" which I expect.
Neihter the feature "Mark all topics as read" is working.
Does anybody knows what's wrong?
The forum is here: http://utsyn.no/innspill/
Edited by - Al on 02 June 2001 08:23:44 |
|
cran
Starting Member
6 Posts |
Posted - 02 June 2001 : 10:12:33
|
It's because the date is converted from string to date and back to string, but the date convert doesn't work... it's a microsoft bug... if the month/day reversied is a valid US date it uses the US format even though it should use the non US fornat... thats why it was fine on 31/5 because 31/5 is not a valid US date, but on the 1/6 it thinks it's the 6th January... 8-(
I've done a fix that is working on my sites forum
Replace the ReadLastHereDate function in inc_functions.asp with the following:
function ReadLastHereDate(UserName) dim TempLastHereDate dim rs_date
'## Forum_SQL strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS."&Strdbntsqlname&" = '" & UserName & "' "
set rs_date = my_conn.Execute (strSql)
if (rs_date.BOF and rs_date.EOF) then ReadLastHereDate = DatetoStr(DateAdd("d",-10,strForumTimeAdjust)) else TempLastHereDate = StrToDate(rs_date("M_LASTHEREDATE")) if TempLastHereDate = "" or IsNull(TempLastHereDate) then ReadLastHereDate = DatetoStr(DateAdd("d",-10,strForumTimeAdjust)) else ReadLastHereDate = rs_date("M_LASTHEREDATE") end if end if
rs_date.close set rs_date = nothing
'## Forum_SQL - Do DB Update strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " SET M_LASTHEREDATE = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS." & strDBNTSQLName & " = '" & UserName & "' "
my_conn.Execute (strSql)
end function
|
|
|
Al
Starting Member
Norway
35 Posts |
Posted - 02 June 2001 : 11:15:27
|
It worked! Thank you, brother, and God bless you!
Al
---
For by grace are ye saved through faith; and that not of yourselves: it is the gift of God. Eph. 2,8
|
|
|
kjartis
New Member
Norway
94 Posts |
Posted - 05 June 2001 : 01:20:54
|
quote:
It's because the date is converted from string to date and back to string, but the date convert doesn't work...
A big THANKS from me to!
www.kjartis.com |
|
|
horhan
Starting Member
20 Posts |
Posted - 05 June 2001 : 02:05:47
|
Hi,
I modified the codes of Cran as
MEMBERS.M_NAME instead of MEMBERS.
It works fine now!
Thanks all for your help!
|
|
|
kjartis
New Member
Norway
94 Posts |
Posted - 05 June 2001 : 02:34:24
|
quote:
Hi,
I modified the codes of Cran as
MEMBERS.M_NAME instead of MEMBERS.
It works fine now!
What good does this do?
www.kjartis.com |
|
|
|
Topic |
|