View Full Version : Administrative and Maintenance Tools - User Activity Logging
dxguru
04-23-2007, 10:00 PM
USER ACTIVITY LOGGING.
Description:
This Mod will (eventually) allow you to track a users activity from any script within vB or its addons ... well at least those that make use of the Hook features.
Background:
I have seen various requests around for some form of user logging but never been able to find an actual Mod. As we had a need for this on our site I decided to write my own.
I have been working with vB for a couple of years now (and a php coder for a lot more) and made use of a number of other coders Mods, both as they had been released or customized to suit our own purposes. Although not a very active poster here at vBorg, it is one of my regular visits.
Installation:
Standard Product Import using the AdminCP.
No template changes.
Optional (for AdminCP Log Viewer):
- Upload contents of zip file
Upgrade:
Will be as above, but select 'Overwrite' ;)
Features:
Database and/or Thread notification of activity
Selectable Forum for Thread notification
Selectable posting User for Thread notification
On/Off for each logging area
AdminCP Log Viewer/Pruner
Additional thread option for logging all Log-ins and outs
Current Logging Areas:
showthread - logs when a user views a thread (this is currently the only one I am using and I am actually happy with)
forumdisplay - logs when a user views the forumdisplay script
search - logs when a user makes a search
editpost - logs when a user edits a post
log-ins/log-outs - logs successful and unsuccessful log-ins and log-outs
profile views - logs when a user views the 'member profile' page
ChangeLog:
v1.0.6 (28 Nov,2007) - incorporated IPAddress tracking as provided by dartho (thanks :) )
v1.0.5 (16 May,2007) - added profile viewing both for 'logged users' and 'all user to a separate thread'. No admincp file update required. NB: Check options after upgrading.
v1.0.4 (07 May,2007) - added log-in/out logging both for 'logged users' and 'all user to a separate thread'. No admincp file update required.
v1.0.3 (27 April, 2007) - Corrected 1 thread per logged user issue, added 'editpost' logging area
v1.0.2 (25 April, 2007) - Check for deleted thread & added AdminCP Log Viewer
v1.0.1 (24 April, 2007) - Error in XML
v1.0.0 (24 April, 2007) - Initial release
Future Enhancements?:
Additional logging areas (just ask and I'll look in to it)
Viewable log transcripts taken from database entries - completed
Usergroup logging
Thanks To:
All those other coders whose Mods I have installed and learned from :)
Note: This is the first Mod I have actually released here (or anywhere), so please go easy on me ;)
Hopefully I have the Product URL and Version Checking URL links right.
dxguru
04-24-2007, 01:00 PM
Reserved ... don't know why, but everybody else does :P
glorify
04-24-2007, 01:08 PM
Looks good man. I'll install it for those troublesome members.
dxguru
04-24-2007, 01:35 PM
Looks good man. I'll install it for those troublesome members.
Thanks glorify. Don't forget to click the 'Installed' link ;)
dj_melayu
04-24-2007, 01:59 PM
Nice mod but sorry I get this
XML Error: EntityRef: expecting ';' at Line 7
dxguru
04-24-2007, 02:16 PM
Sorry. My mistake when adding the URLs to the XML instead of in the ACP itself.
Fixed and re-uploaded.
This looks quite nice! Is there any way to log in attempts or url access as well? In other words, if a guest is attempting to log in as an existing user (say admin) then this is logged along with IP address, user name, and password attempt...
This is also good for those users who try to access staff areas or areas restricted from them.
This would be FANTASTIC if this could be added as I know SMF boards already have this in place and can be viewed, and deleted from adminCP area.
Sorry but this mod looks close to what I have been hoping for.
dxguru
04-24-2007, 02:35 PM
This looks quite nice! Is there any way to log in attempts or url access as well? In other words, if a guest is attempting to log in as an existing user (say admin) then this is logged along with IP address, user name, and password attempt...
This is also good for those users who try to access staff areas or areas restricted from them.
This would be FANTASTIC if this could be added as I know SMF boards already have this in place and can be viewed, and deleted from adminCP area.
Sorry but this mod looks close to what I have been hoping for. So in essence you would like to log error messages not specific to a particular user?
Yes, that would be nice to also log guest attempts as well as user attempts. Maybe by user group?
Charlie98902
04-24-2007, 02:48 PM
Great potential this mod is I'll wait till it's out of beta stage and tweaked as mentioned above. Yes logging in the users trying to log into another member is a nice feature to have. I assume there is a way to clear this log as well?
dxguru
04-24-2007, 02:54 PM
Yes, that would be nice to also log guest attempts as well as user attempts. Maybe by user group?Short answer is yes, but you would need to modify the core vB code to add some extra Hook locations.
Basically with this hack you can log any script at any point where there exists a Hook. No hook - no log. But there is nothing preventing us adding our own Hook locations (except ease of upgrades :) )
PM me if you would be interested in discussing having me do this for you.
bell19189
04-24-2007, 02:55 PM
:( it killed my forum... i kept getting fatal errors as soon as it was installed, when i removed it everything went back to normal... anyone else had anything similar happen? and or know how to fix it
dxguru
04-24-2007, 02:57 PM
Great potential this mod is I'll wait till it's out of beta stage and tweaked as mentioned above. Yes logging in the users trying to log into another member is a nice feature to have. I assume there is a way to clear this log as well?Currently the database side is simply to start logging entires. Nothing so far is done with the data and you can turn off database logging if you wish.
My plan is to provide an ACP interface similar to the Moderator Logging already included (which is where I got the basic code idea from)
dxguru
04-24-2007, 02:58 PM
:( it killed my forum... i kept getting fatal errors as soon as it was installed, when i removed it everything went back to normal... anyone else had anything similar happen? and or know how to fix itWhat kind of fatal errors? Could you send me a screen shot please.
Short answer is yes, but you would need to modify the core vB code to add some extra Hook locations.
Basically with this hack you can log any script at any point where there exists a Hook. No hook - no log. But there is nothing preventing us adding our own Hook locations (except ease of upgrades :) )
PM me if you would be interested in discussing having me do this for you. PM sent and no bell19189 I have not installed yet. Asking for enhancement to this before I review.
dxguru
04-24-2007, 03:08 PM
Just had a thought regarding the fatal errors. Originally I had set the XML to install Inactive because you need to set up the options before turning it on. This is possibly what caused the errors.
I will put some option-error-checking in it for the next update.
dxguru
04-24-2007, 03:27 PM
OK, I've done some additional testing with a variety of incorrect option settings ... cannot get it to cause fatal errors.
No User ID's ... nothing gets logged
No Forum Selected ... nothing gets posted
No Posting User ... nothing gets posted
User ID but nothing else ... no postings
etc
I will be really interested to discover what caused the fatal error.
beduino
04-24-2007, 04:36 PM
I will test - but the concept is very interesting!
Thanks for share.
All the best
joao barroca
aka beduino
ps. your site it's very useful too :)
Mastar
04-25-2007, 12:17 AM
Here is my error:
Fatal error: Call to undefined function: build_thread_counters() in /home/down/public_html/forums/includes/init.php(319) : eval()'d code on line 89
dxguru
04-25-2007, 01:36 AM
Here is my error:
Fatal error: Call to undefined function: build_thread_counters() in /home/down/public_html/forums/includes/init.php(319) : eval()'d code on line 89
Thanks Mastar. I didn't think about what would happen if the logging thread was deleted :(
I have corrected this problem and also added an optional AdminCP Log Viewer/Pruner.
BobbyBig
04-25-2007, 02:49 PM
How about a Screenshot of the Page showing the Statistics
itsblack
04-25-2007, 08:00 PM
Usergroup logging will be great. Installed.
itsblack
04-25-2007, 08:04 PM
It seems that the activities of guests will also be logged?
I checked the log just moment ago, there are 5 entries from guests and 1 entry from myself.
Edit: OK, I figured it out, when there's no user id entered, then it will log all of the activities. But once a userid is entered, then only the entered userid's activity will be logged. Am I right?
raptor260
04-26-2007, 02:28 AM
Thanks for this.... Very Nice.... I do have 1 question. When it creates the thread, it is making posts for all the users in the same thread... I thought it would create a thread for each user. Am I wrong in my thoughts??
Thank You for this script
Tommm
04-26-2007, 02:03 PM
Thanks for this.... Very Nice.... I do have 1 question. When it creates the thread, it is making posts for all the users in the same thread... I thought it would create a thread for each user. Am I wrong in my thoughts??
Thank You for this script
I was wondering that too!
This hack has fantastic potential, and if it could either update one log thread per member OR include their username in the post, it would be close to perfect! :)
KURTZ
04-26-2007, 04:18 PM
agree, great potential for this hack, just installed on my board ... and waiting for new devs ... ;)
dxguru
04-27-2007, 01:21 AM
It should be creating 1 thread per user being logged.
A question about usergroup logging ... should it still be 1 thread per user or 1 thread per usergroup? I could possibly even add that as an option.
raptor260
04-27-2007, 03:28 AM
It should be creating 1 thread per user being logged.
What it is doing, I have 3 userid's that I am watching... It creates a thread for the first user, then is puts all the activity for that user in the thread, now if a second user connects, it is putting this users activity in the same thread as the first user.... Does that make since...
dxguru
04-27-2007, 07:36 AM
Nope, doesn't make sense. I'll investigate it further.
Stay tuned.
dxguru
04-27-2007, 05:07 PM
I've corrected the thread problem and it now creates a new thread for each user being logged.
itsblack
04-27-2007, 05:30 PM
Thank you for update.
Advice: can you please release the script and product file in one package? or better write the version number in the zip name.
dxguru
04-27-2007, 06:00 PM
No probs. I've kept the zip file separate as it's optional and only required if you activate database logging and want to access the logs from the ACP.
KURTZ
04-27-2007, 08:11 PM
updated!
raptor260
04-27-2007, 09:08 PM
Updated... WOW thank You
Mastar
04-30-2007, 12:56 PM
That upgrade seems to fix the errors, thanks! Good work!
KURTZ
05-07-2007, 10:36 PM
updated!
tehQspm
05-14-2007, 11:32 PM
Is there a way to log member profile views with this?
dxguru
05-15-2007, 11:18 PM
Is there a way to log member profile views with this?There is now :D
tehQspm
05-15-2007, 11:23 PM
haha just last night I was messing around with plugin code and I don't know how I did it but I managed to get it to log profile views although it is dependent on whether the "log thread views" option is enabled.
Next step is Private Messaging. Logging whether someone is viewing/sending a private message etc.
One question I do have. It doesn't parse BB code for me. Any idea why? Incidentally I just removed the url outputs from the plugins but will change it back if there's a way the log can parse that. These are specifically the [ URL ] bbcodes that show up in logs.
Also is it supposed to log that someone is "editing" a post or "replying" to a thread? Mine doesn't. It just saying "viewing" a thread so I'm guessing that's by design and not an error.
dxguru
05-15-2007, 11:36 PM
That's odd about the BB code not parsing for you. It's supposed to and does in my test environment :(
Thread editing, replying and private messaging are not yet included but I will add these in next chance I get ... might even be later tonight if other things I am working on don't go well ;)
laura66a
05-15-2007, 11:55 PM
Hi.
It doesn't install on 3.6.7. It says invalid file.
Laura
Oops. Yes it does. Your instructions didn't say to import the correct file.
dxguru
05-16-2007, 12:25 AM
Glad you got it sorted, thanks Laura.
PS. Don't forget to click install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=145660) ;)
Ignicoccus
05-17-2007, 10:13 AM
Sounds great, I will install this on my forum after the 3.6.7 update !!
pictureboarduk
05-25-2007, 02:22 AM
Hi.
It doesn't install on 3.6.7. It says invalid file.
Laura
Oops. Yes it does. Your instructions didn't say to import the correct file.
Same issue
So do you import the XML file via 'manage products' OR FTP it to your site?
Thanks
dxguru
05-25-2007, 04:33 PM
Yes, you import the product xml file via the AdminCP 'Manage Products'
pictureboarduk
05-25-2007, 06:54 PM
Thank you, but then I get invalid file.
3.6.7, default installation/theme
Merjawy
05-25-2007, 10:32 PM
nice but got problem
XML Error: syntax error at Line 1
when importing the product file
running vB3.6.4
UPDATE:
do I need to import the right file? lol oops.. sorry mate
now since I got the right file.. heres what I got
The following dependencies were not met:
This product is not compatible with version 3.6.4 of vBulletin. (Compatible starting with 3.6.5)
so I guess I need to upgrade :)
pictureboarduk
05-27-2007, 05:02 PM
How to you import the XML file contained in the Includes folder?
I imported the separate XML one shown in the instructions at the top of here, but what about the one in the archive in the Includes folder?
Thanks.
pictureboarduk
05-27-2007, 05:03 PM
Does this log the search query the user entered?
I thought I saw it do so, then when I changed it to record it's logs to a subforum it isn't doing so.
?
Also how do you find the ID of threads
Thanks!
digital3
05-28-2007, 12:02 AM
I am not sure why you are trying to use quotes inside BBCode URL tags but they simply won't work. The links to the viewed pages in the admin area are just code, not links. You need to either use straight html or remove the quotes from inside the BB Code URL tags
dartho
05-30-2007, 07:33 AM
do you reckon this could log user activity from a specific IP address as opposed to a user name?
Thanks
citroenar
05-30-2007, 08:03 AM
Every time script write a log I get SQL error:
Database error in vBulletin 3.6.7:
Invalid SQL:
UPDATE forumuser
SET logging_thread = 1205
WHERE userid =;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
Error Number : 1064
Noonster
05-30-2007, 09:29 AM
Any screenshots of how the forum will look and how it will post a person's activities?
Thanks
chatzworld
06-10-2007, 10:23 AM
works great is their anyway you can track them when using stuff like the arcade, blogs, gallerys etc?
David Lama
06-14-2007, 03:14 AM
installed and marked as installed. thanks
but what do you mean by "Record logging details in the database" ?
pictureboarduk
06-22-2007, 09:07 PM
Does this log the search queries made by users at all (the words they search for)?
:)
Zelda-King
07-08-2007, 01:21 PM
Handy hack! I'm getting a bug with the logging profile viewing: If logging profile views is enabled and the user views a profile, they get this error;
Fatal error: Cannot redeclare vbflush() (previously declared in /home/etcetc/inferno/engine/system_handlers/vBulletin/global.php:516) in /home/etcetc/forums/httpdocs/includes/adminfunctions.php on line 3383
I realise that's clashing with the RPG Inferno hack so I make no comment about that but you might want to check with the adminfunctions.php script.
Hornstar
07-16-2007, 11:26 AM
just wondering, how much extra load could this put onto a already fairly heavy server?
Does it use many queries? is it optimized to be suitable for big boards?
Thanks.
Kaycee123
07-20-2007, 10:27 PM
These are probably dumb questions since everyone else seems to have figured it out, but I've installed this, set it to log everything and set up a new forum for the logging threads to be created in.
What do I put under Posting User ID - what does that mean?
And where it says Record all log-outs to thread ID# - what do I put there (same for Record Profile views?)
No threads have been created in the forum even though the members we want to watch have been on and off our forum all day, so I obviously don't have something set correctly!!
Any help would be appreciated, thanks!!
mooky
10-24-2007, 12:11 PM
GREAT mod.
MOTM
dartho
11-22-2007, 11:30 PM
This is excellent!
I've got around to tweaking it a just little and added the ability to log / track specific IP addresses also.
Just what I needed!
Kintaro81
11-26-2007, 08:06 AM
I've got around to tweaking it a just little and added the ability to log / track specific IP addresses also. Just what I needed!
can you share with us this tweaks? thanks! :D
dartho
11-26-2007, 11:03 AM
My changes are pretty .... ugly and specific to my site and needs. I have however passed this information onto the add-on author...
dxguru
11-27-2007, 11:44 PM
Thanks dartho. I have incorporated your enhancements for IPTracking (but I did have to remove the 'guest' bit as I am sure you understand).
Really appreciate the feedback :)
chikkoo
11-28-2007, 12:32 PM
Nice concept. I am going to try it tonight.
Will it alert me thru email or PM of any specific (suspected) user's activity?? It would be very handy if I suspect somebody is hacking my forum.
mystic10
12-23-2007, 06:44 PM
does it mean its this mod is not for 3.6.8 version...i really need this mod for my site...please guide and reply..thanks in advance
ocktra
01-08-2008, 12:33 PM
Any way to log attachment downloads?
mystic10
01-18-2008, 02:49 PM
this works awesome i just wanted to thanks the aurthor of this hack...its just amazinggggg.....i had a request...as u made user login would it be possible for u to integrate same ip login....
thanks in advance it awesome
landspeed
02-08-2008, 12:52 PM
Can you define that it logs all users?
PimvanJ
02-19-2008, 06:57 PM
Great hack need it for some ass-hole members.
More possibilities highly appreciated
Read private mail, sending mail. and more
Or logging 'currentlocation'
haytham
04-02-2008, 05:16 PM
Sorry but can't find the options for this mod. Can anyone tell me where to find them?
dirtycrow
05-06-2008, 02:57 AM
any plans for a 3.7 version?
silurius
05-21-2008, 03:01 PM
Is this add-on maintained? Waiting for 3.7 version as well.
dartho
05-21-2008, 09:55 PM
I already had this installed pre-upgrade, and it continues to work for me.
Madbatty
07-21-2008, 05:35 PM
Did someone may know why this hack only counts until User ID 1400 ???
RobParker
07-23-2008, 03:55 PM
Does this work for the 3.7? Earlier posts suggest yes and no so a bit unclear.
RobParker
07-23-2008, 04:16 PM
Ah I think maybe I misunderstand.
What I wanted to do was to see which users were reading threads the most, who kept hitting F5 to refresh, etc.
This looks like it only tracks a specified user, what I thought it was was that it logged every user.
That's not what this does is it?
TMSBrad
07-30-2008, 07:57 PM
Can it track a range of IPs? I want to know if anyone from a certain company is on my boards, so I'd like to log all users with, for example, an IP between 123.456.0.0 and 123.456.789.999.
dwstudntln
08-18-2009, 06:07 PM
I am having trouble getting this mod to work for me. From the zip file, I placed the userlog.php in the ./admincp directory and the XML file in the ./includes/xml directory as well as the product-userlogging.xml in the same ./includes/xml directory - all on my server. Using vBulletin's Product Manager, I imported this product successfully (at least I didn't get any errors). I created a new forum (all permissions granted for testing purposes) so that my test users can view the logs. I then went to vBulletin options and found the User Logging - completed the setup options for one or two users with all logging enabled (for testing only). I also verified that all of the pluggin's that I wanted to use had 'hooks' assigned to them in the Plugin Manager. After logging in as the test users and trying to create logs for several days, I still do not have any logs to view - either in the forum or in the control panel. I don't know what I am doing wrong. Then I thought ,"Can this mod be used for vBulletin 3.8?" I would really like to have user logging for 3.8 and this mod sounds just like what I need. Can anyone help me with this?
Thanks in advance
athlon64bit
01-24-2010, 09:24 PM
Anyone tested this on vb 4? Is it working? :)
whitedd
05-29-2010, 11:42 PM
working with 4.0.3...
diysmps
12-19-2012, 09:09 PM
working with 4.2.0
but how to log all users?
shall I write all user IDS???? 3024 users !!
regards
won't install for me
nasty sql error number 1064 on product import
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.