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/O Code)
 Timezone MOD
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 08 April 2005 :  16:47:50  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Hmm, I've added all of the code as required but for some reason, when I change the timezone in my profile, it doesn't make the times in the forum reflect the change. Is there something missing?<

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 09 April 2005 :  07:19:26  Show Profile  Reply with Quote
I figured I'd miss something .

The important part.

In "inc_func_common.asp" find this
function chkDate(fDate,separator,fTime)
	if fDate = "" or isNull(fDate) then
		if fTime then
			chkTime(fDate)
		end if
		exit function
	end if

Below that, Add this
arrTempScript = Split(strScriptName, "/")
	strTempScript = arrTempScript(Ubound(arrTempScript))
	strTempScript = lcase(strTempScript)

        if (strMemberTimeAdjust = "1" and strDBNTUserName <> "") then
                if (strTempScript <> "admin_config_datetime.asp" and strTempScript <> "pop_profile.asp") then
                '## If you have a file that you dont time adjustment, add it to line above ###
                        strSql = "SELECT M_TIME_ADJUST, M_DST_ADJUST"
                        strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
                        strSql = strSql & " WHERE M_NAME = '" & strDBNTUserName & "'"

                        set rsMemTime = Server.CreateObject("ADODB.Recordset")
                        rsMemTime.open strSql, my_Conn

                        if rsMemTime.bof or rsMemTime.eof then
                                rsMemTime.close
                                set rsMemTime = nothing
                        else
                                if rsMemTime("M_TIME_ADJUST") = 0 or isnull(rsMemTime("M_TIME_ADJUST")) then
                                        '## Do Nothing
                                else
                                        mTimeAdjust = cSng(rsMemTime("M_TIME_ADJUST"))

                                        if cLng(rsMemtime("M_DST_ADJUST")) = 1 then
                                                mTimeAdjust = mTimeAdjust + 1
                                        end if

                                        strAdjustfDate = DateAdd("h",mTimeAdjust,StrToDate(fDate))

                                        if InStr(mTimeAdjust,".") then
                                                if InStr(mTimeAdjust,"-") then
                                                        intHalfHour = -30
                                                else
                                                        intHalfHour = 30
                                                end if
                                                strAdjustfDate = DateAdd("n",intHalfHour,strAdjustfDate)
                                        end if

                                        fDate = DateToStr(strAdjustfDate)
                                end if
                        rsMemTime.close
                        set rsMemTime = nothing
                        end if
                end if
        end if

Looking at this, I think I'll try something different. I'll let you know if I come up with something.<

    _-/Cripto9t\-_
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 April 2005 :  07:45:57  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Seems to work like a charm.

You should wrap this one up as a working MOD. Really nice work, Cripto. Been waiting for something like this for years!<

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

chazzer
Starting Member

6 Posts

Posted - 21 April 2005 :  10:08:03  Show Profile  Reply with Quote
Cripto-

Agreed. Nice work! It works like a charm!

One word of warning to others... The inc_func_common.asp file may in some cases be referenced in other places off the board. For instance, we display hot topic headlines on the front page of our site... when I applied the updated inc_func_common, the front page started throwing a subscript out of range error [approx line 588 --> strTempScript = arrTempScript(Ubound(arrTempScript))]... Same things happened on my RSS feed page which references the same include.

My workaround was simply to create a different inc_func_common with a different name, and minus the tweaked code... Pointed my homepage and my RSS page to the "old" include, and it all works like a charm now.

There may have been a better way to accomplish that, but that seems easy enough!<
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 21 April 2005 :  12:49:13  Show Profile  Visit MarkJH's Homepage  Reply with Quote
That's funny. I noticed the same error within my Announcement MOD just yesterday.

---

Microsoft VBScript runtime error '800a0009'

Subscript out of range: 'UBound(...)'

/forum/inc_func_common.asp, line 1021

---

