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 / Classic ASP versions(v3.4.XX)
 date and time in forum
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

border
Starting Member

14 Posts

Posted - 13 May 2002 :  13:58:23  Show Profile
Hi!

I have dowloaded snitz forum!

My question is: In forum show me this date 08/05/2002. Whart I must do that the forum show me this date 08.05.2002. What and where?

Thank you!

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 May 2002 :  15:00:06  Show Profile  Visit HuwR's Homepage
go to admin options and look under date/time configuration

Go to Top of Page

_barbara
Junior Member

Germany
123 Posts

Posted - 13 May 2002 :  16:10:19  Show Profile
This date format is not available in the admin options. But you can get this option by adding some lines of code to inc_funcions.asp and admin_config_datetime.asp:

inc_functions.asp
In function chkDateTime(fDateTime) (around line 558), add the code marked in red:

 
function chkDateTime(fDateTime)
if fDateTime = "" then
exit function
end if
if IsDate(fDateTime) then
select case strDateType

'*** added code for date format 31.12.2000 (DE short)***
case "d.m.y"
ChkDateTime = Mid(fDateTime,7,2) & "." & _
Mid(fDateTime,5,2) & "." & _
Mid(fDateTime,1,4)
'******* end added code ********************************

case "dmy"
chkDateTime = Mid(fDateTime,7,2) & "/" & _
Mid(fDateTime,5,2) & "/" & _
Mid(fDateTime,1,4)
'....


The same procedure for function chkDate(fDate) (around line 745):
 
function chkDate(fDate)
if fDate = "" then
exit function
end if
' if IsDate(fDate) then
select case strDateType

'*** added code for date format 31.12.2000 (DE short)***
case "d.m.y"
ChkDate = Mid(fDate,7,2) & "." & _
Mid(fDate,5,2) & "." & _
Mid(fDate,1,4)
'******* end added code ********************************

case "dmy"
chkDate = Mid(fDate,7,2) & "/" & _
Mid(fDate,5,2) & "/" & _
Mid(fDate,1,4)
'....


admin_config_datetime.asp
around line 165
 
<select name="strDateType">
<option Value="mdy"<% if (lcase(strDateType)="mdy") then Response.Write(" selected") %>>12/31/2000 (US short)</option>
<option Value="dmy"<% if (lcase(strDateType)="dmy") then Response.Write(" selected") %>>31/12/2000 (UK short)</option>

<!-- added code for date format 31.12.2000 (DE short) -->
<option Value="d.m.y"<% if (lcase(strDateType)="d.m.y") then Response.Write(" selected") %>>31.12.2000 (DE short)</option>
<!-- end added code --------------------------------- -->

<option Value="ymd"<% if (lcase(strDateType)="ymd") then Response.Write(" selected") %>>2000/12/31 (Other short)</option>


Then login as admin, go to admin section - server date time config and choose "31.12.2000 (DE short)".

I'm using this code for quite a while for my german forum version as this is the common german date format. That's why I call it DE short but of course you can rename it to anything you want

Barbara

(updated 16 May 02)
This code works for the current standard snitz forum version 3.3.03 and also for v.4 beta. (I've been running it also with 3.1 SR4). However, if you use davio's modded forum version (with anonymous access etc., http://dsilvera.com/download.asp?mod=anonymous_access&ver=full) you will have to do one more change in inc_function.asp (line 120):

function ReadGuestLastHereDate()
dim tempGuestLastVisit

if not isDate(strForumTimeAdjust) then
strForumTimeAdjust = strToDate(strForumTimeAdjust)
end if
'*** CHANGED for date format 31.12.2000 (DE short) ****************
tempGuestLastVisit = StrToDate(Request.Cookies(strCookieURL & "LastVisitDate"))
'tempGuestLastVisit = chkDate(Request.Cookies(strCookieURL & "LastVisitDate")) &_
chkTime(Request.Cookies(strCookieURL & "LastVisitDate"))
'*** END CHANGED **************************************************

...


Edited by - _barbara on 16 May 2002 13:15:50
Go to Top of Page

border
Starting Member

14 Posts

Posted - 14 May 2002 :  05:18:18  Show Profile
Barbara danke! Ich habe CODE "instalirt"!

Go to Top of Page

_barbara
Junior Member

Germany
123 Posts

Posted - 14 May 2002 :  07:22:50  Show Profile
gern geschehen

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