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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Displaying Forum dates/times using local settings
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 March 2001 :  23:11:35  Show Profile  Visit HuwR's Homepage
Ok, I figured this would be reasonably simple, so gave it a go. As long as the dates and times are displayed using the chkDate and chkTime functions, then this will work.

This is only a trial, and stores the value in your cookie, but needs a db field added really.

Changes required.

config.asp
add this to the end of the Dim statements
Dim strLocalTimeAdjust

inc_top.asp
add this code
strLocalTimeAdjust = request.Cookies(strUniqueID & "User")("strLocalTimeAdjust")
if strLocalTimeAdjust = "" then
strLocalTimeAdjust = 0
response.Cookies(strUniqueID & "User")("strLocalTimeAdjust") = strLocalTimeAdjust
end if

after the
select case Request.Form("Method_Type")
.....
end select


inc_functions.asp
look for the function chkDate(fDate) and add
fDate = DateToStr(DateAdd("h", strLocalTimeAdjust , strToDate(fDate)))
above the select case strDateType line

look for the function chkTime(fTime) and add
fTime = DateToStr(DateAdd("h", strLocalTimeAdjust , strToDate(fTime)))
above the if strTimeType = 12 then line

inc_profile.asp
look for

<% end if
end if
if strFullName = "1" then
%>

and replace it with

<% end if
end if
%>
<tr>
<td bgColor="<% =strPopUpTableColor %>" align=right nowrap valign=top><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Date/Time Adjust: </font></b></td>
<td bgColor="<% =strPopUpTableColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input type="text" name="localTime" value="<%= strLocalTimeAdjust %>"></font></td>
</tr>
<%
if strFullName = "1" then
%>


pop_profile.asp
look for the two update queries that start
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
scroll down until you find the my_conn.execute statement for the query, and add
response.Cookies(strUniqueID & "User")("strLocalTimeAdjust") = request.Form("localTime") imediately after the execute line.

register.asp
look for the INSERT INTO query, and scroll down till you find it's my_conn.execute and add
response.Cookies(strUniqueID & "User")("strLocalTimeAdjust") = request.Form("localTime") on the line after it.

Well that should be it. let me know if you get any problems.


RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 14 March 2001 :  04:48:09  Show Profile
Huw,

for some reason I couldn't get this to work with the value stored in a cookie, the value was always 0 no matter how many times I changed it.

I did get it working using everything you posted except for the cookie part. I added M_STRTIMEADJUST to the MEMBERS table and changed the input in the members profile to a dropdown box so they couldn't just put in any number.

Works great!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 March 2001 :  06:46:29  Show Profile  Visit HuwR's Homepage
Richard,

don't know why it wouldn't work with the cookie?
could you send me your changes, it was my intent to db it anyway, just didn't have time last night.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 14 March 2001 :  07:18:48  Show Profile
Huw,

I sent you the files to this e-mail address: huw@magicmushroom.org.uk
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 March 2001 :  07:38:40  Show Profile  Visit HuwR's Homepage
got the files thanks Richard, just replaced my bits with yours and added the field worked like a charm.

Go to Top of Page

Horst Petersen
Starting Member

10 Posts

Posted - 26 March 2001 :  11:47:27  Show Profile
so why not share the experience with the whole community?? what do i have to do to get things working also??

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 26 March 2001 :  13:31:02  Show Profile  Visit HuwR's Homepage
quote:

so why not share the experience with the whole community?? what do i have to do to get things working also??





I will be posting the required changes sometime this week, just got back from Spain and a much needed break.

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