Thanks for your interest in WP OnlineCounter, a plugin for WordPress which counts the number of currently online visitors, the highest number of visitors online at the same time, and the total count of visitors. You can configure what should be displayed and how it should look like through its own options page in your WordPress dashboard. It also offers some very basic statistics regarding the most recent visitors to your site (only available if you are running on a server with at least MySQL 4.1).
Installation
Download the plugin and drop it into your WordPress’ plugins directory, usually “wp-content/plugins” (DON’T put it into a subdirectory). Enable it on the Plugins page in your WordPress dashboard. Paste the following code in your template where you want the counter to show up, or use either the Widget for WordPress Widgets or the Sidebar Module for the K2 theme.
<?php if(function_exists('wp_onlinecounter')) wp_onlinecounter(); ?>
Upgrade
If you are already using an older version of this plugin, please disable it on the Plugins page, overwrite the old file in your plugins directory with the new one you downloaded, and re-enable it again. This is necessary to perform an upgrade to the table structure in your database.
Download
- WP Onlinecounter v0.14
- Sidebar Module (for K2 theme, not tested anymore)
Notes
The Statistics page under Manage in your WordPress dashboard only works if your are using at least MySQL 4.1, this is because older versions of MySQL are missing some features used in the database queries to get the results. This is not my fault, and there is NO way around it. Stop complainig about it to me and contact your hosting company to upgrade their outdated software.
hello
im french and i would a wp onlinecounter for my blog and the files for install .
Thanks.
I translate your great plugin.
Turkish 0.11 version here and can download here.
I just installed this plugin and am really liking it. I am having a problem with it counting the total number of visitors though. Namely, it’s not and I’m not sure why. I put a number in that field in the options screen but it’s still not counting the total number of visitors to my site.
I have a request too. I love the counter stats page where it lists out the IP address of the current visitors. Is there any way to keep a running log of this info? I noticed that when someone leaves, their IP address is gone as well. Just curious.
Thank you for a wonderful plugin! If I could only get it to count the total number of visitors, I would be ecstatic about this plugin!
One more thing, I think you have a bug in the table option. You have it set to create a table called “onlinecounter” but the script calls for the table to be named “wp_onlinecounter.” At least that’s what I found when I set it up on my blog. 🙂
Hi Jan,
ich glaube, ich habe ein bug entdeckt.
Guckst Du hier:
http://forum.wordpress.de/showthread.php?p=60503#post60503
[quote comment=”85″]Hi Jan,
ich glaube, ich habe ein bug entdeckt.
Guckst Du hier:
http://forum.wordpress.de/showthread.php?p=60503#post60503%5B/quote%5D
danke, ist gefixed!
[quote comment=”58″]I translate your great plugin.
Turkish 0.11 version here and can download here.[/quote]
thanks for your translation, but there is no need for it as you can change the labels to anything you want in the options!
Nepf,
Thanks for the link but I can’t read it. Alas, I only speak English. I will try to translate though and see if I can’t get it figured out. Thanks!
[quote comment=”80″]I just installed this plugin and am really liking it. I am having a problem with it counting the total number of visitors though. Namely, it’s not and I’m not sure why. I put a number in that field in the options screen but it’s still not counting the total number of visitors to my site.[/quote]
sorry, i really can’t figure out why that would happen, as long as the other data is right this should work, too
[quote comment=”80″]
I have a request too. I love the counter stats page where it lists out the IP address of the current visitors. Is there any way to keep a running log of this info? I noticed that when someone leaves, their IP address is gone as well. Just curious.[/quote]
i think the best would be if you try any of those more advanced, “real” statistics plugins for wordpress or see if you can get some log analyzer tool like AWStats or Webalizer on your server … i wrote just a simple counter 😉
[quote comment=”80″]
Thank you for a wonderful plugin! If I could only get it to count the total number of visitors, I would be ecstatic about this plugin![/quote]
Thanks for the compliments! can you give me the PHP and MySQL version running on your server?
Jan,
Here is the requested info:
PHP Version 4.4.2
MySQL Version 4.1.19-standard
I translated enough of the comments above from Nepf regarding this site, http://forum.wordpress.de/showthread.php?p=60503#post60503 and I replaced line 342 but it’s still not counting the total number of visitors.
As I said above. I had to create the table wp_onlinecounter in order to get the plugin to work and that is different than the directions in the plugin. I’m wondering if this is preventing the total number of visitors from calculating?
Jan,
Here is the requested info:
PHP Version 4.4.2
MySQL Version 4.1.19-standard
As I said above. I had to create the table wp_onlinecounter in order to get the plugin to work and that is different than the directions in the plugin. I’m wondering if this is preventing the total number of visitors from calculating?
[quote comment=”88″]Nepf,
Thanks for the link but I can’t read it. Alas, I only speak English. I will try to translate though and see if I can’t get it figured out. Thanks![/quote]
BIG FAT WARNING from the plugin author: This change of the code does NOT give you the same results like the original code does, it may look the same at first glance, but it does NOT! You’ve been warned…
—
Goto Line 342
look for:
$counts = $wpdb->get_results(“SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp”);
replace with:
$counts = $wpdb->get_results(“SELECT t1.ip,t1.uri,t1.timestamp FROM “.$table_prefix.$wpoc_tablename.” t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM “.$table_prefix.$wpoc_tablename.” GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp”);
that’s it!
Thanks Nepf. I got that figured out and replaced the code but it’s still not counting my visitors. The number online works and the maximum concurrent works but the total visitors still does not work. I’ve posted here and on WP support forums and no one has been able to figure it out.
This is a great accessory. i am using this and i am very ease. Thanks