Audit Trail Plugin
Audit Trail is a plugin to keep track of what is going on inside your blog. It does this by recording certain actions (such as who logged in and when) and storing this information in the form of a log. Not only that but it records the full contents of posts (and pages) and allows you to restore a post to a previous version at any time.
To summarize:
- Log of user actions inside your blog - useful for finding out who did what in a multi-user system
- Post/page revisions and restorations - every change to a post or page is recorded and can be instantly restored to a previous version
- Differences are shown graphically
- Extensible, allowing other plugins the ability to add and display items in the Audit Trail
- Ability to track registered user page visits
- Fully localized
Version History
- 1.0.10 - Only include prototype on AT pages
- 1.0.9 - WP 2.5 compatability
- 1.0.8 - Show log items according to blog timezone offset
- 1.0.7 - Fix favicon.ico logs, ignore certain users, track failed login attempts
- 1.0.6 - Fix warning, allow searching by username
Installation
The plugin is simple to install:
- Download audit-trail.zip
- Unzip
- Upload
audit-traildirectory to your/wp-content/pluginsdirectory - Go to the plugin management page and enable the plugin
You can find full details of installing a plugin on the plugin installation page.
NOTE: If you are upgrading from a pre 1.0 version please de-activate and then re-activate the plugin. This will upgrade your database tables (unfortunately any existing Audit Trail data will be lost).
Usage
Once the plugin is installed then your actions are already being recorded. You can view the Audit Trail log from the Manage/Audit Trail page.
Note that some entries in the log can be clicked and will expand to show more details.
Post & Page history
The Audit Trail plugin records the entire post everytime it is changed. This can then be used to provide a version history along with the capability of restoring a post to a previous version through this interface which appears on appropriate posts:
Usage is simple. Select the version you wish to view, click the 'view' button and examine the contents of the post. From here you choose to restore this version, delete it, or close the contents.
Restoring a post to a previous version will be recorded in the Audit Trail logs just like any other change. If you decide you don't like the restored version you can always restore back to another version.
NOTE: Installing the Audit Trail plugin in a blog with existing posts will mean that you have no revision history until a post has been changed at least twice (there is no log before the plugin, and there is little point allowing a restoration to the same version as is currently live)
Options
From the options page you can configure exactly what actions are audited. Any plugins that support Audit Trail will also display themself here.
Permissions
Users with the 'edit_plugins' or 'audit_trail' capability can view and administer the Audit Trail plugin. The 'audit_trail' capability can be added with the Role Manager plugin.
Support
Please direct all support questions to the Audit Trail support forum. Any support questions left on this page may not be answered.
Bugs & New Features
A full list of all bugs can be found in the Audit Trail issue tracker.
A full list of all requested features can be found in the Audit Trail feature tracker.






