Zastanawiam się nad pewnym problemem, mianowicie jak zmusić phpBB do wyświetlania daty rejestracji (joined) użytkownika w chcianym przeze mnie formacie, nie ogólnym dla forum (konkretnie chodzi o usunięcie dziwacznej części z godziną i minutą rejestracji - komu to potrzebne? ).
Znalazłem gdzieś taki sposób:
includes/functions_profile_fields.php
Kod: Zaznacz cały
// case 'datetime':
case 'date':
$date = explode('-', $value);
$day = (isset($date[0])) ? (int) $date[0] : 0;
$month = (isset($date[1])) ? (int) $date[1] : 0;
$year = (isset($date[2])) ? (int) $date[2] : 0;
if (!$day && !$month && !$year)
{
return NULL;
}
else if ($day && $month && $year)
{
global $user;
// Date should display as the same date for every user regardless of timezone, so remove offset
// to compensate for the offset added by user::format_date()
return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) - ($user->timezone + $user->dst), $user->lang['DATE_FORMAT'], true);
}
return $value;
break;
Kod: Zaznacz cały
return $user->format_date(gmmktime(0, 0, 0, $month, $day, $year) - ($user->timezone + $user->dst), '|M j, Y|', true);
Pozdrawiam