MyBB Community Forums

Full Version: Member Birthday
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering how to change the member birthday to display like 05/03/1992 instead of 05-03-1992, is this possible? 

if($memprofile['birthday'])
	{
		$membday = explode("-", $memprofile['birthday']);

		if($memprofile['birthdayprivacy'] != 'none')
		{
			if($membday[0] && $membday[1] && $membday[2])
			{
				$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));

				if($membday[2] >= 1970)
				{
					$w_day = date("l", mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]));
					$membday = format_bdays($mybb->settings['dateformat'], $membday[1], $membday[0], 

$membday[2], $w_day);
				}

I have changed the hyphen in this code next to explode but that made the dob display incorrectly.
It is determined by your date format setting in the ACP. If you only want the format for birthday changed you'll need to change $mybb->settings['dateformat'] to your desired format.
Piggy backing on this request. Is there a way to format {$membday} to display month and day only, leaving off year. In member profile template.
Maybe try removing the -Y in the m-d-Y in the date and format settings?
(02-11-2015, 01:17 AM)trammellk Wrote: [ -> ]Maybe try removing the -Y in the m-d-Y in the date and format settings?

How and where would that happen?
(02-11-2015, 01:30 AM)user25 Wrote: [ -> ]
(02-11-2015, 01:17 AM)trammellk Wrote: [ -> ]Maybe try removing the -Y in the m-d-Y in the date and format settings?

How and where would that happen?

In Date and format settings..which are under "Configurations".
(02-11-2015, 01:40 AM)Itsasmileee Wrote: [ -> ]
(02-11-2015, 01:30 AM)user25 Wrote: [ -> ]
(02-11-2015, 01:17 AM)trammellk Wrote: [ -> ]Maybe try removing the -Y in the m-d-Y in the date and format settings?

How and where would that happen?

In Date and format settings..which are under "Configurations".

That removes the year from forum posts also, and changes the posting times in threads, just to name a few of the thing that will go wonky if I remove the Y
Then I have no clue. I hope you figure it out though.