Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

How to show users in the past 24 hours?

I guess I posted this in the wrong area, sorry.

In the Users Online panel, is there a way to show users connected in the past 24 hours?
That would work, but without the birthday area. It's a business site, so the birthday area really won't be needed.
Look at the readme-file. Birthday's of the day are Optional.
There is a separate infusion "last seen users panel" that will show you the latest 10 member visits.
If you have a low traffic site this panel though shows even members visits from a long time a go.

You can modify this to show only the last member visits within 24 hours.

Just search for the last seen users panel, infuse it and overwrite the content in last_seen_users_panel.php with:

| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
| Filename: last_seen_users_panel.php
| Author: Nick Jones (Digitanium)
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (file_exists(INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."last_seen_users_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."last_seen_users_panel/locale/English.php";

$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit > '0' AND user_status = '0' AND user_lastvisit > '".(time( ) - (60 * 60 * 24 * 2))."' ORDER BY user_lastvisit  DESC LIMIT 0,10");
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
if (dbrows($result) != 0) {
   while ($data = dbarray($result)) {
      $lastseen = time() - $data['user_lastvisit'];
      if ($lastseen < 60){
         $lastseen= $locale['lsup001'];
      } elseif ($lastseen < 360){
         $lastseen= $locale['lsup002'];
      } elseif ($iW > 0){
         if ($iW == 1) { $text = $locale['lsup003']; } else { $text = $locale['lsup004']; }
         $lastseen = $iW." ".$text;
      } elseif ($iD > 0){
         if ($iD == 1) { $text = $locale['lsup005']; } else { $text = $locale['lsup006']; }
         $lastseen = $iD." ".$text;
      } else {
         $lastseen = $iH.":".$iM.":".$iS;
      echo "<tr>\n<td class='side-small' align='left'><img src='".THEME."images/bullet.gif' alt='' />\n";
      echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
      echo trimlink($data['user_name'], 15)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
echo "</table>";

Don't forget about the locale file.
Thread Information
6 posts
2123 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: - Tony -, Wanabo, PolarFox, spunk, Afliktion