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
 Age And DATE OF BIRTH??
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 23 November 2002 :  17:07:19  Show Profile  Visit MaD2ko0l's Homepage
Hi all,
ok this is wot i need. in the profile i need it to display either:
1) Just Age
2) Just Date Of Birth
3) Age And Date Of Birth

can someoen tell me wot i need to do so that i can do this modification?

thankx

MaD2ko0l

© 1999-2010 MaD2ko0l

Rasco
Advanced Member

Germany
3192 Posts

Posted - 23 November 2002 :  18:28:34  Show Profile  Send Rasco an ICQ Message
In admin_config_members.asp you can uncomment the following.

if Request.Form("strAge") = "1" and Request.Form("strAgeDOB") = "1" then
Err_Msg = Err_Msg & "<li>Age and Birth Date cannot both be On at the same time</li>"
end if

Now, you can choose both "Age" and "Date of birth" but since date of birth calculates the age, you now have a double age in the when viewing a members profile.

German Snitz Forum
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 23 November 2002 :  19:43:47  Show Profile  Visit MaD2ko0l's Homepage
if Request.Form("strAge") = "1" and Request.Form("strAgeDOB") = "1" then
Err_Msg = Err_Msg & "<li>Age and Birth Date cannot both be On at the same time</li>"
end if

uncomment??? u mean comment it out.

is there anyway to make it show the date and not the age???

© 1999-2010 MaD2ko0l
Go to Top of Page

Rasco
Advanced Member

Germany
3192 Posts

Posted - 24 November 2002 :  04:12:41  Show Profile  Send Rasco an ICQ Message
Oups, you`re right.
Showing the date likely means some changed in pop_datepicker.asp, but I don`t know how to do it.

German Snitz Forum
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 24 November 2002 :  04:32:41  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
Not in pop_datepicker, in pop_profile, you need to phrase the dob to a date insted of calculating the age from it.
in line 557 delete\comment this at the end of the line
& _

From line 558, change this:
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & DisplayUsersAge(strDOB) & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine

to this:
if not(isnull(strDOB) then response.write " <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strDOB & "</font></td>" & vbNewLine & _
response.write " </tr>" & vbNewLine

Edited to handle null DOB

Edited by - David K on 24 November 2002 04:51:19
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 24 November 2002 :  04:57:02  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
of curse i would also reccomend to modify the precceding line to say DOB insted of age
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 25 November 2002 :  15:30:48  Show Profile  Visit MaD2ko0l's Homepage
ok then it works fine now but i need to to be dislayed as a date and not as numbers.

how do i do this?

can u hel plz??

thankx

MaD2ko0l

© 1999-2010 MaD2ko0l
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 25 November 2002 :  15:45:11  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
I'm glad it helps, but I'll have to make an include file to display it as a date (based on datepicker)
it should take a few days
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 25 November 2002 :  17:49:43  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
I'm sorry, I was wrong in the time estimate, it took a few hours!
Read all about my new MOD here
Remember that you need to revert some lines back to their original (I did most of the code changes in the file itself)
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 25 November 2002 :  18:04:14  Show Profile
Showing Birthdate in profile.

File: pop_profile.asp

Lines: 553-560
			
strDOB = rs("M_DOB")
			
if (strAgeDOB = "1" and Trim(strDOB) <> "") then
        strDOB = DOBToDate(strDOB)
	Response.Write	"                    <tr>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Age: </font></b></td>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & DisplayUsersAge(strDOB) & "</font></td>" & vbNewLine & _
	"                    </tr>" & vbNewLine
end if


Modify the text highlighted in blue in above statements as below. The changes are shown in red below.

			
strDOB = rs("M_DOB")
if (strAgeDOB = "1" and Trim(strDOB) <> "") then
	Response.Write	"                    <tr>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Birthdate: </font></b></td>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & chkDate(strDOB, "", false) & "</font></td>" & vbNewLine & _
	"                    </tr>" & vbNewLine
end if

Edited by - GauravBhabu on 26 November 2002 12:13:18
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 25 November 2002 :  18:16:23  Show Profile
David K, I did not see your post as I was posting the changes required. However, I used the already available functionality in the code instead of creating a new function. Displaying birthdate just requires calling a different function.
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 25 November 2002 :  18:26:32  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
My MOD writes a sentence example:
The 21st of November, 2000.

So it's a little diffrent.
and you have a type-o in your code, it should be:
chkDate(strDOB, "", false)
not:
chkDate(strMDOB, "", false)
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 25 November 2002 :  18:36:43  Show Profile
quote:
Originally posted by David K
My MOD writes a sentence example:
The 21st of November, 2000.
So it's a little diffrent.


Sure it is different.

I chose chkDate to keep the date display consistent with the date display at other pages in the forum.


quote:
Originally posted by David K
...you have a type-o in your code...

corrected.

Edited by - GauravBhabu on 25 November 2002 18:41:40
Go to Top of Page

David K
Junior Member

494 Posts

Posted - 26 November 2002 :  04:05:00  Show Profile  Send David K an AOL message  Send David K an ICQ Message  Send David K a Yahoo! Message
Now everybody has one of the greatest advantages in a democratic world: Choice!
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 26 November 2002 :  11:38:41  Show Profile  Visit MaD2ko0l's Homepage
quote:
Originally posted by GauravBhabu

Showing Birthdate in profile.

File: pop_profile.asp

Lines: 553-560
			
strDOB = rs("M_DOB")
			
if (strAgeDOB = "1" and Trim(strDOB) <> "") then
        strDOB = DOBToDate(strDOB)
	Response.Write	"                    <tr>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Age: </font></b></td>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & DisplayUsersAge(strDOB) & "</font></td>" & vbNewLine & _
	"                    </tr>" & vbNewLine
end if


Modify the text highlighted in blue in above statements as below. The changes are shown in red below.

			
strDOB = rs("M_DOB")
if (strAgeDOB = "1" and Trim(strDOB) <> "") then
        strDOB = DOBToDate(strDOB)
	Response.Write	"                    <tr>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Birthdate: </font></b></td>" & vbNewLine & _
	"                      <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & chkDate(strDOB, "", false) & "</font></td>" & vbNewLine & _
	"                    </tr>" & vbNewLine
end if





if i use this code it gets displayed like this

Birthdate: 87/19/1/2/


when i use david_k's it doesnyt work it comes up with a error

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'DOBDateTo'

/mad/portal/pop_profile.asp, line 632

© 1999-2010 MaD2ko0l
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 26 November 2002 :  12:12:12  Show Profile
corrected try now
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07