theIggs
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Randome Галочка у тебя стоит в правильном месте , это заставляет форум показывать на главной посетителей за последние 15 минут: Цитата: 2 Текущие Активные Участники: 1 гостей, 1 пользователей 0 Анонимных пользователей [ Полный список ] >HuKoJIau | Кстати, прикольные у тебя иконки внизу в статистике. Хак... ibplanet большой, искать сейчас за тебя денег нет... ну возьми вот мой, упрощённый. Код: 1. ALTER TABLE `ibf_members`ADD `last_login_type` TINYINT(1) DEFAULT NULL; 2. Boards.php //FIND $stats_html .= $this->html->ActiveUsers($active, $ibforums->vars['au_cutoff']); //ADD BELOW // Fetch the number of users online this day $timestamp = mktime(0,0,0,date("m,d,Y")); if ($ibforums->member['dst_in_use']) { $timestamp -= 3600; } $query = "SELECT g.*, m.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) "; $query .= "WHERE m.last_activity >= '$timestamp' AND m.mgroup <> '".$ibforums->vars['guest_group']."' GROUP BY m.name ORDER BY m.last_activity DESC"; $DB->query($query); $today_num = $DB->get_num_rows(); $anon = 0; if($today_num > 0) { while ( $r = $DB->fetch_row() ) { if ( $r['last_login_type'] != 1) { $today_online .= "<span class='highlight'>></span><a href='{$ibforums->vars['board_url']}/index.php?s={$ibforums->session_id}&act=Profile&MID=".$r[id]."'>" . $r[prefix] . $r[name] . $r[suffix]; $today_online .= "</a> "; } else { $anon++; } } if ($today_num > $anon) { $today_online = $ibforums->lang['today_users'] . $today_online; } else { $today_online = "<i>{$ibforums->lang['today_all_hidden']}</i>"; } } else { $today_online = "<i>{$ibforums->lang['none_today']}</i>"; } $today_all = $ibforums->lang['users_today'] . $today_num . $ibforums->lang['today_and'] . $anon . $ibforums->lang['today_hidden']; $stats_html .= $this->html->UsersToday($today_all, $today_online); //End Hack 3. skin_boards.php //FIND function ActiveUsers($active) { global $ibforums; return <<<EOF <tr> <td class='category' colspan='2'>$active[TOTAL] {$ibforums->lang['active_users']}</td> </tr> <tr> <td width="5%" class='forum1'><{F_ACTIVE}></td> <td class='forum2' width='95%'><b>{$active[GUESTS]}</b> {$ibforums->lang['guests']}, <b>$active[MEMBERS]</b> {$ibforums->lang['public_members']} <b>$active[ANON]</b> {$ibforums->lang['anon_members']} {$active[LINK]}<br>{$active[NAMES]}</td> </tr> EOF; } //ADD BELOW function UsersToday($count, $names) { global $ibforums; return <<<EOF <tr> <td class='category' colspan='2'>$count</td> </tr> <tr> <td width="5%" class='forum1'></td> <td class='forum2' width='95%'>$names</td> </tr> EOF; } 4. Login.php //FIND $db_query = "UPDATE ibf_sessions SET $db_string WHERE id='".$ibforums->input['s']."'"; //ADD BELOW $DB->query("UPDATE ibf_members SET last_login_type='".$ibforums->input['Privacy']."' WHERE id='".$member['id']."'"); 5. functions.php //FIND // Append the rest of the query $query .= "login_type='".$ibforums->input['Privacy']."', running_time='".$this->time_now."', in_forum='".$ibforums->input['f']."', in_topic='".$ibforums->input['t']."', location='".$ibforums->input['act'].",".$ibforums->input['p'].",".$ibforums->input['CODE']."' "; $query .= "WHERE id='".$this->session_id."'"; // Update the database $DB->query($query) //ADD BELOW $DB->query("UPDATE ibf_members SET last_login_type='".$ibforums->input['Privacy']."' WHERE id='".$this->member['id']."'"); 6. lang_boards.php //ADD WHEREVER users_today => "Сегодня у нас были: ", none_today => "Никого", today_and => ", из них ", today_hidden => " скрытых", today_users => "Пользователи: ", today_all_hidden => "Все пользователи скрытые", //FOR ENGLISH users_today => "Users today: ", none_today => "Nobody", today_and => ", of them ", today_hidden => " hidden", today_users => "Members: ", today_all_hidden => "All members hidden", | Первым шагом выполняешь команду через пхпмайадмина... А там уж поймёшь... FIND = "найти", ADD BELOW = "добавить ниже", ADD WHEREVER = "добавить в любом месте, желательно где-нить перед самым концом файла".
|