viiprogrammer Posted July 30, 2015 Report Share Posted July 30, 2015 И так вот фича которая делает вывод последнего захода юзера в лс как у вк И так в \templates\Default\im\form.tpl найти <div id="jquery_jplayer"></div> <input type="hidden" id="teck_id" value="" /> <input type="hidden" id="typePlay" value="standart" /> <input type="hidden" id="teck_prefix" value="" /> и после вставить <div class="im_lastact">{for-name} {online}</div> в im.php над //################### Обновление диалогов ###################// найти if(!$first_id){ $tpl->load_template('im/form.tpl'); $tpl->set('{for_user_id}', $for_user_id); //Выводим информцию о том кто смотрит страницу для себя $myInfo = $db->super_query("SELECT user_name FROM `".PREFIX."_users` WHERE user_id = '".$user_id."'"); $tpl->set('{myuser-id}', $user_id); $tpl->set('{my-name}', $myInfo['user_name']); if($user_info['user_photo']) $tpl->set('{my-ava}', '/uploads/users/'.$user_id.'/50_'.$user_info['user_photo']); else $tpl->set('{my-ava}', '{theme}/images/no_ava_50.png'); $tpl->compile('content'); } и заменить на if(!$first_id){ $tpl->load_template('im/form.tpl'); $tpl->set('{for_user_id}', $for_user_id); //Выводим информцию о том кто смотрит страницу для себя $myInfo = $db->super_query("SELECT user_name FROM `".PREFIX."_users` WHERE user_id = '".$user_id."'"); $myInfofor = $db->super_query("SELECT user_last_visit, user_name FROM `".PREFIX."_users` WHERE user_id = '".$for_user_id."'"); $tpl->set('{myuser-id}', $user_id); $tpl->set('{my-name}', $myInfo['user_name']); if($myInfofor['user_last_visit'] >= $online_time){ $tpl->set('{for-name}', ''); }else{ $tpl->set('{for-name}', $myInfofor['user_name']); } if($myInfofor){ if($myInfofor['user_last_visit'] >= $online_time) $tpl->set('{online}', ' '); else { if(date('Y-m-d', $myInfofor['user_last_visit']) == date('Y-m-d', $server_time)) $dateTell = langdate('сегодня в H:i', $myInfofor['user_last_visit']); elseif(date('Y-m-d', $row_online['user_last_visit']) == date('Y-m-d', ($server_time-84600))) $dateTell = langdate('вчера в H:i', $myInfofor['user_last_visit']); else $dateTell = langdate('j F Y в H:i', $myInfofor['user_last_visit']); if($row['user_sex'] == 2) $tpl->set('{online}', 'последний раз была '.$dateTell); else $tpl->set('{online}', 'последний раз был '.$dateTell); } }else{ $tpl->set('{online}', ''); } if($user_info['user_photo']) $tpl->set('{my-ava}', '/uploads/users/'.$user_id.'/50_'.$user_info['user_photo']); else $tpl->set('{my-ava}', '{theme}/images/no_ava_50.png'); $tpl->compile('content'); } Ставим + Ps Если че пишите 7 Quote Link to comment Share on other sites More sharing options...
viiprogrammer Posted August 12, 2015 Author Report Share Posted August 12, 2015 Внимание! Тему очистил от хлама! Quote Link to comment Share on other sites More sharing options...
nikita233 Posted November 3, 2015 Report Share Posted November 3, 2015 Супер ! Quote Link to comment Share on other sites More sharing options...
orlov22region Posted February 16, 2016 Report Share Posted February 16, 2016 супер, только чуть css добавил и вообще огонь! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.