Хак Хак Статус онлайн отправителей ПМ для DLE
Хак Статус онлайн отправителей ПМ для DataLife Engine
Установка:
1) Открываем engine/modules/pm.php
Найти:
$sql = "SELECT id, subj, user_from, date, pm_read, reply FROM " . USERPREFIX . "_pm where user = '{$member_id['user_id']}' AND folder = 'inbox' order by date desc";
Заменить на:
$sql = "SELECT foto, text, id, subj, user_from, date, pm_read, reply, us.lastdate as lastdate FROM " . USERPREFIX . "_pm, " . USERPREFIX . "_users us where user_from = us.name AND user = '{$member_id['user_id']}' order by date desc";
Найти:
while ( $row = $db->get_row() ) {
Добавить ниже:
$end_online = time() + $config['date_adjust']*60;
$start_online = $end_online - 2200;
if($row['lastdate'] >= $start_online AND $row['lastdate'] <= $end_online)
{
$status = " (<font color="green">online</font>)";
} else
$status = " (<font color="red">offline</font>)";
Найти:
<td class="pm_list">{$user_from}</td>
Заменить на
<td class="pm_list">{$user_from}{$status}</td>