I have this mod for my forum and it calls the birthdate from the database. I would like to have it not see the year. What is happening if a person puts a year in the box in their profile it makes it Dec 31st because that year is already over. There is no way to remove that box from the code according to the forum tech people. I've added the two pieces that refer to date. It already is written where it only shows the month and day in the view. Thank you to anyone that can help.
[PHP]$birthdays = get_birthdays();
if(!$birthdays) {
$text = 'No birthdays yet';
} else {
$num = count($birthdays);
$i = 1;
foreach($birthdays as $b) {
$date = explode("-", $b["user_birthday"]);
$user = get_user($b["user_id"]);
$user_menus[] = create_user_popup($user);
if($date[2] == date('j')) {
$text.= "<img src='" . BASE_DIR . "/birthday.gif' title=\"User's birthday today!\"/>";
$dateprint = '<span style=\'color:red\'><strong>TODAY!</strong></span>';
} else {
$dateprint = date('F jS', mktime(0, 0, 0, $date[1], $date[2], $date[0]));
}
$text .= user_link_code($b["user_id"], $b["user_name"]);
$text .= " (" . $dateprint . ")";
if($num > $i) {
$text .= ', ';
}
$i++;
}
} [/PHP]
[PHP]/**** BEGIN BIRTHDAYS TODAY ****/
function get_birthdays() {
$result = db_query("SELECT user_id, user_name, user_birthday FROM wowbb_users
WHERE DAYOFMONTH(user_birthday) >= DAYOFMONTH(NOW()) AND MONTH(user_birthday) = MONTH(CURRENT_DATE) AND DAYOFMONTH(user_birthday) < DAYOFMONTH(CURRENT_DATE)+7
ORDER BY DAYOFMONTH(user_birthday) ASC;");
while($row = db_fetch_row($result)) {
$birthdays[] = $row;
}
return $birthdays;
}
/**** END BIRTHDAYS TODAY ****/[/PHP]