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 - 21 January 2007 :  13:38:15  Show Profile  Visit MarkJH's Homepage  Reply with Quote
I think I have an idea on how to fix this. In cripto's zip file, there were no changes made to register.asp. Maybe the changes made to pop_profile.asp should be made to register.asp?<

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

Rob Alan
Starting Member

10 Posts

Posted - 21 January 2007 :  22:51:00  Show Profile  Reply with Quote

Edited by - Rob Alan on 21 January 2007 22:53:57
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 27 January 2007 :  07:54:06  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Works great Rob but it doesn't show the Daylight Savings box on register.asp. Got a fix for that?

Also, have you tested this to make sure it 'sticks' for a newly registered user?<

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 - 27 January 2007 :  19:13:51  Show Profile  Reply with Quote
Sorry its taken me so long to reply guys.
I think I fixed it. It's the ChkSelect2 function causing the problem.

Replace this code
	        for iTimeAdjust = 0 to ubound(intTimeAdjust)
		        Response.Write	"                          <option value=""" & intTimeAdjust(iTimeAdjust) & """ " & ChkSelect2(rs("M_TIME_ADJUST"),intTimeAdjust(iTimeAdjust)) & ">" & txtTime(iTimeAdjust) & "</option>" & vbNewLine
	        next
With this
	        for iTimeAdjust = 0 to ubound(intTimeAdjust)
		        Response.Write	"                          <option value=""" & intTimeAdjust(iTimeAdjust) & """"
                        if strMode = "Register" then
                                if iTimeAdjust = "13" then response.Write "selected"
                        else
                                Response.Write  ChkSelect2(rs("M_TIME_ADJUST"),intTimeAdjust(iTimeAdjust))
                        end if
                        Response.Write  ">" & txtTime(iTimeAdjust) & "</option>" & vbNewLine
	        next

Let me know how it works out<

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 28 January 2007 :  11:01:59  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Seems to work fine, Cripto.

Still doesn't show the Daylight Savings box on register.asp, though.<

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 - 02 February 2007 :  07:42:43  Show Profile  Reply with Quote
hmmm... Like the chkSelect function the chkCheckbox function depends on a value from the members table that doesn't exist if your registering.
So if I check strMode... I'll be back<

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

cripto9t
Average Member

USA
881 Posts

Posted - 02 February 2007 :  10:03:50  Show Profile  Reply with Quote
Mark I got the dst box fixed. Also I had to make some changes to "register.asp" because the inputs weren't "sticking" as you said.
I'm not going to post the changes here. Just download the zip file again.
Make the change I marked in "inc_profile.asp" and make the 4 changes in "register.asp".

Let me know how it goes.<

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 02 February 2007 :  16:41:51  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Installed and working great. Good work!

I do have a slight problem though, and it's nothing to do with your MOD but something that maybe would be easy to fix...

I have the following code installed in inc_func_common.asp from kwhipp's Today/Yesterday MOD.

select case Mid(Request.ServerVariables("SCRIPT_NAME"), InstrRev(Request.ServerVariables("SCRIPT_NAME"), "/")+1)
    case "admin_accounts_pending.asp", _
         "admin_config_datetime.asp", _
         "pop_printer_friendly.asp"
      '
      ' For any page that needs the actual date, add the file name to the above case statement.
      '
    case else
      select case left(fDate,8)
        case left(DateToStr(date),8)
          chkDate = "Today"
        case left(DateToStr(date-1),8)
          chkDate = "Yesterday"
      end select
  end select
  if fTime then
    chkDate = chkDate & separator & chkTime(fDate)
  end if


The code just replaces today's and yesterday's dates with the words "Today" and "Yesterday". Thing is, it doesn't follow the Timezone time rules and at midnight, when today becomes yesterday, instead, yesterday remains "Today" and today just has a date. I hope that made sense...

Can you see in the code how this could be fixed?

If you can do this, maybe along with kwhipp's code, this would be great all wrapped up in a fully working MOD Add-On Forum (W/Code)/Snitzbitz MOD. <

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 - 04 February 2007 :  15:14:26  Show Profile  Reply with Quote
I'll give it a look Mark.<

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 04 February 2007 :  18:18:31  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Thanks. <

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 06 February 2007 :  18:33:23  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Anything on this, Cripto? I know you're busy with the quiz MOD but I was just wondering if you'd taken a look at the code.<

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 11 February 2007 :  11:04:47  Show Profile  Visit MarkJH's Homepage  Reply with Quote
I don't think that registration works with your changes, Cripto.

Just tried to register and got this error:

Microsoft OLE DB Provider for SQL Server error '80040e14' 

Invalid column name 'M_TIME_ADJUST'. 

/forum/register.asp, line 804


I'll have to remove the code for the time being. <

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 - 13 February 2007 :  09:39:57  Show Profile  Reply with Quote
Run this through mod set up
[ALTER]
MEMBERS_PENDING
ADD#M_TIME_ADJUST#varchar(4)##0
ADD#M_DST_ADJUST#smallint##0
[END]

I'm hoping you had e-mail validation turned on when you got the error and that this will fix it.

I finally got a day off today and I'll give the yesterday/today thing a look.
<

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

cripto9t
Average Member

USA
881 Posts

Posted - 13 February 2007 :  11:49:23  Show Profile  Reply with Quote
Mark, I threw this together and it seems to be working pretty good for the today part.
I don't have post to check the yesterday part.
It's more of a hack than anything. It basically hijacks the chkDate() function if the last post is less than 2 days old.
I thought I had kwhipps mod down somewhere but I couldn't find it.
I did find some of my old stuff that converts last post to a "1 hr 2 mins ago" like format, if your interested.

in the time adjust code in inc_func_common.asp

right after these lines
rsMemTime.close
                        set rsMemTime = nothing
                        end if

Add this
'yesterday/today hack pt. 1
                        strUserFriendlyDate = true            '$$ on/off switch - true for on / false for off

                        if strUserFriendlyDate then
                                if chkUFD(fDate) = 1 then
                                        if trim(getUFD(fDate,fTime)) <> "" then
                                                chkDate = getUFD(fDate,fTime)
                                                exit function
                                        end if
                                end if
                        end if

                        '$$ end pt 1

And right after the chkDate() function add this
'$$ yesterday/today hack pt. 2
function chkUFD(fDate)
        dim tmpDate

        tmpDate = StrToDate(fDate)

        if DateDiff("d",tmpDate,Date) < 2 then
                chkUFD = 1
        else
                chkUFD = 0
        end if 
end function

function getUFD(fDate,fTime)
        dim thisDate,tmpDate
        
        thisDate = StrToDate(fDate)
        tmpDate = ""
        if DateDiff("d",thisDate,Date) = 0 then
                tmpDate = tmpDate & "Today"
        elseif DateDiff("d",thisDate,Date) = 1 then
                tmpDate = tmpDate & "Yesterday"
        end if

        if fTime then
                tmpDate = tmpDate & " at " & chkTime(fDate)
        end if

        getUFD = tmpDate
end function

'$$ end pt. 2





<

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 22 February 2007 :  13:29:33  Show Profile  Visit MarkJH's Homepage  Reply with Quote
Sorry about the late reply. I've been too busy to have a good look and test of this.

Right...

quote:
Run this through mod set up

[ALTER]
MEMBERS_PENDING
ADD#M_TIME_ADJUST#varchar(4)##0
ADD#M_DST_ADJUST#smallint##0
[END]

I'm hoping you had e-mail validation turned on when you got the error and that this will fix it.

It fixed it good. Created a test account, changed the time to -1 GMT in my registration profile, logged on... -1 GMT. Excellent!

As to your today/yesterday fix, I found another way of doing it which is much simpler and kept the formatting intact - here. Haven't tested whether or not it works past midnight okay but I'll see tonight.

Thanks for all the work you've done with this, Cripto9t. Hopefully, that's all the bugs ironed out now. <

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