This code is taken with TS v 4 3 please if who knows as this code to make for TS v 5 1 that was plugin showwhatsgoinon
PHP Code:
'; echo $showtrackerload; } if ((($CURUSER AND $showwhatsgoinon == 'yes') OR ($showwhatsgoinon == 'staffonly' AND $is_mod))) { include_once INC_PATH . '/functions_icons.php'; if ((!empty ($indexstats) AND !empty ($indexstats['latestuser']))) { $latestuser = $indexstats['latestuser']; } else { if (!defined ('CACHE_INCLUDED')) { include_once INC_PATH . '/ts_cache.php'; } update_cache ('indexstats'); include_once '' . $cache . '/indexstats.php'; } $cut = TIMENOW - TS_TIMEOUT; $qsquery = @sql_query ('' . 'SELECT COUNT(*) as totalguests FROM ts_sessions WHERE lastactivity > ' . $cut); $guests = ts_nf (@mysql_result ($qsquery, 0, 'totalguests')); $last24 = get_date_time (gmtime () - 24 * 60 * 60); $activeusers24 = array (); $activeusers = array (); $hiddenmembers = 0; $res = @sql_query ('SELECT u.last_access, u.id, u.username, u.usergroup, u.enabled, u.invisible, u.donor, u.donated, u.warned, u.leechwarn, u.commentpos, u.sendpmpos, u.chatpost, u.downloadpos, u.uploadpos, g.namestyle FROM users u LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE u.last_access >= ' . @sqlesc ($last24) . ' ORDER BY u.username'); while ($arr = @mysql_fetch_assoc ($res)) { if ((($arr['invisible'] == 'yes' AND !$is_mod) AND $arr['id'] != $CURUSER['id'])) { continue; } $arr['username'] = get_user_color ($arr['username'], $arr['namestyle']); $cusername = '' . $arr['username'] . ($arr['invisible'] == 'yes' ? '+' : '') . '' . get_user_icons ($arr); $activeusers24[] = $cusername; if (TIMENOW - sql_timestamp_to_unix_timestamp ($arr['last_access']) < TS_TIMEOUT) { if ($arr['invisible'] == 'yes') { ++$hiddenmembers; } $activeusers[] = $cusername; continue; } } if ($totalonline24 = @count ($activeusers24) == 0) { $activeusers24 = $lang->index['nolast24visits']; } else { $activeusers24 = @implode (', ', $activeusers24); } if ($totalactive = @count ($activeusers) == 0) { $activeusers = $lang->index['noactiveusersonline']; } else { $activeusers = @implode (', ', $activeusers); } $showwhatsgoinon = '
PHP Code:
<table border="0" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td align="center" class="thead">
' . ts_collapse ('showwhatsgoinon') . '
' . $SITENAME . ' ' . $lang->index['whatsgoinon'] . '
</td>
</tr>
' . ts_collapse ('showwhatsgoinon', 2) . '
<tr>
<td align="center">
' . sprintf ($lang->index['last24visits'], ts_nf ($totalonline24)) . '
<a href="javascript: klappe_news(\'a0\')"><img border="0" src="' . $BASEURL . '/' . $pic_base_url . 'plus.gif" id="pica0" alt="' . $lang->global['imgshowhide'] . '" title="' . $lang->global['imgshowhide'] . '" /></a>
<div id="ka0" style="display: none;">
<p align="justify">' . $activeusers24 . '</p>
</div>
<br />
' . sprintf ($lang->index['newestmember'], $latestuser) . '
<br />
' . $lang->index['activeusers'] . ' ' . ts_nf ($totalactive + $guests) . ' ' . sprintf ($lang->index['dactiveusers'], $guests, $totalactive - $hiddenmembers, $hiddenmembers) . '
<a href="javascript: klappe_news(\'a00\')"><img border="0" src="' . $BASEURL . '/' . $pic_base_url . 'plus.gif" id="pica00" alt="' . $lang->global['imgshowhide'] . '" title="' . $lang->global['imgshowhide'] . '" /></a>
<div id="ka00" style="display: none;">
<p align="center">' . $activeusers . '</p>
</div>';
$showwhatsgoinon .= '
</td>
</tr>
</tbody>
</table>