You can use AnyCode Tool:
solution name - today_users
hook - in_info_end
code if you want to Guests can see links to user-profiles:
$todays_users = array();
$query = array(
'SELECT' => 'id, username',
'FROM' => 'users',
'WHERE' => 'last_visit>"'.strtotime(gmdate("M d Y")).'"',
'ORDER BY' => 'username'
);
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
while(list($id, $username) = $forum_db->fetch_row($result))
{
$todays_users[] = '<a href="'.forum_link($forum_url['user'], $id).'">'.forum_htmlencode($username).'</a>';
}
if (!empty($todays_users))
{
?>
<div id="brd-todayonline" class="gen-content">
<h3 class="hn"><span>
<?
echo $lang_index['Today online'] . implode(', ', $todays_users);
?>
</span></h3>
</div>
<?
}
code if you don`t want to Guests can see links to user-profiles:
$todays_users = array();
$query = array(
'SELECT' => 'id, username',
'FROM' => 'users',
'WHERE' => 'last_visit>"'.strtotime(gmdate("M d Y")).'"',
'ORDER BY' => 'username'
);
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
while(list($id, $username) = $forum_db->fetch_row($result))
{
if (!$forum_user['is_guest'])
{
$todays_users[] = '<a href="'.forum_link($forum_url['user'], $id).'">'.forum_htmlencode($username).'</a>';
}
else
{
$todays_users[] = forum_htmlencode($username);
}
}
if (!empty($todays_users))
{
?>
<div id="brd-todayonline" class="gen-content">
<h3 class="hn"><span>
<?
echo $lang_index['Today online'] . implode(', ', $todays_users);
?>
</span></h3>
</div>
<?
}
if you don`t want to edit lang-pack - just replace "$lang_index['Today online']" on "Today\`s online:"
Fixed by punbb.ru forum users.
but it would be bitter if it was converted to extension.
I can`t do this - I`m a noob:)
Sorry for my English