А там код
Код: Выделить всё
$boarddays = (time() - $config['start_date']) / 86400;
Код: Выделить всё
$boarddays = (time() - $config['start_date']) / 86400;
Проблема решается заменой на 'board_startdate' или 'social_start_date' в зависимости статистика нужна от установки форума или установки расширения. Сжатие можно включать, все работает.
Раньше у меня в 3.1.10 такой же код в версии расширения 2.1.0 ни на что не ругался. Не понимаю почему такое сейчас?
Я же уже писал. В общем при регистрации нового пользователя нет приветственного письма. Срабатывает по тирггеру
Код: Выделить всё
if (!sizeof($recipients))
{
trigger_error('NO_RECIPIENT');
}
Код: Выделить всё
/** Private MSG Welcome! */
$pm_user = (isset($this->config['social_pm_user'])) ? $this->config['social_pm_user'] : false;
if ($this->config['social_privmsg'] && $this->config['social_pm_subject'] && $pm_user && $pm_new_user)
{
$this->core_helper->user_welcome($user_id, $pm_user, $this->config['social_pm_subject'], $this->config['social_privmsg']);
}
$redirect = $this->phpbb_root_path . 'index.' . $this->php_ext;
$message_text = $this->user->lang['LOGIN_REDIRECT'];
$message_text .= '<br /><br />' . sprintf($this->user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>');
if ($this->config['social_popup'])
{
$message_text .= '<script type="text/javascript">window.opener.location.reload(); window.close();</script>';
}
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $this->user->lang['LOGIN'],
'MESSAGE_TEXT' => $message_text,
'S_SIMPLE_MESSAGE' => ($this->config['social_popup']) ? true : false, // Simple type
));
meta_refresh(2, "$redirect");
page_header($this->user->lang['LOGIN'], false);
$this->template->set_filenames(array(
'body' => 'message_body.html')
);
page_footer();
}
/** Add accounts */
Код: Выделить всё
public function user_welcome($user_to, $user_id, $subject, $text)
{
$m_flags = 3; // 1 is bbcode, 2 is smiles, 4 is urls (add together to turn on more than one)
$uid = $bitfield = '';
$allow_bbcode = $allow_urls = $allow_smilies = true;
generate_text_for_storage($text, $uid, $bitfield, $m_flags, $allow_bbcode, $allow_urls, $allow_smilies);
include_once($this->phpbb_root_path . 'includes/functions_privmsgs.' . $this->php_ext);
$pm_data = array(
'address_list' => array('u' => array($user_to['user_id'] => 'to')),
'from_user_id' => $user_id,
'from_user_ip' => $this->user->ip,
'enable_sig' => false,
'enable_bbcode' => $allow_bbcode,
'enable_smilies' => $allow_smilies,
'enable_urls' => $allow_urls,
'icon_id' => 0,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'message' => utf8_normalize_nfc($text),
);
submit_pm('post', utf8_normalize_nfc($subject), $pm_data, false);
}
А какая тут версия phpbb?
Мне кажется, не стоит. Часто регистрируются из соцсети случайно, так вот в этом сообщении хорошо писать, что вы уже зарегистрировались и вам доступны все функции зарегистрированного пользователя форума.
На 3.2.1. у всех нормально работает?
Код: Выделить всё
$this->core_helper->user_welcome($user_id, $pm_user, $this->config['social_pm_subject'], $this->config['social_privmsg']);
Код: Выделить всё
submit_pm('post', utf8_normalize_nfc($subject), $pm_data, false);
Код: Выделить всё
'address_list' => array('u' => array($user_to['user_id'] => 'to')),
Код: Выделить всё
'address_list' => array('u' => array($user_to => 'to')),