Good evening, and thank you for the reply.stevemaury wrote: ↑Sun May 12, 2019 10:12 pm That is controlled by the php DATE function, which you can set for Guests in Board settings and for yourself in the User control panel. Capital 'F' is what you want. See https://www.php.net/manual/en/function.date.php
And you are saying this does or does not already achieve your goal, by displaying a full name of the month where the "F" is positioned within that date format string?Webmaster Chuck wrote: ↑Tue May 14, 2019 5:39 am I currently have my date set up as "|l F jS, Y| - g:i a".
Good morning. I was talking screenshots earlier this morning to post on here..EA117 wrote: ↑Tue May 14, 2019 5:49 amAnd you are saying this does or does not already achieve your goal, by displaying a full name of the month where the "F" is positioned within that date format string?Webmaster Chuck wrote: ↑Tue May 14, 2019 5:39 am I currently have my date set up as "|l F jS, Y| - g:i a".
If this is what your date format is already set to, but you're still seeing a scenario where "I need to display the month as a name instead of a number", perhaps we need to see a screen shot that confirms exactly what you're seeing & where.
It mattered enough to come here and ask. It's being displayed right where he's showing the screen shot: On the input form.stevemaury wrote: ↑Wed May 15, 2019 7:33 pm If they aren't displayed, it hardly matters whether the month is spelled out.
Agreed, this isn't an invocation of "please display this current or posting date in the user's selected format." This selection dialog, and the fact each date component is separately selectable, is uniquely constructed just for the birthday input. Neither the user's date format selection nor the board date format selection will affect this birthday input form.Webmaster Chuck wrote: ↑Wed May 15, 2019 4:48 pm And this one, when someone selects their birthday, it doesn't show the month in the words, simply the month number:
Code: Select all
<label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
Code: Select all
<label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month">
<!-- IF S_USER_LANG eq 'en-gb' -->
<script>
var verbose_date_selection = '{S_BIRTHDAY_MONTH_OPTIONS}';
verbose_date_selection = verbose_date_selection.replace('>1<', '>January<');
verbose_date_selection = verbose_date_selection.replace('>2<', '>February<');
verbose_date_selection = verbose_date_selection.replace('>3<', '>March<');
verbose_date_selection = verbose_date_selection.replace('>4<', '>April<');
verbose_date_selection = verbose_date_selection.replace('>5<', '>May<');
verbose_date_selection = verbose_date_selection.replace('>6<', '>June<');
verbose_date_selection = verbose_date_selection.replace('>7<', '>July<');
verbose_date_selection = verbose_date_selection.replace('>8<', '>August<');
verbose_date_selection = verbose_date_selection.replace('>9<', '>September<');
verbose_date_selection = verbose_date_selection.replace('>10<', '>October<');
verbose_date_selection = verbose_date_selection.replace('>11<', '>November<');
verbose_date_selection = verbose_date_selection.replace('>12<', '>December<');
document.write(verbose_date_selection);
</script>
<!-- ELSE -->
{S_BIRTHDAY_MONTH_OPTIONS}
<!-- ENDIF -->
</select></label>
$s_birthday_month_options
value in /includes/ucp/ucp_profile.php and /includes/acp/acp_users.php, with something like my quick and un-sexy example here:Code: Select all
$s_birthday_month_options = '<option value="0"' . ((!$data['bday_month']) ? ' selected="selected"' : '') . '>--</option>';
for ($i = 1; $i < 13; $i++)
{
$verbose_month = 'Unknown';
switch ($i)
{
case 1:
$verbose_month = $user->lang['datetime']['January'];
break;
case 2:
$verbose_month = $user->lang['datetime']['February'];
break;
case 3:
$verbose_month = $user->lang['datetime']['March'];
break;
case 4;
$verbose_month = $user->lang['datetime']['April'];
break;
case 5:
$verbose_month = $user->lang['datetime']['May'];
break;
case 6:
$verbose_month = $user->lang['datetime']['June'];
break;
case 7:
$verbose_month = $user->lang['datetime']['July'];
break;
case 8:
$verbose_month = $user->lang['datetime']['August'];
break;
case 9:
$verbose_month = $user->lang['datetime']['September'];
break;
case 10:
$verbose_month = $user->lang['datetime']['October'];
break;
case 11:
$verbose_month = $user->lang['datetime']['November'];
break;
case 12:
$verbose_month = $user->lang['datetime']['December'];
break;
}
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
$s_birthday_month_options .= "<option value=\"$i\"$selected>$verbose_month</option>";
}
And it is with intention - because you can put in a date without a year for just showing the birthday, but not the age in the profile.
That's a personal opinion.
What's "military time"? Your talking about the 24 hour format? That is standard time, not the 12 hour time format
Yep. If there was something in there for how this affects helping OP achieve the requested goal, I missed it.canonknipser wrote: ↑Thu May 16, 2019 6:07 pm But hey - this is about a input method a user uses in most cases only once in his board membership time ...
EA117 wrote: ↑Wed May 15, 2019 8:38 pmMeaning for example in the ucp_profile_profile_info.html template, replace the following line:stevemaury wrote: ↑Wed May 15, 2019 7:33 pm If they aren't displayed, it hardly matters whether the month is spelled out.
With a block such as:Code: Select all
<label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
This is EXACTLY what I was looking for. I made this one change in my test environment, logged in, and the UCP for one of my test accounts showed this: That is perfect! Thank you!Code: Select all
<label for="bday_month">{L_MONTH}{L_COLON} <select name="bday_month" id="bday_month"> <!-- IF S_USER_LANG eq 'en-gb' --> <script> var verbose_date_selection = '{S_BIRTHDAY_MONTH_OPTIONS}'; verbose_date_selection = verbose_date_selection.replace('>1<', '>January<'); verbose_date_selection = verbose_date_selection.replace('>2<', '>February<'); verbose_date_selection = verbose_date_selection.replace('>3<', '>March<'); verbose_date_selection = verbose_date_selection.replace('>4<', '>April<'); verbose_date_selection = verbose_date_selection.replace('>5<', '>May<'); verbose_date_selection = verbose_date_selection.replace('>6<', '>June<'); verbose_date_selection = verbose_date_selection.replace('>7<', '>July<'); verbose_date_selection = verbose_date_selection.replace('>8<', '>August<'); verbose_date_selection = verbose_date_selection.replace('>9<', '>September<'); verbose_date_selection = verbose_date_selection.replace('>10<', '>October<'); verbose_date_selection = verbose_date_selection.replace('>11<', '>November<'); verbose_date_selection = verbose_date_selection.replace('>12<', '>December<'); document.write(verbose_date_selection); </script> <!-- ELSE --> {S_BIRTHDAY_MONTH_OPTIONS} <!-- ENDIF --> </select></label>
Now, just to change the display to M/D/Y, instead of D/M/Y.
Thank you all for the input and thoughts.
I'm glad I could actually start a small, simple debate among fellow forumer's!