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
 Birthdays MOD
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 11 August 2004 :  23:26:33  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
OK, looked like I've deleted the forum where I had made the modifications, so I had to do it again - sorry for the delay.

Here are the instructions:

inc_profile.asp
Find the following code (approx. lines 352-360):
	if strAgeDOB = "1" then
		Response.Write	"                    <script language=""JavaScript"" type=""text/javascript"" src=""inc_datepicker.js""></script>" & vbNewLine
		Response.Write	"                    <tr>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Birth Date: </font></b></td>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input type=""hidden"" name=""AgeDOB"" id=""AgeDOB"" value="""
		if strMode <> "Register" then Response.Write(trim(ChkString(rs("M_DOB"), "display")))
		Response.Write	"""><a href=""javascript:_ShowPopupCalendar( 'Form1', 'AgeDOB', false )"">" & getCurrentIcon(strIconCalendar,"Choose Date","align=""absmiddle""") & "</a></font></td>" & vbNewLine & _
				"                    </tr>" & vbNewLine
	end if

and replace it with the following code:
	if strAgeDOB = "1" then
		strDOByear = ""
		strDOBmonth = ""
		strDOBday = ""
		If strMode <> "Register" then 
			strMDOB = trim(ChkString(rs("M_DOB"), "display"))
			If strMDOB <> "" Then
				strDOByear = Mid(strMDOB,1,4)
				strDOBmonth = Mid(strMDOB,5,2)
				strDOBday = Mid(strMDOB,7,2)
			End If
		End If
		Response.Write	"                    <tr>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Birth Date: </font></b></td>" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
		Response.Write  "<select name=""DOBmonth"">" & vbNewLine & _
				"<option value="""" " & chkSelect("",strDOBmonth) & "> - </option>" & vbNewLine
		For intMonthCntr = 1 to 12
			Response.Write "<option value=""" & doublenum(intMonthCntr) & """ "
			If strMode <> "Register" Then Response.Write chkSelect(intMonthCntr,CLng(strDOBmonth))
			Response.Write ">" & monthname(intMonthCntr) & "</option>" & vbNewLine
	        Next		
                Response.Write  "</select> <select name=""DOBday"">" & vbNewLine & _
				"<option value="""" "
				If strMode <> "Register" Then 
					Response.Write chkSelect("",strDOBday)
				End If
				Response.Write "> - </option>" & vbNewLine		       
		For intDayCntr = 1 to 31 step 1 
			Response.Write  "<option value=""" & doublenum(intDayCntr) & """ "
			If strMode <> "Register" Then Response.Write chkSelect(intDayCntr,CLng(strDOBday))
			Response.Write ">" & intDayCntr & "</option>" & vbNewLine
		Next
		Response.Write  "</select> <select name=""DOByear"">" & vbNewLine & _
				"<option value=""""> - </option>" & vbNewLine
		For intYearCntr = 1901 to Year(strForumTimeAdjust) step 1
			Response.Write	"    	<option value=""" & intYearCntr & """ " 
			If strMode <> "Register" Then Response.Write chkSelect(intYearCntr,CLng(strDOByear)) 
			Response.Write ">" & intYearCntr & "</option>" & vbNewLine
		Next
		Response.Write  "</select>" & vbNewLine & _
				"                        </font>" & vbNewLine & _
				"		       </td>" & vbNewLine & _
				"                    </tr>" & vbNewLine
	end if


register.asp
Find the following code (approx. lines 532-536):
			if strAgeDOB = "1" then
				strSql = strsql & ", '" & ChkString(Request.Form("AgeDOB"),"SQLString") & "'"
			else
				strSql = strsql & ", ''"
			end if

and replace it with the following code:
			if strAgeDOB = "1" then
				strMDOB = ChkString(Request.Form("DOByear"),"SQLString") & ChkString(Request.Form("DOBmonth"),"SQLString") & ChkString(Request.Form("DOBday"),"SQLString")
				if len(strMDOB) < 8 Then strMDOB = " "
				strSql = strsql & ", '" & strMDOB & "'"
			else
				strSql = strsql & ", ''"
			end if


pop_profile.asp
Find the following code (approx. lines 1216-1218):
			if strAgeDOB = "1" then
				strSql = strsql & ",	M_DOB = '" & ChkString(Request.Form("AgeDOB"),"SQLString") & "'"
			end if

and replace it with the following code:
			if strAgeDOB = "1" then
				strMDOB = ChkString(Request.Form("DOByear"),"SQLString") & ChkString(Request.Form("DOBmonth"),"SQLString") & ChkString(Request.Form("DOBday"),"SQLString")
				if len(strMDOB) < 8 Then strMDOB = " "
				strSql = strsql & ",	M_DOB = '" & strMDOB & "'"
			end if


find the following code (approx. lines 1517-1519):

					if strAgeDOB = "1" then
						strSql = strsql & ", M_DOB = '" & ChkString(Request.Form("AgeDOB"),"SQLString") & "'"
					end if

and replace it with the following code:

					if strAgeDOB = "1" then
						strMDOB = ChkString(Request.Form("DOByear"),"SQLString") & ChkString(Request.Form("DOBmonth"),"SQLString") & ChkString(Request.Form("DOBday"),"SQLString")
						if len(strMDOB) < 8 Then strMDOB = " "
						strSql = strsql & ", M_DOB = '" & strMDOB & "'"
					end if


I will also add it to my Snitzy Code Snippets collection.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 30 August 2004 17:40:21
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 August 2004 :  06:10:00  Show Profile
Woo! Ta muchly, OWM. Looking forward to tinkering with this.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 12 August 2004 :  07:00:28  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Oh, forgot to add: you can test it at my forum (username: guest / password: snitz)

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

ukcw
Junior Member

121 Posts

Posted - 12 August 2004 :  14:26:47  Show Profile
Hi OneWayMule!

Hope you are feeling completely better now :-)

Have installed the updates...all appears to be fine. Many thanks for your excellent work! :-)

Edited by - ukcw on 12 August 2004 14:27:26
Go to Top of Page

ukcw
Junior Member

121 Posts

Posted - 13 August 2004 :  15:16:20  Show Profile
Hi OneWayMule

HELP!!!

I've installed the code you suggested above and I think something may be a little wrong...the profiles displayed OK before I added the code, but now I'm getting this:

http://www.ukcc.jireh.org/screengrab.gif

(hopefully yuou can see a screen grab of the profile page (I've blurred out potentially sensitive details!)) The page does not appear to build properly for anyone who's registered since I added the extra code - I don't know if it's to do with the code being added or something else, and I don't know if it's going wrong when people update their profiles either!

Any suggestions from anyone would be fantastic - I'm concerned that people can't access their profiles properly!

Thank you for your help :-)

Edited by - ukcw on 28 August 2004 07:35:46
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 28 August 2004 :  11:03:55  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Looks like you've messed something up.

Can you post links to .txt version of your inc_profile.asp, register.aso, pop_profile.asp files?

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

ukcw
Junior Member

121 Posts

Posted - 28 August 2004 :  12:37:17  Show Profile
Hi!

Sure - this has been done...I bet it's something simple and stupid I've done! The files are located here:

http://www.ukcc.jireh.org/pop_profile.txt
http://www.ukcc.jireh.org/inc_profile.txt
http://www.ukcc.jireh.org/register.txt

Hope this helps. Just one thought I had - could it be something to do with the way my customised interface is coded, and therefore this could be causing a sub-table to be generated in the profile details incorrectly stopping the info from displaying properly?

Edited by - ukcw on 29 August 2004 04:08:55
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 29 August 2004 :  04:20:54  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
The files look OK, post a link to your forum and a test account so I can take a look.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

ukcw
Junior Member

121 Posts

Posted - 30 August 2004 :  10:53:24  Show Profile
Hi OneWayMule

Thanks for taking a look at the files. I've done some more investigating, and it appears, I think, that the problem with the record was that the birth DAY (i.e. 01-31) was filled in with a '-' for some reason...does this mean the person didn't select a day, and therefore the page didn't like what it saw when it was trying to build the page? Is there a way round this if it's a problem - everything else seems to be working OK...I went in as admin and changed the birhtdate to something valid and it displays properly now.

Do people have a choice to leave their birthdate black if they want, and/or change it back to being blank? If so, is it simple to do - or not?

Many thanks for your help :-)
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 30 August 2004 :  10:56:56  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
I'll post a fix ASAP.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

ukcw
Junior Member

121 Posts

Posted - 30 August 2004 :  11:01:49  Show Profile
Hi again

OK - just done some more experimenting, and it's definitely only a problem when someone registers or changes their birthdate to include a part completed birthdate for example August '-' 1980 - the blank day causes the screen not to build properly.

Hope this helps
Sorry to be a pain!
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 30 August 2004 :  11:06:28  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Thanks for the info, looks like I've forgotten to test this.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 30 August 2004 :  17:42:01  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
OK, I've updated the instructions, there's 2 new lines in pop_profile.asp and 1 new line in register.asp (I've marked the new code green).

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

ukcw
Junior Member

121 Posts

Posted - 31 August 2004 :  17:13:54  Show Profile
Hi

Thanks OneWayMule - that fix seems to work fine... what happens now is that the date defaults to blank and doesn't display in the profile (but the rest of the profile displays fine) if anything other than all three fields are filled in. Is this how you intended it to work? It seems to work great to me!

Many thanks again...you seem really pritty good at all this programming stuff - I'm impressed :-)
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 31 August 2004 :  17:22:06  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Yup, only if all 3 fields (day, month, year) are filled in the birthdate will be written into the database, otherwise the birthdate value is set to blank.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07