vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Log Logins Hack (https://vborg.vbsupport.ru/showthread.php?t=241780)

Blooded 09-13-2010 05:30 PM

Works great thanks a lot :)

top dogs 360 09-25-2010 05:24 PM

We have awards for log in streaks. A 1 month, 3 month, 6 month, 1 & 2 year streaks.

This allows us to track users log in accordingly. This information has nothing to do with privacy. It only has to do with seeing who is online and how often.

The goal is to reward your members for their activity on your site. They have many options out there and everyone should be lucky people spend their time on websites.


TD
www.xboxhounds.com

top dogs 360 10-02-2010 11:18 PM

Never mind doesnt work how I need it to because many member dont log in and out. They just stay logged in all day and night I guess? This track misses that because it does not track any activity.

Videx 10-02-2010 11:53 PM

Quote:

Originally Posted by top dogs 360 (Post 2106143)
... I need it to because many member dont log in and out. They just stay logged in all day and night I guess?

Some may, but not unless they try. Normally the Session Timeout number at AdminCP > Settings > Options > Cookies and HTTP Header Options will log them out automatically.

kylek 11-02-2010 07:03 PM

Thanks for this, installed!

meeja 12-02-2010 11:12 PM

Could I suggest this hack also record useragent (and maybe make it searchable too on that).

Such a great mod.

lemonadesoda 12-15-2010 07:28 PM

This is great. Thx.

However, the sort by IP view is missing. Please add this!

nocte 01-02-2011 08:49 PM

I'm using this hack on a big forum. Now i got this database error (only once):

Code:

Invalid SQL:
INSERT INTO logins (userid, username, ipaddress, phpdate, logintype)
VALUES (, '', 'XX.XX.XX.XX', 1293458891, '');

:confused:

OldSchoolDSL 01-02-2011 10:24 PM

This can be useful.

Installed and working

4.1 PL2

aileron79 01-26-2011 10:03 AM

Hi!

First of all, thanks for the hack, it really does a great job! There is only one huge problem. Some users are "always", or better "automatically" logged in by their cookies. Thus, the IP addresses of those users are NOT recorded.

Admittedly, I have no clue how this could be achieved, the only idea would be to check if there is a record matching the same ip for a particular user when opening forum_home. This, however, may of course increase database load but is probably suitable for small forums.

Well, I definitely needed that... so I just wrote the required plugin by myself, you may include that in the original addon if you like... please test thoroughly before use!

PHP Code:

$cb_lastknown_ip $vbulletin->db->query_first("SELECT ipaddress FROM " TABLE_PREFIX "logins WHERE userid=" $vbulletin->userinfo['userid']. " ORDER BY phpdate DESC LIMIT 1");
if (
$cb_lastknown_ip['ipaddress'] != IPADDRESS)
{
    
$vbulletin->db->query_write("INSERT INTO " TABLE_PREFIX "logins (userid, username, ipaddress, phpdate, logintype) VALUES (" $vbulletin->userinfo['userid'] . ", '" $vbulletin->db->escape_string($vbulletin->userinfo['username']) . "', '" $vbulletin->db->escape_string(IPADDRESS) . "', " TIMENOW ", '$logintype')");
}
unset(
$cb_lastknown_ip); 

I created a new plugin for Log Logins Hack at hook forumhome_start (maybe ..._end would be better... let's see...). Don't forget to activate, use at your own risk.


All times are GMT. The time now is 08:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01113 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete