Topic: Online users = Guest + Members i want total to be precented
How do i precent online users that include guests + members
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Online users = Guest + Members i want total to be precented
How do i precent online users that include guests + members
http://punbb.org/forums/viewtopic.php?id=11132
I asked the same, and got help in that thread.
divide the number of active users (users, & guests) with the total number of registered users.
e.g. round((100 * $total_active) / $total_registered)
divide the number of active users (users, & guests) with the total number of registered users.
e.g. round((100 * $total_active) / $total_registered)
No. Will do no good.
http://punbb.org/forums/viewtopic.php?id=11132
I asked the same, and got help in that thread.
Thanx that will help alot :-)
It helped a bit so i created this one and included this in my header and it works but not as it should, i guess it have to do with how i used it.
When 1 person is logged in and a guest is wieving the forum it says 2 users, but if two guests are wiewing the forum it says 1 user is looking at the forum
Eyy That can be because i viewing it from the same ip i think?
<?php
if ($pun_config['o_users_online'] == '1')
{
// Fetch users online info and generate strings for output
$num_guests = 0;
$users = array();
$result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
while ($pun_user_online = $db->fetch_assoc($result))
{
if ($pun_user_online['user_id'] > 1)
$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
else
++$num_guests;
}
$num_users = count($users);
echo ($num_users + $num_guests);
}
?>
did anyone try AJAX on this? ie, online list being updated.. say every 15 seconds without refreshing the page.?
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Online users = Guest + Members i want total to be precented
Powered by PunBB, supported by Informer Technologies, Inc.