Не могу найти, где и как сделать так, чтобы вместо возраста пользователя был день рождения пользователя. :oops: Только день и месяц.
Уважаемые Guru, пожалуйста, подскажите!

$age = (int) ($now['year'] - $bday_year - $diff);
if ($bday_day == 0) { $bday_day ="xx"; }
if ($bday_month == 0) { $bday_month ="xx"; }
$bday1 = ($bday_day . "." . $bday_month . "." . $bday_year);'AGE' => $age,
'BDAY' => $bday1,
<!-- IF AGE -->
<!-- IF AGE --><dt>{L_BIRTHDAY}:</dt> <dd>{BDAY} ({AGE})</dd><!-- ENDIF -->'BIRTHDAY' => 'День рождения',
'BIRTHDAY' => 'Birthday',
Avidal писал(а):Кто-нибудь тестил мод Vaal-a? Работает?
<tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_AGE}: </td>
<td><b class="genmed"><!-- IF AGE -->{AGE}<!-- ELSE --> - <!-- ENDIF --></b></td>
</tr>
<tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- IF AGE -->{L_BIRTHDAY}: </td>
<td><b class="genmed"><!-- IF AGE -->{BDAY} ({AGE})<!-- ELSE --> - <!-- ENDIF --></b></td>
</tr>
[phpBB Debug] PHP Notice: in file /memberlist.php on line 1671: Undefined variable: bday1 [phpBB Debug] PHP Notice: in file /includes/functions.php on line 4314: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493) [phpBB Debug] PHP Notice: in file /includes/functions.php on line 4316: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493) [phpBB Debug] PHP Notice: in file /includes/functions.php on line 4317: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493) [phpBB Debug] PHP Notice: in file /includes/functions.php on line 4318: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
if ($bday_year)
{
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
$diff = $now['mon'] - $bday_month;
if ($diff == 0)
{
$diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
}
else
{
$diff = ($diff < 0) ? 1 : 0;
}
$age = (int) ($now['year'] - $bday_year - $diff);
if ($bday_day == 0) { $bday_day ="xx"; }
if ($bday_month == 0) { $bday_month ="xx"; }
$bday1 = ($bday_day . "." . $bday_month . "." . $bday_year);
}
}
// Dump it out to the template
return array(
'AGE' => $age,
'BDAY' => $bday1,
'RANK_TITLE' => $rank_title,
'JOINED' => $user->format_date($data['user_regdate']),
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,Палыч писал(а):Попробуйте
'BDAY' => (empty($bday1)) ? ' ' : $bday1,
// Найти 'BIRTHDAYS' => 'Дни рождения', // Добавить перед 'BIRTHDAY' => 'День рождения',
// Найти
if ($bday_year)
{
$diff = $now['mon'] - $bday_month;
if ($diff == 0)
{
$diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
}
else
{
$diff = ($diff < 0) ? 1 : 0;
}
$user_cache[$poster_id]['age'] = (int) ($now['year'] - $bday_year - $diff);
}
// Заменить на
$user_cache[$poster_id]['age'] = ($bday_day && $bday_month ? $bday_day . ' ' : '') . ($bday_month ? $user->format_date(strtotime('2000-' . $bday_month . '-01'), 'M') : '');// Найти
<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
// Добавить после
<!-- IF postrow.POSTER_AGE --><dd><strong>{L_BIRTHDAY}:</strong> {postrow.POSTER_AGE}</dd><!-- ENDIF -->

Вернуться в Запросы модов для phpBB 3.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0