XTX
PPK
Странно, да и ладноPPK писал(а):Ничего не вышло ..
XTX
Код: Выделить всё
if (!$this->theme && $style == $this->data['user_style'])
{
$style = $this->data['user_style'] = $config['default_style'];
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_style = $style
WHERE user_id = {$this->data['user_id']}";
$db->sql_query($sql);
$sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
WHERE s.style_id = $style
AND t.template_id = s.template_id
AND c.theme_id = s.theme_id
AND i.imageset_id = s.imageset_id";
$result = $db->sql_query($sql, 3600);
$this->theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
if (!$this->theme)
{
trigger_error('Could not get style data', E_USER_ERROR);
}
Код: Выделить всё
// User has wrong style
$no_style=1;
if (!$this->theme && $style == $this->data['user_style'])
{
$style = $this->data['user_style'] = $config['default_style'];
$no_style=2;
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_style = $style
WHERE user_id = {$this->data['user_id']}";
$db->sql_query($sql);
$sql = 'SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name
FROM ' . STYLES_TABLE . ' s, ' . STYLES_TEMPLATE_TABLE . ' t, ' . STYLES_THEME_TABLE . ' c, ' . STYLES_IMAGESET_TABLE . " i
WHERE s.style_id = $style
AND t.template_id = s.template_id
AND c.theme_id = s.theme_id
AND i.imageset_id = s.imageset_id";
$result = $db->sql_query($sql, 3600);
$this->theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
if (!$this->theme)
{
trigger_error('Could not get style data'.": ({$no_style})", E_USER_ERROR);
}
нужно отследить какая цифра будет,Could not get style data: (цифра)
PPK
Единицу пишет, на всех стилях, ну.. кроме основного =)PPK писал(а):нужно отследить какая цифра будет, пойму где "падает"
XTX
PPK
bizZz0n
PPK
Код: Выделить всё
if (!$this->theme && $style == $this->data['user_style'])
Код: Выделить всё
if (!$this->theme/* && $style == $this->data['user_style']*/)
PPK
Сделал все как описано!! но результат получился своеобразныйPPK писал(а):Уткнулся сегодня в это ..![]()
в файле /includes/sessions.php заменилнаКод: Выделить всё
if (!$this->theme && $style == $this->data['user_style'])
побочный эффект в том, что выбранный стиль станет постоянным для пользователя, т.е. будет так, как-будто он его сменил в личном разделе, а не временно на странице портала ..Код: Выделить всё
if (!$this->theme/* && $style == $this->data['user_style']*/)
TEK