=== Counterize === Contributors: Gabriel Hautclocq Donate link: http://www.gabsoftware.com/donate/ Tags: hit, visit, counter, traffic, statistics, plugin, admin, stats, ip, filter, graph, chart, browser, os, operating, system, page, daily, weekly, monthly Requires at least: 3.0.0 Tested up to: 3.1.3 Stable tag: 3.0.21 Simple counter and statistics plugin with no external libraries. == Description ==

Simple counter and statistics plugin with no external libraries.

Saves timestamps, visited URL, referring URL, IP addresses (*), operating systems and browser informations in the database, and can display the total hits, unique hits and other statistics in your WordPress pages.

The users who can display the Counterize dashboard can be defined thanks to Wordpress capabilies.

An administration interface using the new Wordpress Settings API is available, as well as a dashboard with detailed informations and statistics.

Counterize can display statistics in your pages and posts - visit this webpage for an example.

Version 3 of Counterize is willing to support Wordpress 3.x.x as much as possible, but this is still a work-in-progress. Do not hesitate to report any incompatibility!

I am not the first author of Counterize so I may not be aware of some old bugs. You can report them to me.

Counterize is based on the Counterize II 2.14.1 plugin by Steffen Forkmann (http://www.navision-blog.de/counterize) and Wordpress Browser Detection Plugin by Iman Nurchyo (http://priyadi.net/).

(*): Since 3.0.13, by default, Counterize will not store any IP information, because this is illegal in some countries (e.g. Germany). For users living in those countries, Counterize will store only a small hash to distinguish between different users and to get information about the user count. For other countries, IP addresses will be recorded. This is just an option in the administration area of Counterize.

== Installation == 1. Unzip the package and upload the folder **counterize** to your **/wp-content/plugins/** folder. 2. Activate the plugin through the **Plugins** menu in WordPress. 3. Go to **Counterize** on **Options** page, configurate your settings. *Save the settings*. == Screenshots == 1. Overview of some statistics rendered by Counterize == Migration from Counterize II == 1. Deactivate **Counterize II** on the **Plugins** menu in WordPress 2. Unzip the package and upload the folder **counterize** to **/wp-content/plugins/**. 3. Activate the plugin through the **Plugins** menu in WordPress. 4. Go to **Counterize** on **Options** page, configurate your settings. *Save the settings* Counterize uses the same tables than Counterize II so you won't loose your data. You can proceed to the migration safely and benefit from the numerous improvements in Counterize. == Reporting bugs == If you encounter a bug, please send us a descriptive report of what happened, with the error messages if any. == Many thanks to == * Steffen Forkmann (author of Counterize II from which this plugin is based from) * Carsten Becker (German translation, WP 3.x integration) * Can Aydemir (Turkish translation) * Helmutt Hoffman (found some bugs and proposed solutions) * Spela Golob Peterlin (Slovenian translation) * Emale (Right-to-left compatibility) == Functions == After you have installed the Counterize plugin, you can see a lot of diagrams on the Counterize stats page (Dashboard/Counterize). Most likely you'd like to have a counter somewhere on your pages, showing XX hits or something like that. Here's an overview of the functions which can be used in your Wordpress sidebar. == Statistics in your posts and pages == You can use the following codes in HTML mode when editing your post or page, where 'xx' can be replaced by any integer greater than 0: You can also use "#-" and "-#" instead of "<!--" and "-->". You can visit this webpage for a more descriptive example. == botlist.txt == Counterize is coming with a botlist.txt file. This file is a list of things that should not be counted in the statistics. It is also used to delete bots manually after you edited it. There are three kind of lines you can find in botlist.txt: == Changelog == = 3.0.21 = * Fixed some issues with RTL scripts in the History page * Improved filters in history: clicking the filter link (F) will now add the filter to the filter form instead of reloading the history. If javascript is disabled, will behave as before. * Can now combine filters of same and different types (example, different IP addresses, Referer AND agent...) * Can now define include or exclude filters * Can now filter unknown referers (before the link was missing) * Button to clear the form and button to cancel changes made to the form. Difference between the two buttons is that the second will restore the previously submitted filter (if any). * Buttons now integrates better with the Wordpress theme = 3.0.20 = * Changed "#-- something --#" to "#- something -#" to insert statistics into posts as it seems Wordpress change double dashes to one single long dash. * Removed HTML comments from the Javascript file, it caused some Javascript errors in IE * Counterize should now display correctly in Right to Left scripts. = 3.0.19 = * Maintenance release. The Counterize Dashboard will now try to insert itself in an available position in the menu instead of blindly replace previous menus. = 3.0.18 = * Added option to choose the Geo IP tool (before it was hard-coded) * All the Counterize pages should now be 100% valid XHTML 1.0 Transitional. This means less potential issues. * Collapsible stats are now a little lighter due to an url encoding issue. * Counterize should load a little faster because all XML errors have been eliminated. * Corrected a conflict with the wp-security-scan plugin (function make_seed() was already declared in this plugin). * Ensure that every function begin with the "counterize_" prefix to avoid conflicts * Renamed Javascript functions with the "counterize_" prefix * Renamed browsniff.php to counterize_browsniff.php = 3.0.17 = * New form to apply filters in the history (still a work in progress, your ideas are welcome) * Flushing the DB will reset the auto_increment counters to 1 (thanks to Carsten Becker) * Backquoted the tables and table fields in Counterize queries * Moved the Counterize dashboard in its own menu and divided it among several pages for easier access. * Improved bot detection with possibility to define complex filters and use regular expressions in the botlist.txt file (see the "Other Notes", "botlist.txt" section). * Improved bot deletion: deleting a bot should now substract the hits related to the bot. * New Slovenian translation (thanks to Spela Golob Peterlin) = 3.0.16 = * Corrected wrong link in the Counterize dashboard widget * Made some changes to allow non-administrators to see the statistics. The capability to see the statistics can be defined in the administration section and is defaulting to "manage_options" (which only administrators have, usually). See http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table for a descriptions of capabilities. * The is_admin() function does not behave as I thought (a simple registered user will actually pass the is_admin() check if he goes his profile dashboard) so it has been replaced by current_user_can('manage_options') where relevant. * Moved some function calls in the init action. = 3.0.15 = * Corrected a minor bug in the data validation of the options * Added function counterize_most_visited_IPs24hrs() * Added counterize_stats_ip_xx and counterize_stats_ip_24hrs_xx * Corrected readme.txt * Updated all translations = 3.0.14 = * Updated French translation * Updated Turkish translation (thanks to Can Aydemir) * Updated German translation (thanks to Carsten Becker) * Commented error_reporting(E_ALL) (I forgot to comment it in the previous version) * Corrected a SQL injection risk * Corrected the alternative way to put statistics into posts and pages (using #-- and --# instead of <!-- and -->) * Corrected a serious bug in the installation procedure about migration from version 2.x to 3.x of Counterize = 3.0.13 = * Use the Wordpress Settings API for the options page for a more Wordpress 3 compliant option page * Now only 2 options stored in the Wordpress options table ('counterize_options' and 'counterize_version') * Restored user-agent filtering in Counterize Dashboard * IP statistics restored if allowed by your country. * User can choose to collect IPs if it is allowed in his country. If not allowed, IP will be replaced by 'unavailable'. * Updated the Geo IP website to whatismyipaddress.com because the other one does not work * Fixed a lot of issues (warnings, notices, errors...) thanks to WP_DEBUG=true and PHP's error_reporting(E_ALL) * Renamed a lot of callbacks with the '_callback' suffix in order to recognize them more easily * Links open in a new window * Updated French translation. Translation authors should update their translation also. * Added an alternative way to put statistics into posts and pages (use #-- and --# instead of <!-- and -->) = 3.0.12 = * (internal release) = 3.0.11 = * Fixed minor installation issue = 3.0.10 = * Fixed incorrect naming of localization files. I was thinking the country suffix was not mandatory for the .po and .mo files, but actually it is, otherwise the translation is ignored by Wordpress. So for example if your WPLANG value is "fr_FR", Wordpress will only load .mo files finishing by "-fr_FR.mo". Thanks to Can for letting me find this. * Moved some functions away from counterize.php * Added a bot in botlist.txt = 3.0.9 = * Added two functions: counterize_most_used_browsers_collapsible() and counterize_most_used_os_collapsible(). Clicking on the [+] will display the statistics about each version of a given browser or operating system. * Added their corresponding code for adding the charts in a post or page * Updated bot list to block a larger number of bots while keeping the list small * Improved CSS and Javascript loading * Carsten Becker updated the German translation * New Turkish translation from Can = 3.0.8 = * Corrected an issue with the detection of botfile.txt and delete the bots that made it to the Counterize DB. * New German translation (thanks to Carsten Becker) * Added a button to manually delete the bots into the Counterize options page. So now you can modify your botlist.txt and delete the bots with that button. = 3.0.7 = * Added more possibilities to add statistics into user posts in a convenient way * New function counterize_most_used_os_without_version() * New function counterize_get_hits() * Fixed function counterize_most_visited_referrers24hrs() (invalid SQL) * Fixed function counterize_most_visited_pages24hrs() (invalid column header) * counterize_most_visited_referrers24hrs()) and counterize_most_visited_pages24hrs() now display the amount of the last 24 hours instead of the global amount = 3.0.6 = * Security update: The forms and links use Nonce in the administration area * Security update: It is now impossible to execute the Counterize PHP files directly * Modified the Counterize dashboard and options URL for a more friendly one * A complete uninstall script has been added (uninstall.php) * Fixed excluded user list too small (select style was set to height:2em; ) * Javascript is now loaded using the Wordpress recommended way * 'Configure' link added to the plugins page * A few SQL query tricks = 3.0.5 = * Fixed installation issue: hook register_activation_hook does not fire when plugin is automatically updated = 3.0.4 = * The bot list is now in a separate text file (botlist.txt) * SQL queries have been reformated for easier reading * Fixed an obvious SQL error when using filters in latest entries = 3.0.3 = * The install function was not called after the plugin activation, now fixed * The Counterize detailed dashboard is now a Dashboard sub-menu (before: a Post sub-menu) * Warn user about an 'out of memory' error if 0 is defined for the 'Amount of rows to show in history' option * Corrected a lot of bugs thanks to PHP's error_reporting=E_ALL and WP_DEBUG=true options = 3.0.2 = * The Counterize dashboard section is now Wordpress 3.x compliant (thanks to Carsten Becker for pointing this out) * Implemented the fixes found at http://www.mikoder.com.au/2009/07/fixing-counterize/ (thanks to Helmut Hoffmann again!) * The counterize version is correctly shown in the administration page of Counterize * The function counterize_get_online_users() was not documented anywhere * Updated POT file if someone want to translate it * Updated French translation = 3.0.1 = * DEFAULT was ommited in a query, causing the installation to fail. Thanks to Helmut Hoffmann for reporting this! * No default version number was given. Thanks again to Helmut Hoffmann! = 3.0.0 = * Development is now continued by Gabriel Hautclocq (me) * Chrome is now recognized as well as plenty of other browsers * Newer versions of Windows recognized * Many other OS have also been added * Updated the bot exclude list * Many OS version added * Updated some old icons * Several other improvements have been made to browsniff.php * Added a button in the admin interface to refresh the user-agent table (useful if you modify browsniff.php yourself) * Distinction between 32 and 64 bits versions of the OS, as well as ARM and PowerPC versions * Browsers and OS charts now display a link to the product * Fixed garbage alt attribute of the chart bars * Cleaner PHP code * Cleaner code output (indentation...) * Wordpress 3.x compliant code * Wordpress 3.x compliant Readme * Unfortunately, most translations should to be updated to reflect the changes. They have not been included with this version except for the French translation ; please allow some time to the translation authors to update their translation. * Now distributed under the ISC license = 2.14.1 = * German translation corrected (thanks to Johannes Parb) = 2.14.0 = * Dashboard for WP 2.5 = 2.13.0 = * no more ip-logging (this is illegal in some countries e.g. Germany) counterize stores only a small hash to distingiush between two users and to get information about the user count = 2.12.7 = * logging postID for later analysis (thanks to Alfred likemind.co.uk) = 2.12.6 = * counterize_get_online_users() fixed (thanks to Robbix wombat-tour.de) = 2.12.4 = * 2 new functions (thanks to KnickerBlogger.net) = 2.12.3 = * fixed installtion = 2.12.1 / 2.12.2 = * fixed folder = 2.12 = * lots of sql fixing (thanks to Eric blogs.jobdig.com/wwds) = 2.11 = * XHTML valid (thanks to Julia http://julialoeba.de) * Japanese version (thanks to Urepko http://wppluginsj.sourceforge.jp/) * exclude new bots (thanks to lacroa.altervista.org - Emanuele) * Exclude if referer is the same as URL (thanks to lacroa.altervista.org - Emanuele) * GeoIpTool with new URL geoiptool.com/en/ ==> geoiptool.com/ (thanks to lacroa.altervista.org - Emanuele) * Mass-Deletion (thanks to lacroa.altervista.org - Emanuele) * Bot Yandex added * Spanish translation (thanks to Sandra) * Database-flush deletes all keywords = 2.10 = * Italian version (thanks to Emanuele) * Russian version (thanks to Ivan http://shadow-blub.livejournal.com/) * Small installation bugfixes (thanks to Thorsten http://www.siteartwork.de/) = 2.08 = * %-Bug fixed (% in graphs on new line) * max-Width in Settings (width-fix for firefox) * users online * browser icons * operating systems = 2.06 = * Minor compatibility bugfixes for Wordpress 2.2 = 2.05 = * small Bugfixes * All TableNames replaced with function calls * LocalizationFramework used * DayOfWeek-Bug fixed * display only EXTERNAL referers (Thanks to eric) * extremly speed up sql queries * stats moved back to Manage-Page (only for admins visible) * colors in all stats * separate statistics page for blog entries * Microsoft URL Control-bot excluded = 2.04 = * custom whois-server * moved all files to own folder * separate settings/admin page * stats moved to doashboard-subpage * ref-analyzer (http://nopaste.easy-coding.de/?id=146) for keywords * keyword-stats (alpha) * mysql-version independent table structure * don't show stats, when db is empty (DivByZero) = 2.03 = * Installprocess for mysql version 4 * Filter and MapView for most visited ips = 2.02 = * BugFix - UserAgent = 2.01 = * New Author: Steffen Forkmann * New Table Structure (saves a lot of space and mostly time) * Redesigning some functions = 0.53 = * By mistake (during test) commented out the exclude-function. Once again re-enabled. * Added the feature "top referers" in the admin-interface * Added the feature to manually select amount to show in the bar-graphs, instead of default 15 * Minor stuff, changed text, thicker bars in graphs, now "unique hits last 7 days" also shown in admin-interface, = 0.52 = * More bots * New function called counterize_getuniquelatest7days() (Curtis) * Exclusion of most common images and RSS feeds (SHRIKEE) * Don't use the now() insert call when inserting entries. Use gmdate() instead