Comments
Oct 31, 2006 11:28 pm
Does this work on pages, too, or just posts? I realize they are in the same DB table, but it seems like few plugins actually work with both...
Oct 31, 2006 11:34 pm
Yes, both pages and posts. I've edited the text to make this clearer.
Nov 1, 2006 8:36 am
Congratulate yourself on a very good plugin. Works wonderfull and in terms of functions added to the default WordPress instalation, it has an impact on workload and work management.
Great job, good idea implementing it. We hugg you :D.
Nov 1, 2006 10:24 pm
This is a really good plugin and a really good idea.
:)
Nov 2, 2006 3:57 am
Hey,
Well, I must be blind!
I don't see where you can restore a previous post:
http://img182.imageshack.us/img182/7752/audittrailpu0.jpg
Thanks a lot,
Will
Nov 2, 2006 4:18 am
You can restore posts when editing the post itself.
Nov 3, 2006 8:17 pm
Oh ok for new posts only it seems
old posts do not show audit trail...
Nov 3, 2006 8:26 pm
You will get an audit trail for all posts. Remember that you need at least 2 edits for a post to show a history. An existing post will have been edited before Audit Trail, and will only have a post history when you edit it two times after installing Audit Trail
Nov 5, 2006 4:20 am
oh of course...
feels like an idiot
have a great weekend!
Nov 10, 2006 3:22 pm
But this plugin don't like polish chars... (UTF-8)
Screenshot: http://www.fotosik.pl/pokaz_obrazek/pelny/70331bdb38589547.html
Nov 19, 2006 10:58 am
Hi, nice plugin. But I need a function that shows the IP to the username. Can you help me, please?
Jan 15, 2007 2:42 am
Hi,
will you eventually include a way to compare the differences between two page versions? For example, by using Blicki's diff.php?
Mar 31, 2007 9:28 am
Wow this is sweet. Thanks for creating this.
Definitely my favoritest new plugin.
Now it just needs an svn tie-in.....
Apr 2, 2007 7:47 am
Great plugin ! it's not the missing versioning feature I hope WP will get soon, but it's useful anyway.
Any leads on future developments ?
I am looking for a tracking WP plugin (log and track actions for registered users), stg like your plugin, but for the front end side
Apr 17, 2007 2:51 pm
Hi, many thanks for a crucial plugin! How can I make the Audit Trail page in the admin panel viewable for other users than the admin? In other words, were do I chance the user level for this plugin?
Apr 20, 2007 3:22 am
All requested features have been included along with a host of other ones
Apr 26, 2007 5:52 am
I'm getting the following error when trying to view a posts audit trail:
Fatal error: Class at_ajax: Cannot inherit from undefined class dh_plugin in /home/turk/domains/hotelblues.com/public_html/wp-content/plugins/audit-trail/ajax_post.php on line 5
Apr 26, 2007 6:02 am
Well it appears one needs Drain Hole installed for this to work. Should list that as a requirement.
Apr 26, 2007 6:46 am
Hi Turk, try version 1.0.1. The Drain Hole link was a copy-and-paste error.
Apr 26, 2007 7:40 am
In post.css there is mention of:
images/box-head-right.gif
images/box-head-left.gif
images/box-bg-right.gif
images/box-bg-left.gif
images/box-butt-right.gif
images/box-butt-left.gif
images/box-butt-left.gif
images/box-butt-right.gif
These files are not included? Am I missing something?
Apr 30, 2007 11:52 pm
Really nice plugin.
Currently does not function.
Manage/Audit trail/
--> A "Csv" links appear above the Audit trail title. This link does not work.
Write/post/
--> The menu is ok. The "view" button does not work.
Only one comment. I would like that Audit tray use the same box interface as the trakbacks, custom fields... Is nicer and practical to move or closed the box to obtain a cleaner interface... There are a lot of modules that add their own block under the edit area and the rendering is progressively unaesthetic and unpractical.
May 3, 2007 3:48 am
Fabrice, both those features work fine for me. Can you provide more details about your setup? Is the plugin inside the '/wp-content/plugins/audit-trail' directory? The plugin is already using the same box interface as trackbacks
May 15, 2007 3:14 am
Sorry to the delay, but I am not a specialist and I have a dsl connection only 2 days per week at work. I have opened the main audit-trail php file. You have addresses that use both /\ slashes. I have modified the slash so that only / are used and then the csv link now work. Supposed to explain all problems ?
> The plugin is already using the same box interface as trackbacks
Strange. There is no way to minimize or extend or move the box like the others... All other installed sidebox modules work fine so I do not know.
May 16, 2007 6:34 am
Thanks for a great plugin!
After updating Audit trail now monitors a lot of thinks that it didn't do before. For example everytime I edit och update a post, there is a page view registered for things like:
/wordpress/wp-content/plugins/xinha4wp/xinha_core/plugins/Abbreviation/lang/sv.js
/wordpress/wp-content/plugins/xinha4wp/xinha_core/plugins/SpellChecker/lang/sv.js
/wordpress/wp-content/plugins/xinha4wp/xinha_core/plugins/SuperClean/lang/sv.js
Other files used by different plugins are also monitored. How can I exclude these types of page loads from showing up in the trail?
May 16, 2007 9:40 am
hello again, another question: the version numbers (when editing a post) seems to bee in reverse order, i.e. the oldest post is no longer number 1. Can I change this back to the more conventional way?
May 17, 2007 7:18 am
Just upgraded from 0.3 to 1.0.1, and thought I'd share a few issues I had.
In summary, everything worked fine except that all IP's were being logged as 0.0.0.0. I had to edit models/audit.php, and change $data['REMOTE_ADDR'] to $_SERVER['REMOTE_ADDR']. Once this was done, I also had to modify the wp_audit_trail table - the column for IP was signed by default, and thus any address above 127.255.255.255 wouldn't get logged properly. Changed the IP column to unsigned, and now everything works as expected.
This was with WP2.2, Mysql 5.0.23 and PHP 5.2.0.
May 21, 2007 12:35 am
Fabrice: Are you using Windows?
Manne: The order of posts is intentionally reversed. This makes your most recent edit appear first, and the older ones appearing further down the list. This seems to reflect what would be the most likely usage. As for the other issue, Audit Trail has an option to log 'registered page views'. When you are editing a page the preview area will cause a page view to be registered. If you don't want this then disable the page view option from the Audit Trail options.
Moogle: Thanks for the note. You are correct in both instances and the typos have been fixed in 1.0.2
May 21, 2007 12:55 pm
Thanks for your reply John. The order of the edits is no biggie but I still would have preferred it the other way.
If I turn off the "register page views" option then no post views will be audited I guess? All I want is to block file views that are not actually page views but rather files used by plugins (like javascript etc). Any way to do that?
May 21, 2007 11:17 pm
Manne, I can't reproduce the problem you are seeing with external files. Audit Trail should not be able to log access to these files as they happen outside of WordPress. If they are appearing in Audit Trail then it means that something on your site (whether a plugin or theme) is forcing them to go through WordPress, and so be picked up by Audit Trail. Does the problem only occur on the xinha plugin?
I've added an option to reverse the order of edits.
May 22, 2007 7:30 am
thanks for the great plugin!!! I have a small problem: the search on top of the page does not seem to work. I am typing a user name, which is listed and got 'no results', same with the IP. Am I missing something?
Also, are you thinking to implement the ability to filter the results (like excluding the actions of the admin for example)
May 22, 2007 9:02 pm
Hi Pret,
The search does work, it just doesn't search user names! Doing so isn't going to be a small change so I'll put that and your suggestion for filters onto the list for the next version.
May 23, 2007 10:57 am
Ouch... I am working elsewhere!
I test wordpress using easyphp... I am not a real wordpress user (yet?).
May 23, 2007 11:07 am
Hello John
No it's not just xinha, also pictures, javascript files etc used by the theme and by plugins are being logged, for example:
/wp-content/themes/gluedideas_subtle/styles/default/headers/header_menu.jpg
/wp-content/themes/gluedideas_subtle/favicon.ico
/wp-content/plugins/attachment_list/attachment.css
/wp-content/themes/gluedideas_subtle2/assets/js/form_comments.js
All these came from one single post view.
Jun 4, 2007 12:43 pm
I keep getting the following error when I activate the plugin:
Fatal error: Call to undefined function: wp_enqueue_script() in /home/grapethi/public_html/wp-content/plugins/audittrail/audit-trail.php on line 50
Jun 4, 2007 7:58 pm
Jake, Audit Trail requires WP 2.1 or higher
Jun 11, 2007 2:11 am
Manne, I'm at a loss. Something on your site is causing all requests to be routed through WP, resulting in Audit Trail to pick them up and also being a performance slowdown (hits to static files, like images and CSS, should not touch WP). Maybe it has something to do with your .htaccess file?
Jun 13, 2007 1:53 am
ok, I guess that has to be it... this is my .htaccess :
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Jun 13, 2007 1:59 am
your were right John, I deleted the htaccess-file and now Audit Trail works as aspected! I wonder what plugin created the file in the first place..
Jun 14, 2007 8:38 pm
The file should be created by WordPress itself, and the file you posted above shouldn't cause a problem. I'm actually surprised that your site is still working afterwards!
Jun 15, 2007 4:50 pm
Strange...
one thing still doesn't seem to be right though, the page views that are now monitored are diplayed as "/?p=40" instead of "Title for post nr 40". Page edits are showed with the right title
Jun 18, 2007 5:01 pm
I like this very much, but I find that when I use the admin-ssl plugin with the audit-trail plugin the "view" feature for previous versions does not work (shows the animated progress icon but nothing happens). When I go and deactivate the admin-ssl plugin everything works again. I'd like to have both secure logins and the audit trail working.
Jun 29, 2007 12:31 am
Brian, try version 1.0.4
Jul 10, 2007 8:42 am
When displaying versions in ascending date order, only the first 10 versions are shown which means that any version after nr 10 can not be viewed.
Jul 23, 2007 10:29 pm
Manne, yes that's intentional to stop too many entries being shown. Do you need more than 10?
Jul 25, 2007 3:09 am
hi
thanks for the nice plugin, very useful and so far not using up any resources.
i was wondering if i can disable the tracking of certain users or ips, like my account (admin) i don't need to see my own movements, is it possible to filter that?
thanks agin
Jul 30, 2007 10:53 am
John: 10 versions are enough, the problem is that when you reverse the order you'd like to see the 10 most recent versions/edits, not just the 10 first ones
Aug 8, 2007 9:01 am
Hi, I'm not getting any results from the plugin even when I make repeated changes to posts and pages. I think it might have to do with the "change options" settings; when I check the appropriate boxes and hit "save options", it erases all my checks but adds one to "check for new updates"...I thought maybe it had to do with permissions, but I'm the admin, would I still need Role Manager? I'm a beginner so I do apologize if this is a silly question!
Aug 11, 2007 3:27 am
I have configured it with expires set to 0 (zero) but i t resets every months the statistics....
Any hint????
Diaolin
Aug 21, 2007 2:19 am
Dialoin, fixed in 1.0.5
Pysc, you don't need the Role Manager plugin. No one else has reported this problem so its likely to be specific to your installation. Try the latest version and if you still can't save options then send me details of your host
Aug 21, 2007 10:23 pm
My plugin installation appears to be broken at a basic level. I installed on a site with existing posts, then edited a post a few separate times. When I go to view one of the previous versions, I select it from the dropdown menu and when the view button is pushed, nothing happens. Using Firefox 2.0.0.6, error console shows audit_view not defined.
Aug 23, 2007 7:16 am
Would it be possible to include custom fields (metadata) in the version history?
Aug 23, 2007 10:42 pm
I figured out my problem. The ssl capability check that was recently added does not work in my environment. Apache was installed to be used with Plesk (server administration) only, which uses ssl. The blog is installed on the main web server which is using IIS (http only). In this scenerio, the .js was trying to load from the https site (which was wrong one). I commented out the check, which fixed the issue.
Aug 24, 2007 12:17 am
Manne, I'll put that on the list for the next version
Aug 27, 2007 3:09 am
This is a wonderfull tool for our multi-user blog.
Thanks for sharing it.
I would be happy happy happy if Audit Trail also would
- log failed login attempts
- log password resets
- alert me by email or run a script when there are too many login failures or pwd resets
(I'm thinking of time limited dynamic IP blocking here...)
Sep 21, 2007 11:33 am
John: Great!
I just noticed that the date/time recorded by Audit Trail are two hours off, I guess it has to do with GMT since I'm at GMT+2. How could I fix it?
Oct 11, 2007 3:19 pm
I have "Registered user page visits" enabled on Audit trail, but I keep on getting flooded with "View Page - /favicon.ico" views. This is in WordPress 2.3 install. Any way to exclude specific files or just /favicon.ico?
Oct 14, 2007 1:35 pm
This looks like what I've been looking for, but when I try to view the difference between two revisions, part of the page I am looking at is replaced with my site's 500 server error message.
Oct 15, 2007 3:48 am
Designer, favicon.ico shouldn't appear in the logs. Only pages that are served through WordPress will appear in the log. If favicon.ico is appearing then it means it is being served by WordPress, which is not supposed to happen. A possible cause of this would be a .htaccess file - see comment 38.
Endolith, what part of the page?
Manne, times are recorded in the timezone of your server. Does that still make it 2 hours off?
Oct 15, 2007 7:45 am
It started working on its own! This looks great.
What was happening is:
If I do Manage --> Audit Trail, and click one of the "Save post" links, the area where the edit box would appear opens up, but then it is filled with my site's custom 500 server error message, including CSS, which screws up the style for the entire page I am viewing.
If I do Manage --> Posts, and click the "View" button for a revision, it shows the 500 error where it would have shown the diff between revisions.
Oct 19, 2007 9:56 am
When I click on the "View" button to the right of the various version listings when editing a post, nothing happens.
Oct 19, 2007 10:29 am
So the reason I'm not seeing the post view seems to be related to a JavaScript error:
Line: 326
Char: 1
Error: Object expected
Code: 0
URL: http://localhost/wordpress/wp-admin/post.php?action=edit&post=9
Oct 22, 2007 3:24 pm
Hello...is there anyone out there?
Oct 23, 2007 2:03 am
I don't have time to look into this problem just yet but I will do soon
Oct 25, 2007 10:12 pm
I can't reproduce this problem, Dan. I've tried viewing the versions in FireFox, Safari, IE6, IE7, and Opera, and they all work without any errors. Are you using a different browser?
Oct 30, 2007 10:48 am
Hi, I tried to install the plugin, but received the following error when trying to activate it: Plugin could not be activated because it triggered a fatal error.
I am running version 2.2.2. Any ideas before I dig into the code?
Oct 30, 2007 10:55 am
Never mind. For some reason, the zip didn't completely unpack. Downloading it again got the whole thing.
thanks
Nov 1, 2007 2:01 pm
This is brilliant. The best. It's working for me 99%, but for one thing:
Under the audit trail attached to the post edit view, some of the entries have the following error:
Warning: assert() [function.assert]: Assertion failed in /home/storyc/public_html/beta/wordpress/wp-content/plugins/audit-trail/lib/Text/Diff/Engine/native.php on line 202
But then the previous version is still displayed afterward.
By the way, have you ever heard of Zensor? You guys should get together, you could build the greatest moderation queue plugin ever.
Regards,
Dalton
Nov 1, 2007 4:44 pm
I really have a tremendous appreciation for Audit Trail! One minor enhancement I would love to see is the ability to search IP addresses. Thanks so much for all your efforts!
Nov 6, 2007 5:25 am
Dalton, fixed
Violet, I've added the ability to search by username. Searching by IP is more tricky, so I've left that out for now.
Nov 8, 2007 1:36 pm
Great plugin --- is there any way to upgrade without losing existing audit trail data?
Nov 12, 2007 6:57 pm
Updates should occur without data loss
Nov 13, 2007 3:50 pm
Great plugin. I am however only able to view the first page of the audit. Any other pages gives a "Cannot load audit-trail.php." error message even when I use the Next link or click on the page # under Manage>Audit Trail. Does anyone know why this is the case?
Nov 14, 2007 2:56 pm
John, the page says: NOTE: If you are upgrading from a previous version please de-activate and then re-activate the plugin. This will upgrade your database tables (unfortunately any existing Audit Trail data will be lost)
...so it should be ok to upgrade, contrary to the page's statement?
Nov 18, 2007 4:05 pm
Great work!
I have the same problem describing in posts #28 and #56. I don't know if .htaccess really cause that problem (not tested), nethertheless I have to use that file. Its content is
I've took a look at my database and the entry of the field operation is template_redirect.
Ok, nice information, but what can I do to avoid logging of favicon.ico?
THX again for your plugin
Nov 26, 2007 3:35 am
JP, I should reword that section, but what it means is that data will be lost if you are upgrading from a pre 1.0 version. After that your data is retained.
Nov 26, 2007 10:44 pm
I've released a new version with a few updates and hopefully an end to the favicon.ico issue
Dec 22, 2007 5:08 pm
Hi, I'm trying to localize AT and have made a sv_SE.mo file that I've put in /locale. I've also changed $locale to sv_SE in plugin.php. What else do I have to do to make the translation kick in?
Dec 31, 2007 12:22 am
Hi Manne, no changes are needed to plugin.php (doing so will prevent any localisation!). Have you modified wp-config.php to your locale?
Jan 9, 2008 4:51 am
John - looks like time for changes when looking at the audit trail are taken from server time. At least it doesn't heed my wordpress settings. I've seen that with another plugin I'm using (cforms), developer found that the time was pulled from database settings. This something easy to change? So AuditTrail picks update time from blog settings?
Jan 10, 2008 12:58 am
The log is now shown according to whatever time offset your blog is configured for.
Jan 11, 2008 7:55 pm
Hi John, I would like to know if this plugin is compatible with the WordPress Multi User version of the blogger.
Thank you.
Jan 14, 2008 10:22 am
Hi there,
I've just downloaded version 1.0.8 of your great plugin.
WordPress' Plugin Management area still says "There is a new version of Audit Trail available. Download version 1.0.8 here."
I had a look at audit-trail.php - it says "Version: 1.0.7" in the header.
Question:
Is your site linking to the wrong zip, or has the version line in audit-trail.php not been updated?
Thanks.
Jan 15, 2008 10:18 pm
Gina, I've never used WPMU and don't know what the differences are to be able to say whether it works or not. Let me know either way!
Will, you're right, for some reason the file is 1.0.7. I've updated this to 1.0.8
Jan 16, 2008 12:09 pm
Hi John,
I installed it for WPMU, and so far its working great, I'll write later if I encounter any problems.
Thank you.
Jan 22, 2008 11:29 am
Hey John,
I just wanted to let you know you have a great plugin!
However, with the time issue, you add the gmt offset to the server time, not local time.
I fixed it by editing the audit_trails.php file to add the (local time - server time) offset instead of gmt offset.
Maybe you can address this in the next release.
Thanks!
Jan 23, 2008 5:11 am
I'm trying to show the version history dropdown on each post (on the blog, not in the admin interface) for logged in users with the right capabilities. Any clues on how this could be done?
Mar 21, 2008 5:14 pm
Would love to know when this supports WP 2.5! Sounds like an awesome plugin.
Mar 26, 2008 5:10 pm
Yar, she's righteously broken in WordPress 2.5 — both visually and functionally.
Jun 22, 2008 9:48 am
hi. Thanks for plugin
perfect.
Regards
Jul 23, 2008 12:21 pm
Plugin is great!
I was having problems with the ignore functionality. I'm no php expert, but I did this:
Line 78 of auditor.php from:
explode (',', 'ignore');
to:
explode (',', $ignore);
Aug 1, 2008 12:19 pm
Love the plugin, one of the best!
Aug 11, 2008 10:27 am
стандарты мсфо, а также международные стандарты отчетности, международные стандарты, а также международные стандарты бухгалтерского и международные стандарты, мсфо отчетность, а также международные стандарты бухгалтерского на сайте femida-audit
Pings & Trackbacks
alexking.org, blog.emyto.net, community.beta.plus.net, community.plus.net, endolith.com, family.brasslinepro.com, tekapo.com, wp.tekapo.com, ccicenter.org, crno.net, davidpaulrobinson.com, hitnews.net, manishpandey.com, neunzehnhundert.org, techzi.net, wordpresscn.com, wordpressplugin.org
Leave a comment