1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Recent Visitors 0.5

Discussion in 'Plugins' started by Nick, Jan 12, 2010.

  1. Nick

    Nick Well-Known Member

    Recent Visitors
    Version: 0.5
    Author: Nick Ramsay
    Created: 2009/07
    Last Updated:
    Tested on: Hotaru 1.2.0 ~ 1.4.0
    Plugins Required: Widgets, Users
    Plug & Play: Yes
    Supported: Yes

    A widget that shows the most recent site members to have logged in. Includes a settings page that lets you edit the number of users, whether to display them as a list or inline, whether to use avatars, the avatar size, and user name. All user names and avatars link to user profiles, and the widget HTML is cached until the users table is next updated.

    1. Upload the "recent_visitors" folder to your plugins folder.
    2. Install it from Plugin Management in Admin.
    3. Edit settings in Admin -> Recent Visitors
    4. Enable the widget in Admin -> Widgets

    - Clear the HTML cache from Admin -> Maintenance to see any settings changes you make.
    - When a user returns to your site (i.e. a new session is created), the widget will update itself
    - Users who registered with the last 24 hours will not be shown so as to keep spammers off the widget
    - Users with killspammed, banned, suspended or pending status will not be shown
    - You can change the language for the "Need an avatar? Get Gravatar!" line in the language file

    Revision History
    v 0.5 2010/05/06 - Nick - Update last visited time on user activity
    v.0.4 2010/02/20 - Nick - Added ability to filter out users who don't have an avatar
    v.0.3 2010/02/06 - Nick - Added "Need an avatar? Get Gravatar!", filtered out users below "undermod" and hide users who registered within the last 24 hours
    v.0.2 2010/01/15 - Nick - Replaced "lastlogin" with "lastvisit" for more up-to-date stats
    v.0.1 2010/01/13 - Nick - Released first version

    Please click "Rate Thread" and give this plugin a rating. Thank you.


    Attached Files:

    Last edited: Aug 11, 2010
  2. Nick

    Nick Well-Known Member

    Updated: v 0.5 2010/05/06 - Nick - Update last visited time on user activity (Hotaru 1.2)
  3. kmai

    kmai New Member


    Recent Visitors 0.5 is compatible with version 1.4?
    I tried to install and returns a blank page

  4. Nick

    Nick Well-Known Member

    Works for me. If you get a blank page, turn debug on to see any errors.
  5. kmai

    kmai New Member

    Sorry about the lack of attention by not using the debug.
    My mistake: In the translation in a row with not closed (")

  6. smiera

    smiera New Member

    Thanks, its a good tool to calculate the visitors of the site. First time it showed the blank page after that get started for installation. Great tool..
  7. angolanmade

    angolanmade Well-Known Member

    I was playing around with this plugin came across this error when trying to enter some new settings,

    Notice: Undefined index: visitors_widget_get_avatar in /content/plugins/recent_visitors/recent_visitors_settings.php on line 52
  8. robin007

    robin007 Well-Known Member

    how to get last visit date and time
  9. valMETNG

    valMETNG Administrator Staff Member Admin

    I think you'll want to change line 176 in recent_visitors.php to include user_lastvisit like this:
    $sql = "SELECT distinct u.user_id, u.user_username, u.user_email, u.user_lastvisit FROM " . TABLE_USERS . " AS u JOIN " . TABLE_POSTS . " AS p on u.user_id = p.post_author WHERE (u.user_role != %s) AND (u.user_role != %s) AND (u.user_role != %s) AND (u.user_role != %s) AND (p.post_status = %s OR p.post_status = %s) ORDER BY u.user_lastvisit DESC LIMIT " . $limit;
    It would then be assigned to $visitor->user_lastvisit in the foreach (starting at line 113) so you could add it to your $output like on line 141:
    $output .="<a href='" . $h->url(array('user' => $visitor->user_username)) . "'>" . $visitor->user_username . " last seen on " . $visitor->user_lastvisit . "</a>\n";
    robin007 likes this.

Share This Page