I fixed it by changing the line above it (in red) from:

	if fDate = "" or isNull(fDate) then
		if fTime then
			chkTime(fDate)
		end if
		exit function
	end if
	arrTempScript = Split(strScriptName, "/")
	strTempScript = arrTempScript(Ubound(arrTempScript))
	strTempScript = lcase(strTempScript)


to this:

	if fDate = "" or isNull(fDate) then
		if fTime then
			chkTime(fDate)
		end if
		exit function
	end if
	arrTempScript = split(request.servervariables("SCRIPT_NAME"),"/")
	strTempScript = arrTempScript(Ubound(arrTempScript))
	strTempScript = lcase(strTempScript)


This was a bit of an semi-educated guess as a search on these forums for the same error brought up a post to do with an unrelated MOD but the fix was similar.

Somebody who knows what they are doing should probably take a look!<

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

Edited by - MarkJH on 21 April 2005 12:49:34
Go to Top of Page

chazzer
Starting Member

6 Posts

Posted - 21 April 2005 :  13:25:53  Show Profile  Reply with Quote

Interesting.

I was trying to figure out what that line of code was doing, and couldn't figure it out... Sounds like you have a better idea of what's going on... What does that line do?<
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 21 April 2005 :  15:06:27  Show Profile  Visit MarkJH's Homepage  Reply with Quote
I made a search for the error message and this was the only thing that came up. Even though it was for a different MOD, I copied across the code and everything seems to be working.

I have no idea what it does, but it's working! <

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 22 April 2005 :  07:52:30  Show Profile  Reply with Quote
Look at the top of "inc_header", you'll find strScriptName.
strScriptName = request.servervariables("script_name")

If a page uses this function and don't include "inc_header" you will get the error.

What it's does is get the page name e.g. this page is "topic.asp". I have it in there to bypass pages that don't need the member time adjustment.

Chazzer, you should go with Marks fix, so members will have the time adjusted on your homepage. If you guys have a page that doesn't need the time adjustment, add it to this line.
if (strTempScript <> "admin_config_datetime.asp" and  strTempScript <> "pop_profile.asp") then

I think I put a note beside it .

I updated the zip with Marks changes, so other folks won't have the same problem . Thanks guys.
<

    _-/Cripto9t\-_
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 22 April 2005 :  12:00:54  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Thanks for the clarification. <

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

chazzer
Starting Member

6 Posts

Posted - 28 April 2005 :  10:25:07  Show Profile  Reply with Quote

Yeh, I am using Mark's fix... It certainly seems much cleaner than creating a different inc file... And everything looks fine... Although on our home page most folks who see that aren't registered on our board... So there I am just using GMT. Since we have folks from all over the world using the site, that makes the most sense anyway...

Thanks for the mod and the help!

<
Go to Top of Page

scorpswolle
Starting Member

39 Posts

Posted - 28 August 2005 :  06:52:59  Show Profile  Reply with Quote
I have a problem with register.asp

http://www.the-scorpions.com/forum/policy.asp

The drop down menu for the time zone doesn´t show up anything.
The rest is working fine.

Can someone help me?



<

Edited by - scorpswolle on 29 August 2005 18:20:47
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 04 January 2007 :  13:01:06  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Just noticed the same problem on my own site.

Does anybody know why this is occuring?<

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 04 January 2007 :  14:10:09  Show Profile  Visit HuwR's Homepage  Reply with Quote
the dropdown is populated from the database If I remember correctly.<
Go to Top of Page

Max0005
Junior Member

Italy
294 Posts

Posted - 05 January 2007 :  02:32:17  Show Profile  Visit Max0005's Homepage  Send Max0005 a Yahoo! Message  Reply with Quote
quote:
Originally posted by ruirib

It has been done, since that was available for the beta of the upcoming version of Snitz. DOn't know whether it is available as an independent mod, though.



Where can i download it!?<
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 16 January 2007 :  18:47:48  Show Profile  Visit MarkJH's Homepage  Reply with Quote
quote:
Does anybody know why this is occuring?

Any idea, cripto9t?<

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07