Another technical posting…
I was looking for a way to obtain site statistics, and discovered the WordPress plugin StatTraq. It looked perfect in the screenshots, but unfortunately doesn’t work with WordPress 1.5. However, a nice hack is available at AdsWorth which does the trick.
By default, the plugin does not create any link to itself from the administration screen. A suggestion was made on the StatTraq forum, but again this doesn’t work for WordPress 1.5. It is very easy to adapt it though, and I’ve included the change here in case it’s useful to anyone.
wp-admin/menu.php and find the following section (at the very beginning of the file):
$menu = array(__('Dashboard'), 0, 'index.php'); $menu = array(__('Write'), 1, 'post.php'); $menu = array(__('Manage'), 1, 'edit.php'); $menu = array(__('Links'), 5, 'link-manager.php'); $menu = array(__('Presentation'), 8, 'themes.php'); $menu = array(__('Plugins'), 8, 'plugins.php'); $menu = array(__('Users'), 0, 'profile.php'); $menu = array(__('Options'), 6, 'options-general.php');
Now add this line immediately after:
$menu = array(__('StatTraq'), 10, '../wp-stattraq/statistics.php');
Simple! A link to StatTraq will now appear in the menu bar of the administration screen.