Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Trace and log user actions... Details »»
Trace and log user actions...
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-27-2003 Last Update: Never Installs: 43
 
No support by the author.

This hack was requested by ossi69 and John Mac.

This is a pretty simple hack that allows you to track and document a user's
actions while they are logged into your board. Every click made by the user
makes a brand new entry in a log file. The log file entries include, username,
IP address, date and time, and the URL clicked on. The user actions are
documented even before the user has a chance to see the page he clicked on.

Templates affected by this hack: none
Tables affected by this hack: user
Files affected by this hack: global.php, admin/user.php

Execute the following query to create a new field in the user table:

alter table user add trace smallint(5) unsigned DEFAULT 0 NOT NULL;

You also need to create a brand new directory in your forums directory by
the name of tracelog. You need to make sure that your give the appropriate\
read/write permissions to this directory so that the http server on your
host can create files in there.

Here is a sample output:
Code:
Zed, 192.168.1.101 , 2003-04-28 18:31:30, /forums/index.php
Zed, 192.168.1.101 , 2003-04-28 18:31:36, /forums/forumdisplay.php?forumid=9
Zed, 192.168.1.101 , 2003-04-28 18:31:42, /forums/showthread.php?threadid=143901
Zed, 192.168.1.101 , 2003-04-28 18:31:51, /forums/rules.php
Zed, 192.168.1.101 , 2003-04-28 18:31:53, /forums/forumdisplay.php?forumid=9
Zed, 192.168.1.101 , 2003-04-28 18:32:07, /forums/showthread.php?threadid=143901
Zed, 192.168.1.101 , 2003-04-28 18:32:11, /forums/index.php
Zed, 192.168.1.101 , 2003-04-28 18:32:15, /forums/forumdisplay.php?forumid=103
Zed, 192.168.1.101 , 2003-04-28 18:32:28, /forums/showthread.php?threadid=225576
Zed, 192.168.1.101 , 2003-04-28 18:32:38, /forums/member.php?action=getinfo&userid=4112
Note:Go to this post to download the directory protection file for this hack.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 04-29-2003, 09:52 PM
Areku Areku is offline
 
Join Date: Feb 2002
Posts: 540
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice point!

Is that as simple as adding admin/tracelog/ instead of tracelog/ on the first replacement? I guess that's more secure than the index.php file?

The userid thing may be a good point too...

(Ps. working on vb2.2.0 )
Reply With Quote
  #33  
Old 04-30-2003, 01:53 AM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install...

it would be a wicked idea to have the logs viewable in the admin cp....like a link or something!!!
Reply With Quote
  #34  
Old 04-30-2003, 03:07 PM
Katana Myronson Katana Myronson is offline
 
Join Date: Oct 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack! I'm going to install it right away! Thanks, Zzed this is just what i was looking for!
Reply With Quote
  #35  
Old 04-30-2003, 07:56 PM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this create a lot of queries
Reply With Quote
  #36  
Old 04-30-2003, 08:17 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 01:56 PM TheComputerGuy said this in Post #34
does this create a lot of queries
There are no queries while a user is being traced. Information is written to a text file. The user information is already populated when the user esablished a session with the board, so there is no need for any further queries.

The only time there is a query is when you try to visit the contents of the tracelog directory.
Reply With Quote
  #37  
Old 05-01-2003, 09:22 PM
Morgalis Morgalis is offline
 
Join Date: Oct 2002
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this was just what i was looking for!

thanks
Reply With Quote
  #38  
Old 05-02-2003, 05:52 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are welcome.
Reply With Quote
  #39  
Old 05-02-2003, 11:36 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
04-28-03 at 07:04 PM Zzed said this in Post #9
I'll look into the line separator thing.

You can view the file through your browser by going to http://myforum.com/forums/tracelog/Zzed.log

Or you can get a directlry listing by going to: http://myforum.com/forums/tracelog
How's this coming along? And Mutt's idea about using the userid as the name of the file instead of the username is a good one, too.
Reply With Quote
  #40  
Old 05-02-2003, 07:54 PM
obs obs is offline
 
Join Date: Oct 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi I'm new here and this is a really nice hack. I was wondering how to automatically track all users instead of having to go into each one and selecting 'track user'?
Reply With Quote
  #41  
Old 05-02-2003, 07:57 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 01:54 PM obs said this in Post #39
hi I'm new here and this is a really nice hack. I was wondering how to automatically track all users instead of having to go into each one and selecting 'track user'?

Are you sure you want to do that?

If so then replace this:
Code:
if($bbuserinfo[trace] == 1) {
with this:
Code:
if(1) {
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07743 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete