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: MOD Implementation
 What changes does Events (Non US Date) make?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 31 May 2002 :  08:07:55  Show Profile
Does anyone know what changes were made to events_functions.asp in the Events (Non US Date) MOD? I've already made some changes to this file so I can't just overwrite it. Any help would be greatly appreciated, I'm using v3.3.05 of the forums and the Events v2sr1 MOD.

c ya in the funny books
MeTV - tvthemetunes.net - forums
house of design - graphic design consultants


"Wise men make proverbs, but fools repeat them."

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 May 2002 :  09:31:37  Show Profile  Send ruirib a Yahoo! Message
Once I helped someone fix a version of the events mod. Don't know what version it was, but I just had to change everything related to dates, not only the StrToDate function, but also very much hardcoded date handling code. This doesn't help much, but I decided to post anyway...



-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 31 May 2002 :  10:04:08  Show Profile
Yeesh! Sounds nasty! Looks like it'd be easier to reapply the changes to the modified event_functions.asp file included in the ZIP. Thanks for the reply, ruirib.

One other thing on this, the Readme for the Non US DAte Events MOD tells me to replace a function in inc_functions.asp. Currently the function it's telling me to replace looks like this:

function StrToDate(strDateTime)
Dim controlDate, testDate

if ChkDateFormat(strDateTime) then
'Testing for server format
controlDate = DateToStr(Now())
testDate = DateToStr(cdate("" & Mid(controlDate, 5,2) & "/" & Mid(controlDate, 7,2) & "/" & Mid(controlDate, 1,4) & " " & Mid(controlDate, 9,2) & ":" & Mid(controlDate, 11,2) & ":" & Mid(controlDate, 13,2) & ""))

if strComp(testDate,controlDate)=0 Then
StrToDate = cdate("" & Mid(strDateTime, 5,2) & "/" & Mid(strDateTime, 7,2) & "/" & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "")
else
StrToDate = cdate("" & Mid(strDateTime, 7,2) & "/" & Mid(strDateTime, 5,2) & "/" & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "")
end if

else
tmpDate = DatePart("m",strForumTimeAdjust) & "/" & DatePart("d",strForumTimeAdjust) & "/" & DatePart("yyyy",strForumTimeAdjust) & " " & DatePart("h",strForumTimeAdjust) & ":" & DatePart("n",strForumTimeAdjust) & ":" & DatePart("s",strForumTimeAdjust)
StrToDate = "" & tmpDate
end if
end function


And this is the modified function from the readme:

	function StrToDate(strDateTime)
if ChkDateFormat(strDateTime) then
StrToDate = cdate("" & MonthName(cint(Mid(strDateTime, 5,2))) & " " & Mid(strDateTime, 7,2) & ", " & Mid(strDateTime, 1,4) & " " & Mid(strDateTime, 9,2) & ":" & Mid(strDateTime, 11,2) & ":" & Mid(strDateTime, 13,2) & "")
else
StrToDate = "" & strForumTimeAdjust
end if
end function


which looks like the OldstrToDate function to me. Is it definitely OK for me to replace the first block of code with the second? Or am I better off going through events_functions.asp, changing all occurences of strToDate to OldstrToDate?

c ya in the funny books
MeTV - tvthemetunes.net - forums
house of design - graphic design consultants


"Wise men make proverbs, but fools repeat them."
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 31 May 2002 :  12:41:38  Show Profile  Send ruirib a Yahoo! Message
You should not make that replacement (the first part of the function will be same, if you take a closer look). Instead replace the existing version of StrToDate by the one posted here:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=27320#129371


As I told you before, you'll have to analize each of the events mod files and change the way dates are handled, so that the default format there (MM/DD/YYYY) is replaced by the usual UK date format (DD/MM/YYYY). It's not enough to change StrToDate since many dates are handled outside this function.

-------------------------------------------------
Installation Guide | Do's and Dont's | MODs
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.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07