View Full Version : [RELEASE] Birthday Hack
This hack adds a birthday field to the users profile. It is viewable when a profile is viewed.
It will be required for the calendar hack.
Birthday Hack v.9 (http://www.hedgehogwheels.com/hacks/birthday_hack.txt)
Maybe stupid question? But why leaving out the birthyear? Is it too difficult?
bad_birthday template doesnt seem to work.
when i modify my profile and change the month to a blank, but fill in a date, it says the administrator has banned my email, instead of giving the error message.
This has nothing to do with your email so you have done something wrong.
i havent the faintest clue about what i did wrong, everything works except for that error, test it out (http://www.ctycamp.com/forums/index.php3)
Rangersfan? luke? anyone?
After looking at the instructions for the Birthday Hack I found your error...
It says:
Add this code:
[begin]
if ( ($day == -1 && $month != -1) || ($day !=-1 && $month == -1) )
{
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_banemail")."\");");
exit;
}
if (($day == -1)&&($month==-1))
{
$birthday = "";
}
else
{
$birthday = $month . "," . $day;
}
[end]
it should be:
Add this code:
[begin]
if ( ($day == -1 && $month != -1) || ($day !=-1 && $month == -1) )
{
eval("echo standarderror(\$bbtitle,\"".gettemplate("bad_birthday")."\");");
exit;
}
if (($day == -1)&&($month==-1))
{
$birthday = "";
}
else
{
$birthday = $month . "," . $day;
}
[end]
Make sure to add the second code twice as the intructions currently say.
p.s. I think a better name for the "bad_birthday" template would be "error_badbirthday" so that it gets listed with the other errors. :)
[Edited by wluke on 10-16-2000 at 04:48 PM]
[smacks himself in the head] shoulda seen that! lol, only started using vB a couple of weeks ago, but I've been watching the boards for a number of months
Nice hack Rangersfan
What do you have to do to have the year of birth included as an option? like you have on your board.
I just need to update the instructions, will try to also get that done :)
One of my users emailed me that her birthday was showing up wrong on the calendar. She claimed she was 28 but she was born in Dec 1972. I has to explain to her that she was really 27 and not as old as she thought. The calendar does have its benefits for the age-challenged users out there.
I've added the table, edited member.php, and modified the templates.
How come it won't show up in the profile?
http://aforums.com/member.php?action=getinfo&userid=31
I dont even see the row that you should have put in the getinfo template so you at least need to do that (it is in the instructions)
hmm ... dont see any differents after installing this hack. YES, i added the variable in 'getinfo'-template
$birthday
thx so far
hi!
will u make a real final that works 100 percent....
if u do let me know ;)
thx
i need the hack
its very usefull
THX
"real final"?
This does work 100% if you follow the instructions.
In any event I will not mess with this anymore as vb2.0 will allow you to input birthdays.
ok
thx for fast answer
*wondering*
i am not new here but my first post .....
thx anyway will wate for 2.0
in your file you said (ie edit member.php)
Find this line:
$username=htmlspecialchars($userinfo[username]);
Add this BEFORE it!
[begin]
if ($userinfo[birthday] != "")
{
$birthdate = explode(",",$userinfo[birthday]);
if ($birthdate[0] == 1)
{ $birthday = "January " . $birthdate[1]; }
else if ($birthdate[0] == 2)
{ $birthday = "February " . $birthdate[1]; }
else if ($birthdate[0] == 3)
{ $birthday = "March " . $birthdate[1]; }
else if ($birthdate[0] == 4)
{ $birthday = "April " . $birthdate[1]; }
else if ($birthdate[0] == 5)
{ $birthday = "May " . $birthdate[1]; }
else if ($birthdate[0] == 6)
{ $birthday = "June " . $birthdate[1]; }
else if ($birthdate[0] == 7)
{ $birthday = "July " . $birthdate[1]; }
else if ($birthdate[0] == 8)
{ $birthday = "August " . $birthdate[1]; }
else if ($birthdate[0] == 9)
{ $birthday = "September " . $birthdate[1]; }
else if ($birthdate[0] == 10)
{ $birthday = "October " . $birthdate[1]; }
else if ($birthdate[0] == 11)
{ $birthday = "November " . $birthdate[1]; }
else if ($birthdate[0] == 12)
{ $birthday = "December " . $birthdate[1]; }
else
{ $birthday = "DOH! Error"; }
}
else
{
$birthday = " ";
}
[end]
But i cannot found such coding
how can I add a birthday year?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.