show in profile when user has birthday - Posted (592 Views)
Senior Member
tribaliztic
Posts: 1532
1532
I would like to have a little birthday cake or something like that show up in the profiles and maybe under the avatar beside the posts when the user in question has a birthday today.
I found that in FORUM_MEMBERS there is a M_DOB with the entered birth date for the user. I also found FORUM_MEMBERS_BDAYS with memberid and a date.
Which of those would be best to use?
If I use the M_DOB I have to modify the M_DOB and compare it with today's date. If I use the date from MEMBERS_BDAYS I just have to compare the date.

Is this correct?
The date in MEMBERS_BDAYS, is this updated once a year or what? Most of my users has a date in 2005 but some have dates in 2006, how come? <
/Tribaliztic
- www.gotlandrace.se -
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Senior Member
tribaliztic
Posts: 1532
1532
I saw that the M_DOB was already read from the DB in the profile page so I solved it by doing this:
birthday = Left(chkDate(rs("M_DOB")," ",false), Len(chkDate(rs("M_DOB")," ",false))-5)
today = Left(chkDate(DateToStr(strForumTimeAdjust)," ",false), Len(chkDate(DateToStr(strForumTimeAdjust)," ",false))-5)
if birthday = today then

showsomenicepicofabirthdaycakeorsomethinghere

end if

I'm sure there is a better way to do this though, any input would be nice =)<
/Tribaliztic
- www.gotlandrace.se -
 
You Must enter a message