ok...anke se nn l'ho mai modificato...eccolo :
Codice PHP:
$l_privmsgs_text = $l_privmsgs_text_unread = '';
$s_privmsg_new = false
// Obtain number of new private messages if user is logged in
if (!empty($user->data['is_registered']))
{
if ($user->data['user_new_privmsg'])
{
$l_message_new = ($user->data['user_new_privmsg'] == 1) ? $user->lang['NEW_PM'] : $user->lang['NEW_PMS'];
$l_privmsgs_text = sprintf($l_message_new, $user->data['user_new_privmsg']);
if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit'])
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_last_privmsg = ' . $user->data['session_last_visit'] . '
WHERE user_id = ' . $user->data['user_id'];
$db->sql_query($sql);
$s_privmsg_new = true;
}
else
{
$s_privmsg_new = false;
}
}
else
{
$l_privmsgs_text = $user->lang['NO_NEW_PM'];
$s_privmsg_new = false;
}
$l_privmsgs_text_unread = '';
if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg'])
{
$l_message_unread = ($user->data['user_unread_privmsg'] == 1) ? $user->lang['UNREAD_PM'] : $user->lang['UNREAD_PMS'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $user->data['user_unread_privmsg']);
}
}
// Which timezone?
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
// Send a proper content-language to the output
$user_lang = $user->lang['USER_LANG'];
if (strpos($user_lang, '-x-') !== false)
{
$user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
}
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'TB_URL' => append_sid("{$phpbb_root_path}tag_board.$phpEx"),
'TB_AUTH' => isset($config['tb_auth']) ? $config['tb_auth'] : '',
'TB_GROUPS' => isset($config['tb_groups']) ? (($config['tb_groups'] && !$auth->acl_get('a_')) ? preg_match('/([^0-9]*' . $user->data['group_id'] . '[^0-9]*)/', $config['tb_groups']) : 1) : 1,
'TB_DENIED' => (isset($config['tb_denied']) && !$auth->acl_get('a_')) ? preg_match('/([^0-9]*' . $user->data['user_id'] . '[^0-9]*)/', $config['tb_denied']) : 0,
'TB_REFRESH' => isset($config['tb_refresh']) ? $config['tb_refresh'] * 1000 : '',
'TB_HEIGTH' => isset($config['tb_heigth']) ? $config['tb_heigth'] : '',
'TB_MAXLENGTH' => isset($config['tb_maxlength']) ? $config['tb_maxlength'] : '',
'TB_BUTTONS' => isset($config['tb_buttons']) ? $config['tb_buttons'] : '',
'TB_BBCODE' => isset($config['tb_bbcode']) ? $config['tb_bbcode'] : '',
'TB_IMG' => isset($config['tb_img']) ? $config['tb_img'] : '',
'TB_FLASH' => isset($config['tb_flash']) ? $config['tb_flash'] : '',
'TB_SMILIES' => isset($config['tb_smilies']) ? $config['tb_smilies'] : '',
'TB_CUSTOM' => isset($config['tb_custom']) ? $config['tb_custom'] : '',
'TB_FONT' => isset($config['tb_fsize']) ? $config['tb_fsize'] : '',
'SITENAME' => $config['sitename'],
'SITE_DESCRIPTION' => $config['site_desc'],