+1 куда убрали то?а где мод дайте скачать
был бы благодарен!alexey555, могу выковырять у себя.
я тоже хочу этот мод буду благодарен если кто то выложит этот мод без баговбыл бы благодарен!
$sql = DB()->fetch_rowset("SELECT v.*, v.profile_id as user_id, u.username, u.user_opt, u.user_rank, u.user_avatar, u.user_avatar_type
FROM bb_user_view v
LEFT JOIN ". BB_USERS ." u ON(u.user_id = v.profile_id)
WHERE v.user_id = {$profiledata['user_id']}
ORDER BY v.time DESC");
$insert = true;
$limit = 0;
foreach($sql as $i => $row)
{
if($row['profile_id'] == $userdata['user_id'])
{
$insert = false;
if($i) $time = '';
else $time = $row['time'];
}
if($hide = bf($row['user_opt'], 'user_opt', 'allow_viewonline'))
{
if(!IS_ADMIN) continue;
}
$limit++;
if($limit > 5) continue; //Скока выводить
$template->assign_block_vars('view', array(
'CLASS' => ($i % 2) ? 'row2' : 'row1',
'HIDE' => $hide,
'POSTER_AVATAR' => str_replace('<img', '<img align="left" height="32" width="32" style="padding-right: 3px;"', get_avatar ($row['user_avatar'], $row['user_avatar_type'], !bf($row['user_opt'], 'user_opt', 'allow_avatar'))),
'USER' => profile_url($row),
'TIME' => bb_date($row['time'])
));
}
if(!$limit) $template->assign_block_vars('not_view', array());
if(($profiledata['user_id'] != $userdata['user_id']) && !IS_GUEST && $profiledata['user_active'])
{
$data = array(
'user_id' => $profiledata['user_id'],
'profile_id' => $userdata['user_id'],
'time' => TIMENOW,
);
if($insert)
{
$sql = DB()->build_array('INSERT', $data);
DB()->query("INSERT INTO bb_user_view ". $sql);
}
else
{
if($time < (TIMENOW - 300))
{
DB()->query("UPDATE bb_user_view SET time = '". TIMENOW ."'
WHERE user_id = {$profiledata['user_id']}
AND profile_id = {$userdata['user_id']}
LIMIT 1");
}
}
}
DB()->query("
DELETE u, ban, s, tw, asn, uv
FROM ". BB_USERS ." u
LEFT JOIN ". BB_BANLIST ." ban ON(ban.ban_userid = u.user_id)
LEFT JOIN ". BB_SESSIONS ." s ON(s.session_user_id = u.user_id)
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.user_id = u.user_id)
LEFT JOIN ". BB_AUTH_ACCESS_SNAP ." asn ON(asn.user_id = u.user_id)
LEFT JOIN bb_user_view uv ON(uv.profile_id = u.user_id OR uv.user_id = u.user_id)
WHERE u.user_id IN($user_csv)
");
<div class="bold cat border bw_TB tLeft vTop">Последние посетители</div>
<!-- BEGIN view -->
<div class="pad_4 border bw_B tLeft {view.CLASS}"<!-- IF view.HIDE --> style="background-color: #F9FCFF;"<!-- ENDIF -->>
<div class="floatL" style="padding-right: 5px;">{view.POSTER_AVATAR}</div>
{view.USER}<br />
<div class="spacer_2"></div>
<span class="med"><i>{view.TIME}</i></span>
<div class="clear"></div>
</div>
<!-- END view -->
<!-- BEGIN not_view -->
<div class="med pad_4 border bw_B row1">
Нет просмотров
</div>
<!-- END not_view -->
<div class="spacer_4"></div>
$sql = DB()->fetch_rowset("SELECT v.*, v.profile_id as user_id, u.username, u.user_opt, u.user_rank, u.user_avatar, u.user_avatar_type
FROM bb_user_view v
LEFT JOIN ". BB_USERS ." u ON(u.user_id = v.profile_id)
WHERE v.user_id = {$profiledata['user_id']}
ORDER BY v.time DESC");
$insert = true;
$limit = 0;
foreach($sql as $i => $row)
{
if($row['profile_id'] == $userdata['user_id'])
{
$insert = false;
if($i) $time = '';
else $time = $row['time'];
}
if($hide = bf($row['user_opt'], 'user_opt', 'allow_viewonline'))
{
if(!IS_ADMIN) continue;
}
$limit++;
if($limit > 5) continue; //Скока выводить
$template->assign_block_vars('view', array(
'CLASS' => ($i % 2) ? 'row2' : 'row1',
'HIDE' => $hide,
'POSTER_AVATAR' => str_replace('<img', '<img align="left" height="32" width="32" style="padding-right: 3px;"', get_avatar ($row['user_avatar'], $row['user_avatar_type'], !bf($row['user_opt'], 'user_opt', 'allow_avatar'))),
'USER' => profile_url($row),
'TIME' => bb_date($row['time'])
));
}
if(!$limit) $template->assign_block_vars('not_view', array());
if(($profiledata['user_id'] != $userdata['user_id']) && !IS_GUEST && $profiledata['user_active'])
{
$data = array(
'user_id' => $profiledata['user_id'],
'profile_id' => $userdata['user_id'],
'time' => TIMENOW,
);
if($insert)
{
$sql = DB()->build_array('INSERT', $data);
DB()->query("INSERT INTO bb_user_view ". $sql);
}
else
{
if($time < (TIMENOW - 300))
{
DB()->query("UPDATE bb_user_view SET time = '". TIMENOW ."'
WHERE user_id = {$profiledata['user_id']}
AND profile_id = {$userdata['user_id']}
LIMIT 1");
}
}
}