******************************************************************************** Wp-SlimStat: a smart statistic analyser based on Wp-ShortStat and SlimStat Version 0.9.2 code name "Meet locals" - May 5th, 2006 Copyright (C) 2006 Mr. Coolmann - http://www.duechiacchiere.it/ Portions of code Copyright (C) 2006 Stephen Wettone Portions of code Copyright (C) 2004 Jeff Minards Portions of code Copyright (C) 2005 Markus Kammerer Special thanks to: - YoungMin, http://082net.com/ , for helping with Ajax and code optimizations - Joe, http://blog.fileville.net/ , for helping with translation and typos This plugin uses the IP-to-Country Database provided by webhosting.info: http://ip-to-country.webhosting.info/ - Last updated March 22, 2006 ******************************************************************************** TABLE OF CONTENTS ................................................................................ 1. Fresh installation instructions: upload-and-go 2. Upgrading from older versions: read carefully 3. Importing data from wp-shortstat 4. What’s new 5. Filtering details 6. Using meta-tags to show stats on your blog 7. IP-to-Country database 8. Localization 9. License ******************************************************************************** 1. FRESH INSTALLATION INSTRUCTIONS: UPLOAD-AND-GO ................................................................................ ## Step 1 #### Upload the entire "wp-slimstat" folder to your Wordpress install’s plugins directory (wp-content/plugins/) ## Step 2 #### Login into your Wordpress administration panel. Activate the plugin (Wp-Slimstat) in Plugins management area. ## Step 3 #### (wp-shortstat users only) Disable wp-shortstat plugin: you don’t want to overload your server. Do not delete its tables in the Wordpress database, if you want to import them into wp-slimstat (see below for details in 3) ## Step 4 #### Now you have a new tab in the Dashboard called “SlimStat”. That's it. Simple, hu? ## Step 5 #### (optional) Add Wp-SlimStat 80x15 PNG icon to your template, to let other users discover the power of this plugin. track your blog ******************************************************************************** 2. UPGRADING FROM OLDER VERSIONS: READ CAREFULLY ................................................................................ FIRST OF ALL BACKUP YOUR TABLES TO AVOID THE RISK OF DATA LOSS! ## Step 1 #### Deactivate the old Wp-SlimStat using the Plugins management area. ## Step 2 #### Overwrite the entire "wp-slimstat" folder with the new version. (everything in the wp-slimstat folder!). Make sure the new version’s files are uploaded. ## Step 3 #### Delete or “drop” the wp_slim_countries table, using phpMyAdmin: DROP TABLE wp_slim_countries; Note: replace wp_ with your Wordpress table prefix, e.g. wr_ ( -> wr_slim_countries ) ## Step 4 #### Activate the new version of Wp-SlimStat, and follow the instructions. If the execution returns errors, please contact me to fix the problem. Activation of Wp-SlimStat may require up to 30 seconds, in order to rebuild ip2countries table. After this, go to the Dashboard and select wp-slimstats, if there is a message saying “upgrade the database”, do what the plugin says before you go onto step 5. ## Step 5 #### Execute SQL code included in "countrysync.sql". I didn't add this inside plugin PHP code, because for 'big' tables (say, 100.000 rows) it requires more than 45 seconds to be executed, and this can be more than the PHP execution time allowed by your host. This SQL code will rebuild the NEW country field in wp_slim_stats. ******************************************************************************** 3. IMPORTING DATA FROM WP-SHORTSTAT ................................................................................ If you were using wp-shortstat, you can import its data into Wp-SlimStat. Just go to Config -> Shortstat detected -> Import data, and let the plugin work for you. This function will only appear if ShortStat is REALLY detected, and will disappear after the import. To rebuild the country column, just execute SQL code included in "countrysync.sql", using your phpMyAdmin control panel. ******************************************************************************** 4. WHAT’S NEW ................................................................................ 0.9.2: * Added Italian and English (countries and languages) localization files 0.9.1: * Made a couple of database changes (I hope these are the last ones, eh eh) since I noticed that a modification introduced in 0.8.9 wasn't so smart and made everything running slower * Lots of code rewriting and optimizations, to make Wp-Slimstat run even faster * Added internal importer and removed SQL files to upgrade things 'by hand'; I know this is much simpler both for you and me * Added a smarter browser and platform parsing (using user_agent): more than 50 browsers (and counting) are now correctly detected 0.8.9: * Fixed a couple of bugs introduced in 0.8.8 (error in data stored) * Table containing ip2countries entries is now optimized (changed index) This will reduce query execution time and CPU load * Added feature: collect searches made through the internal search form (if you have one) and a new module under "What" to show them. I assumed that your template is using a METHOD="post" and 'q' or 's' for the field name (as described in the default Wordpress template guide) * Started working on PathStat integration, to 'follow' your visitors; an inactive label is already there :-) * Modularized PHP code, ready for Ajax integration (thanks YoungMin) 0.8.8: * Fixed PHP 5.x compatibility issues. Now you can use it with PHP 5.x. Please write me back if you experience any problem about this topic * Fixed WordPress 1.5 compatibility issues. I used a is_preview() call that is not really needed, and that is not defined for WP 1.5 * Reduced IP2Country table size and CSV file size * Reduced stats table size: now some information is not actually stored in the database, but calculated when browsing stats. This makes no real difference for users, but recording visits is now even faster * The plugin is not in alpha state anymore. Since a lot of people reported bugs and solutions, I think the code is "tested enough" to remove the alpha status. However, this version 0.8.8 is meant to be a 'transition' version: a lot of things still need to be done, but I was so excited to share the optimized code with you all! 0.8.7: * You can filter data by time intervals; just click on (more or less) any entry in “When” panel, and enjoy building your filters: you can mix a domain filter with a time interval, and so on * Added a “not working” preview of “Config” panel: no one of those tools is enabled, at this time. But I’d like to show you what I’m working on * In the zip file, you will find a 086to087.sql text file. This is a patch for the database. Even if it not required, in order to use 0.8.7 or future releases, I suggest you to execute it, through phpmyadmin control panel (so that you can also see what it does). I just changed my mind about database structure and indexes, I don’t want to use them anymore (the data table grows faster and faster with those indexes). Please let me know if you need any help in upgrading your database. Note that if you are installing a fresh Wp-SlimStat 0.8.7, you won’t need to upgrade the database eh eh * I included a newer ip-to-country data file (.csv). If you want to upgrade your data table (wp_slim_countries), just drop it from phpmyadmin, and then disable and enable again the plugin from Wordpress Plugins control panel. Note that you need to upload the .csv file in the same folder where the .php file is! ******************************************************************************** 5. FILTERING DETAILS ................................................................................ Using Wp-SlimStat you can also filter details and stats using the filter form inside Details panel. Just type a domain (say google.com), choose "domain" radio-button, and submit data. The plugin will show you information related on that filter string. The same thing can be done with search strings, or referers. Filters work as a substring match: if you type "google" for "domain" filter, you will see details related to google.it plus google.com plus google.de etc. ******************************************************************************** 6. USING META-TAGS TO SHOW STATS ON YOUR BLOG ................................................................................ Wp-SlimStats comes with a nice feature, to export visits and percentages, and let visitors see them. Just add one of the following tags to your page or post: enables listing of referrers This is still an experimental feature, and I will improve it in future releases. ******************************************************************************** 7. IP-TO-COUNTRY DATABASE ................................................................................ Wp-SlimStat uses a local "ip to country" conversion, storing data in your database, instead of calling a remote server. This is faster, and keeps you free from service changing or fees. On the other hand, your database needs more room to host this infomation. Text file is 1,6 megabyte, while table is more or less 1,3 megabytes. Wp-SlimStat tries to automatically load data, using wp-slimstat.csv, that should be in the same directory. This can take a while, so try to be patient. If you don't want to use a file to convert IP to countries, just delete the wp-slimstat.csv from server, before activating this plugin. ******************************************************************************** 8. LOCALIZATION ................................................................................ Wp-SlimStat is fully localizable. Everything can be translate in your language and character encoding. As for every Wordpress plugin, I used the Portable Object (.po) standard to do this. If you want to provide a localized file in your language, use wp-slimstat-it_IT.po in wp-slimstat/lang folder, and follow comments included. Edit it using poEdit (search on Google for details) and send the new .po file to info(at)duechiacchiere.it . Note: if you get the error Cannot instantiate non-existent class: cachedfilereader in ... make sure you have set your blog’s default language in wp-config.php, e.g. : “define ('WPLANG', 'en_US' );” and that the corresponding localization file exists in wp/slimstat/lang folder. ******************************************************************************** 9. LICENSE ................................................................................ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.